.net Server app deploy on gamelift fleet


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: 

And install.sh:


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 ?

demandé il y a 2 mois156 vues
1 réponse
Réponse acceptée

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
répondu il y a 2 mois
profile picture
vérifié il y a 2 mois
profile picture
vérifié il y a 2 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions