Gamelift 5.1.1 on Linux server crash

1

When trying to start Unreal Engine Linux server, the server crash with libcrypto.so.3!UnknownFunction This happens on local and remote fleets.

Unreal Engine version 5.2.1 (source) AWS SDK version 5.1.1 Binaries compiled successfully for Win64 and Linux - Win64 is working, Linux isn't.

Linux System I used to compile the SDK binaries and run the server: Ubuntu 22.04.2LTS OpenSSL 3.0.2 15 Mar 2022 libcrypto.so.3 and libssl.so.3 are with the server.

There are no docs on how to compile for Linux so I used this video as info: https://youtu.be/BEfow18dvCA?si=JU5t_P2enVcxkQjI Also, the actual docs for the windows version containing errors in the code example. extra bracket in:

 //The Host/compute-name of the GameLift Anywhere instance.
    if (FParse::Value(FCommandLine::Get(), TEXT("-hostid="), serverParameters.m_hostId))
**]**    {
        UE_LOG(GameServerLog, Log, TEXT("HOST_ID: %s"), *serverParameters.m_hostId)
    }

and GetCurrentProcessId() will not compile for Linux, you will need to change that to FGenericPlatformProcess::GetCurrentProcessId()

//The PID of the running process
serverParameters.m_processId = FString::Printf(TEXT("%d"), GetCurrentProcessId());

Any help on how to get this working for Linux or ideas on what can be the problem source will be extremely valuable for us. Thank you!

  • Hi YogevN, were you able to resolve this?

YogevN
asked 7 months ago705 views
3 Answers
0

Hey YogevN,

For C++ SDK without using Unreal, you can just have the .so files with the Server executable. But with Unreal Engine you need to build the C++ SDK using the same version of OpenSSL that was used by Unreal Engine. UE5.1 uses OpenSSL1.1.n, but if you're on a different version you can double-check the version of OpenSSL by looking for the following log line from the UE packaging output window: "LogInit: - supports SSL with OpenSSL/1.1.1n".

Then, download the same version of OpenSSL from https://www.openssl.org/source/old/1.1.1/

$ cd ~/openssl-1.1.1n; ./config; make
$ mkdir lib
$ cp libcrypto.so.1.1 libssl.so.1.1 lib/
$ cd ~/GameLift-Cpp-ServerSDK-5.1.0/; mkdir out
$ export OPENSSL_ROOT_DIR=/home/ec2-user/openssl-1.1.1n/
$ export OPENSSL_LIBRARIES=/home/ec2-user/openssl-1.1.1n/lib/
$ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -S . -B ./out -DBUILD_FOR_UNREAL=1
$ cd out; make

Place the generated libaws-cpp-sdk-gamelift-server.so in <UnrealProject>\Plugins\GameLiftServerSDK\ThirdParty\GameLiftServerSDK\Linux\x86_64-unknown-linux-gnu. This is where Unreal links to the C++ SDK from during compilation and packaging. Detailed instructions on setting up the plugin can be found here.

After packaging the game server for Linux, copy over the .so files for OpenSSL into the package bundle. Your folder structure should finally look like:

-<Game>
--install.sh
--<MyUnrealProjectServer>.sh (This is the target .sh file that is generated by Unreal itself)
--<Game>\<MyUnrealProject>\Plugins\GameLiftServerSDK\ThirdParty\GameLiftServerSDK\Linux\x86_64-unknown-linux-gnu\
   --libaws-cpp-sdk-gamelift-server.so
   --libcrypto.so.1.1
   --libssl.so.1.1
AWS
answered 7 months ago
  • Thank you for the response. I tried the mitigation, but unfortunately, this version of the SDK can't be compiled with openssl-1.1.1n, when using the SDK built with the '3.x' version, the SDK is still looking for libcrypto.so.3, so that doesn't help that I got the so.1.1 version there.

    Still the same fatal error: 0x00007fb0917c4da0 libcrypto.so.3!UnknownFunction(0x3e4da0)

    Let me know if you need more info. Thank you

  • Just wanted to say I am experiencing the exact same issue here as the original poster. The mitigation did not work.

  • Thanks for the feedback here! I've updated my initial answer to be a bit more descriptive with the steps required to build the SDK with openssl-1.1.1n. Could you give it a shot and see if that helps the issues you're hitting while building with openssl-1.1.1n. With libssl(libcrypto).so.3 there is a version conflict with openssl-1.1.1n that is statically linked by Unreal into the game server executable. Building (and bundling) the SDK with the same version of openssl (openssl-1.1.1n) should help mitigate the problem.

    If you're still facing issues building the SDK with openssl-1.1.1n, could you help provide a more detailed error message or log that we could help resolve?

  • Thank you for updating the instructions above. Unfortunately, I am getting the following make errors:

    CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.22/Modules/FindOpenSSL.cmake:574 (find_package_handle_standard_args) CMakeLists.txt:10 (find_package)

    It looks like the exports are setup correctly: (from $ export) declare -x OPENSSL_LIBRARIES="/home/<username>/openssl-1.1.1n/lib/" declare -x OPENSSL_ROOT_DIR="/home/<username>/openssl-1.1.1n/"

    It looks like the files are in the correct locations, and everything is setup properly. Should I also install openssl (missing from the instructions above)?

    Thank you! Yogev

  • Hi there! So this is still an issue for me. I'm using Unreal Engine 5.3 and Amazon GameLift Plugin v1.0.0, which contains the GameLift Server CPP SDK 5.1.0. Windows Server works fine, Linux Server on Ubuntu 22.04.2LTS crashes with libcrypto.so.3!UnknownFunction. I've tried the suggested solution step for step, revalidated it multiple times, checked with 2 different projects, same issue.

    Any suggestions? Can we maybe get precompiled binaries for Linux and Win64 for the GameLift Server SDK? I'm sure I'm doing it right, but I still suspect this step to be problematic.

    Best regards, David

0

Even the standalone plugin for Unreal does not have the Linux files. https://github.com/aws/amazon-gamelift-plugin-unreal/tree/main/GameLiftPlugin

How are we supposed to use Linux servers if you can't build the Linux files (or at least there is no documentation on how to do it) and you don't give us them?

answered 4 months ago
0

Having the same issue, I managed to get the openssl-1.1 and libcrypto.so.1.1 files from the source engine. But the build is still failing with the The server process did not call InitSDK() within the time expected ERROR. Any help on how to get this is valuable. Also, can someone explain to me how you get the debug files from the fleet that is not ACTIVATED PROPERLY? When I try to aws SSM start-session in the terminal after I get all the keys and tokens needed I get the following error. An error occurred (TargetNotConnected) when calling the StartSession operation: i-08f6a5596be878c82 is not connected Please don't answer this question with some generic link that will be old docs on how to shh into your Linux fleet, I already tried this. Give me some more advanced approaches on how to properly debug fleet activation process.

Dino
answered 3 months 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