- Newest
- Most votes
- Most comments
It would be nice to have some updates about this issue. Thank you!
The documentation about the install script has been updated: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html#gamelift-build-cli-uploading-install
Please let us know if anything is still unclear
Thank you
Hi, can you post a default example of the install.sh as required by the server? Basically, I just need a log.
[quote="chrisgong, post:7, topic:4357"]
#!/bin/bash
echo 'Hello World' > install.log
[/quote] Hi.
But if I do not provide an install.sh the GameLift Fleet fails with: "/local/game/install.sh is empty or does not exist."
In this case, I would suggest creating an install.sh file, using Visual Studio Code to make it easier, add the sample code inside for now,
#!/bin/bash
echo 'Hello World' > install.log
and then add it to the root level of the game directory that you're uploading to GameLift. If your server fails to run because of some missing software dependency issue, then you may have to modify the install.sh file with some yum install commands in your install.sh script.
In the link referenced, there is a sample install.sh file
#!/bin/bash
echo 'Hello World' > install.log
However, I have found more recently that Unreal Engine servers don't need an install.sh script. That may have changed but if they do, I don't believe the server needs anything to be installed in the Amazon Linux environment of the ec2 instances in the fleet in order to run successfully, so that may be why their sample script doesn't include any install commands. However, this may not hold true for other kinds of game servers, for e.g. Unity, non-custom game servers, etc.
If your server does have some software dependencies that need to be installed before running, then you'll have to include some yum install commands in your install.sh script.
Okay, it might have failed because at least under Windows I have to install the following (see 1st answer) https://answers.unrealengine.com/questions/248909/what-gets-installed-with-ue4prereqsetup-x64exe.html
Looking now for a file to install the same as with UE4PrereqSetup_x64.exe
Related https://forums.awsgametech.com/t/unreal-linux-dependencies/6631
The error now is this
Server process exited without calling ProcessEnding(), exitCode(127)
The error means a command is missing.
Found this Linux Server (via https://forums.awsgametech.com/t/how-to-correctly-prepare-linux-executables/1370/14), which appears to include the required files. https://github.com/zeliard/GameLift/tree/master/GameLiftLinuxServer
However, does someone know how I can extract the required files for my build? Build it first?
I would suggest remote connecting into an instance in your fleet to check the server logs to see why the server is crashing.
I still have this problem but the error
Cannot run program "/local/game/install.sh" (in directory "/local/game"): error=2, No such file or directory
Prevents GameLift Fleet from creating an Instance. How can I access this error log? I have tried the following install.sh (created in Visual Studio 2019).
#!/bin/bash chmod +x ./GameName/Binaries/Linux/GameNameServer sudo -u gl-user-server ln -sf ./GameName/Saved/Logs ./logs
or
#!/bin/bash
or no install.sh
There is no log, because the install is aborted prior to creating a game instance.
Using this Tutorial to setup Linux Server, at the end is install.sh code. https://www.youtube.com/watch?v=E5XNvFCobuE Still fails with the same error:
Cannot run program “/local/game/install.sh” (in directory “/local/game”): error=2, No such file or directory
Above error is misleading, install.sh is present at the correct directory. Thus, this appears to be a AWS GameLift bug.
aws gamelift upload-build --name GameNameServer --build-version 1.0 --build-root c:\STAGE\SERVER\LinuxServer --operating-system AMAZON_LINUX --region eu-central-1
I can create a Windows build np.
What does the directory structure of c:\STAGE\SERVER\LinuxServer
look like?
This is the default Unreal Engine folder structure (server build target).
Root files: install.sh GameNameServer.sh Manifest_DebugFiles_Linux.txt Manifest_NonUFSFiles_Linux.txt Manifest_UFSFiles_Linux.txt
Folders: Engine GameName
I think your install.sh file is formatted incorrectly and as a result it can't be read. Check the line endings on your shell file. There might be carriage return line feed characters (CRLF) if you're on Windows whereas lines in Linux files should end in only line feed characters (LF). If you create the shell script in Visual Studio Code, then that should solve it, assuming you're developing on Windows originally.
I opened the install.sh inside VS 2019, removed any spaces and cut/pasted all lines again, still after upload and setting up a fleet, same result.
Hi @REDACTEDUSER
2 suggestions:
- Create a new fleet, wait for it to go into ERROR, then SSH to your erred fleet using GetInstanceAccess (see: https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-remote-access.html), then, run
sudo su
to acquire root access, andls /local/game
to see if install.sh is there. If so, runless /local/game/install.sh
to see if you can see any abnormalities. - Try compress your server files into a zip by yourself. Ensure that it can extract to include install.sh in the root. Then, upload the build to S3 and create a build that way: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html
If these do not work, let us know your region and buildId, and we can take a look for you.
Thanks for your suggestion but the error is prior to the creation of an instance. I did not tried to upload a zip yet - in case I continue this very expensive adventure to try setting up GameLift I will consider your suggestion with uploading zipped server files.
In your AWS GameLift console's fleet events, you should get the error logs if install script fails, (though in this case, your install script wasn't even run,) Could you check your fleet events to see if there are anything else suspicious?
You might know this already, but just FYI that gamelift currently has a free tier which includes 125 hours of c5.large per month (see: https://aws.amazon.com/gamelift/pricing/). Also, you can use SPOT fleets to cut down your costs, and the only downside is that there could be a small chance of instance interruption during your development.
Relevant content
- Accepted Answerasked 3 years ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago