.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 ?

질문됨 2달 전141회 조회
1개 답변
1
수락된 답변

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
전문가
Artem
답변함 2달 전
profile picture
전문가
검토됨 2달 전
profile picture
전문가
검토됨 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠