.net Server app deploy on gamelift fleet

0

I just upload the build with install.sh to gamelift, but cause error"FLEET_INITIALIZATION_FAILED Cannot run program "/local/game/install.sh" (in directory "/local/game"): error=2, No such file or directory"

But Extrating Build logs shows it has this file

 Extracted files from build: 
	/local/game/amazon-cloudwatch-agent.json
	/local/game/common-config.toml
	/local/game/install.sh

And install.sh:

#!/bin/bash

sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
sudo yum install dotnet-sdk-5.0

# Download and install the agent
wget https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm
sudo rpm -U ./amazon-cloudwatch-agent.rpm

# Copy the cloudwatch agent configuration file to the right directory
sudo cp amazon-cloudwatch-agent.json /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json

# Copy the common-config.toml to the right directory to set shared credentials access with the Fleet role
sudo cp common-config.toml /opt/aws/amazon-cloudwatch-agent/etc/common-config.toml

# Start the agent
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json -s

Is there something wrong ?

gefragt vor 2 Monaten141 Aufrufe
1 Antwort
1
Akzeptierte Antwort

If you created <install.sh> on Windows, this error is likely to occur.

Linux and Windows have different text formats.

Try opening it via vi -b install.sh on Linux.

If you can see characters such as '^M', then this error may occur when running it on a GameLift fleet.

profile picture
EXPERTE
Artem
beantwortet vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen