Gamelift server build: File at path <path>/server.x86_64 is not executable

0

A zip file from S3 bucket contains the game server files. A build was created with that zip file. A fleet was created from that build. The fleet's Events tab has following events:

Extracting build:

Extracted files from build: /local/game/gameliftminimal2/server.x86_64

SERVER_PROCESS_INVALID_PATH

File at path /local/game/gameliftminimal2/server.x86_64 is not executable

The log file shows:

Searched for one valid path in the following list: /local/game/gameliftminimal2/server.x86_64

Found a path: /local/game/gameliftminimal2/server.x86_64

The server is created with Unity 2022.3.5 (LTS) linux headless server build. I've used the same exact build on a stand alone EC2 instance with amazon linux 2 and it started without problems. However on gamelift fleet the error says it's not an executable file.

I've used unity headless builds on two other products that have been running without issues for some years.

How to proceed?

EDIT: Similar thread: https://repost.aws/questions/QUL03gIv5ITkmo2TNlFrcVNw/gamelift-unity-managed-linux-error-x86-64-is-not-executable

asked a month ago39 views
2 Answers
1
Accepted Answer

Server is created on windows. Windows does not have the concept of "permission to execute" as far as I know.

Perhaps the problem is that I'm using S3 bucket which requires a zip file for the build. Unzipping that file probably applies some default set of permissions on the executable, making it not allowed to execute by low-access ec2-user? I will try to use AWS CLI instead which takes a folder and uploads it so it will not be unzipped and will not receive unusable permissions on the fleet instance. Will see if this helps.

This S3 workflow not working on windows suggests that it wasn't tested with linux builds that originate from Unity on Windows.

Edit: replacing the S3 bucket with AWS CLI upload-build command bypassed the file permission issue successfully. The S3 bucket appears to not be able to run a linux build that is created on windows due to file permission limitations!

answered a month ago
profile picture
EXPERT
reviewed a month ago
0

This issue is likely related to file permissions on your game server executable. When creating a build for Amazon GameLift, it's crucial to ensure that the executable file has the correct permissions set, particularly the execute permission.

To resolve this issue, you should take the following steps:

  1. Before zipping and uploading your build files to S3, make sure to set the correct permissions on your server executable. You can do this by using the chmod command on a Linux system. For example:

    chmod +x server.x86_64

  2. After setting the permissions, create a new zip file with the updated permissions.

  3. Upload this new zip file to your S3 bucket.

  4. Create a new build in GameLift using this updated zip file.

  5. Create a new fleet using the new build.

It's worth noting that sometimes, security updates or company policies can affect file permissions. In your case, it seems that your company may have run some security updates that locked permissions on your server files. Always check and set the appropriate permissions before creating your build package.

If the issue persists after following these steps, you may want to:

  1. Validate your build locally using Amazon GameLift Local before uploading to GameLift.

  2. Double-check your Unity build settings to ensure you're building for Linux (x86_64) with the "Server Build" option checked.

  3. Review the GameLift fleet creation logs for more detailed error messages.

  4. Ensure that your launch path and parameters in the GameLift fleet configuration are correctly set to point to your executable.

If you continue to experience issues, consider reaching out to AWS support for more specialized assistance.
Sources
Gamelift - Unity Managed Linux error: ".x86_64 is not executable" | AWS re:Post
Package your game build files - Amazon GameLift
Create a build from a file directory - Amazon GameLift

profile picture
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions