Unreal Engine 4.25 dedicated server failed to initialize Steam API (Linux server)


I have an Unreal project with version 4.23 and I’m trying to migrate it to 4.25. The code part is all set correctly and I can package it as Linux with the cross-compile tool, but the trouble comes when I launch the server: Initializing Steam API always fail! :frowning:

Firstly, I had an issue wih the fleet, it changed its state from ACTIVATING to ERROR throwing an exitCode = 1, which I discovered it was caused because of the glibc version in the Ubuntu 20.04, where I had recompiled the GameliftServerSDK .so, was newer than the one that is used in AmazonLinux2 instances, so I recompiled it again using Ubuntu 18.04 and that fixed that error (hurray!).

Now my fleet instance is created without errors and its state pass to ACTIVE, BUT (and its a huge but) Steam API is failing to initialize every time. I’ve ssh’d inside the instance and checked the logs and it shows the following lines:

LogOnline: OSS: Creating online subsystem instance for: Steam LogSteamShared: Warning: Steam Dedicated Server API failed to initialize. LogOnline: STEAM: [AppId: 0] Game Server API initialized 0 LogOnline: Warning: STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable. LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown() LogOnline: Warning: STEAM: Steam API failed to initialize! LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown() LogOnline: OSS: Unable to create OnlineSubsystem module Steam LogOnline: OSS: Creating online subsystem instance for: NULL LogOnline: OSS: TryLoadSubsystemAndSetDefault: Loaded subsystem for module [NULL]

I’ve checked the Binaries folder as well and the only different that I can find with the instances of 4.23 is that the there is no steam_appid.txt inside the folder next to the server binary. I know this file is needed for the server to know the my steam app id and it need to be placed there, so I’ve checked what has been uploaded to the build, and it says clearly that the steam_appid.txt is in it and in the correct folder.

I’ve been fighting against this for weeks now and I have run out of ideas :confused: so any help would be really appreciated. I’ve tried to create manually the steam_app.txt file and restart the process inside the instance and that cause an error as well. I’ve checked my DefaultEngine.ini a thousand times and I can’t see anything missing in there. So my only thought now is that it might be a problem with the steamSDK version or even Unreal 4.25. I know that Unreal 4.23 uses steamworks 1.42 and Unreal 4.25 uses the sdk version 1.47 but I think that everything about steamwork sdk is well configure in the project.

Does anyone have an idea about what could be wrong?

…send help…pls…

did you check if the linux server executable linked to steam.so correctly? did you try to use ldd to check? did you check its run path in elf?

there is a good gamelift plugin too. it will save your time compiling linux server libraries. Gamelift with Blueprints (AWS) in Code Plugins - UE Marketplace

Hi Lion! Thanks for the answer, I was starting to lose faith…

So if checked the linked with ldd and the ouptup shows me this:
linux-vdso.so.1 (0x00007ffee3bfd000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa89ee55000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fa89ec51000)
librt.so.1 => /lib64/librt.so.1 (0x00007fa89ea49000)
libApexFrameworkPROFILE.so => /local/game/HomeGame/Binaries/Linux/./../../../Engine/Binaries/ThirdParty/PhysX3/Linux/x86_64-unknown-linux-gnu/libApexFrameworkPROFILE.so (0x00007fa89e72b000)
libNvParameterizedPROFILE.so => /local/game/HomeGame/Binaries/Linux/./../../../Engine/Binaries/ThirdParty/PhysX3/Linux/x86_64-unknown-linux-gnu/libNvParameterizedPROFILE.so (0x00007fa89e4c2000)
libfmodL.so => /local/game/HomeGame/Binaries/Linux/./../../Plugins/FMODStudio/Binaries/Linux/x86_64/libfmodL.so (0x00007fa89e0bc000)
libfmodstudioL.so => /local/game/HomeGame/Binaries/Linux/./../../Plugins/FMODStudio/Binaries/Linux/x86_64/libfmodstudioL.so (0x00007fa89dc75000)
libaws-cpp-sdk-gamelift-server.so => /local/game/HomeGame/Binaries/Linux/./../../Plugins/GameLiftServerSDK/ThirdParty/GameLiftServerSDK/Linux/x86_64-unknown-linux-gnu/libaws-cpp-sdk-gamelift-server.so (0x00007fa89d6a6000)
libsteam_api.so => /local/game/HomeGame/Binaries/Linux/./../../../Engine/Binaries/ThirdParty/Steamworks/Steamv147/x86_64-unknown-linux-gnu/libsteam_api.so (0x00007fa89d43a000)
libm.so.6 => /lib64/libm.so.6 (0x00007fa89d0fa000)
libc.so.6 => /lib64/libc.so.6 (0x00007fa89cd4f000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa89f073000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa89cb39000)
libApexCommonPROFILE.so => /local/game/HomeGame/Binaries/Linux/./../../../Engine/Binaries/ThirdParty/PhysX3/Linux/x86_64-unknown-linux-gnu/libApexCommonPROFILE.so (0x00007fa89c8b9000)
libApexSharedPROFILE.so => /local/game/HomeGame/Binaries/Linux/./../../../Engine/Binaries/ThirdParty/PhysX3/Linux/x86_64-unknown-linux-gnu/libApexSharedPROFILE.so (0x00007fa89c5b9000)
libRenderDebugPROFILE.so => /local/game/HomeGame/Binaries/Linux/./../../../Engine/Binaries/ThirdParty/PhysX3/Linux/x86_64-unknown-linux-gnu/libRenderDebugPROFILE.so (0x00007fa89c378000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fa89bff6000)

So for what I understand, the libsteam_api.so is correctly linked. Indeed, I’ve compared it with a 4.23 instance that is running fine and they show exactly the same.
The rpath in elf seems to be fine as well. Again, I’ve done the comparison and both 4.25 and 4.23 provide the same output… so that makes me think it’s correct too…

As I was doing comparisons between both instances I’ve seen that in the logs of the 4.23 instance this messages about SteamSDK shows up before creating the online subsystem instance for Steam
LogOnline: Display: STEAM: Loading Steam SDK 1.42
LogOnline: STEAM: libsteam_api.so is linked explicitly and should be already loaded.

About the plugin I don’t think I need that, my compiling times are just fine but thanks :slight_smile:

can libsteam_api.so find its dependencies? did you try ldd -d lib steam_api.so?