I'm running a game dedicated server for the Valve game Left 4 Dead 2 on my housed root server. I had one running for years back when I was still running Debian Squeeze (6, oldstable, x86_64) on my servers and wanted to set one up again now on Debian Wheezy (7, stable, multiarch x86/x86_64). When running the server I see some error messages and noone seems to be able to connect to the server.

I start the dedicated server with the following command:

sudo -u l4d2 /opt/left4dead2/srcds_run -steam_dir /opt/left4dead2/steamcmd -steamcmd_script /opt/left4dead2/left4dead2.steamcmd -autoupdate -ip -port 27016

When starting the dedicated server process I see the following lines in the output:

[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.dll.

And after some probably unrelated cable-noise-like blobs of text:

[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
dlopen failed trying to load:
/opt/left4dead2/.steam/sdk32/steamclient.so with error:
/opt/left4dead2/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory

The server is configured as a Steam Group server (I have some echo commands in the config file and know that it has been successfully loaded) and should be visible to anyone in the referenced group who is ingame. It doesn't show up, nor can I join manually by issuing the ingame command connect The respective UDP port is open on the system firewall.

Some months ago Valve replaced their hldsupdatetool utility for downloading the game server files with a new tool called SteamCMD, this tool, according to a Valve mailing list announcement, is now mandatory.

I used the following command to install the game server:

cd /opt/left4dead2
sudo -u l4d2 steamcmd/steamcmd.sh +login anonymous +force_install_dir .. +app_update 222860 validate +quit

I managed to get rid of the last three lines by creating the directories /opt/left4dead2/.steam/sdk32 and copying the steamclient.so from /opt/left4dead2/steamcmd/linux32/ to that location, which was described as a solution to the problem here. But I still cannot connect to the server at all.

I hope someone can help me with this and that Server Fault is the right place for such a problem. I didn't see any better matching Stack Exchange branch to post it on.

  • 1
    I really dislike being downvoted without hearing a reason. Please be so nice and explain what's wrong here, maybe I can fix it. – aef Jan 30 '14 at 21:33
  • I didn't downvote you, but we do not generally consider running Game servers to be within the scope of serverfault, which is primarily aimed and support systems in a professional capacity. I am not sure this would really fit on any stackexchange site. You might want to see if there are any vendor support forums. – Zoredache Jan 30 '14 at 21:48
  • 2
    I am a professional server administrator trying to host game servers. Why was this no problem here: serverfault.com/questions/88355/isa-2000-and-cod-mw2-steam and why is there even a tag for gameserver questions then? And even more important: Is there a better suited Stack Exchange branch for this to be moved to? – aef Jan 30 '14 at 21:54
  • 1
    Don't take the downvoting personally. I've noticed that the old guard on this site tend to downvote certain things, regardless of the actual value of the question. Woe unto the unwary who mention they're a developer... – jlehtinen Jan 30 '14 at 23:36
  • 1
    @Ladadadada yes, it exists after I copied it there as described. – aef Jan 31 '14 at 3:03

Googling the error gives the following:

You may get the following error when starting a Server with Linux

[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.dll.

Resolve the issue by copying steamclient.so to the ~/.steam/sdk32/steamclient.so directory

cp steamcmd/linux32/steamclient.so ~/.steam/sdk32/steamclient.so


| improve this answer | |
  • 1
    I did so, and wrote so in my question. But this didn't resolve the whole problem and especially not the error you referred to. – aef Jan 30 '14 at 21:56
  • @aef Does your service account have permissions over the new files steam cmd installed? – jlehtinen Jan 30 '14 at 23:23
  • @aef Also, if you have resolved these errors, you should note that more clearly in your question. After re-reading your question I'm left puzzled as to the state things are actually in. From your last statement, "I still cannot connect", implies that the server has started, is running, but players cannot join it. If that is accurate I would adjust the question to clarify this. – jlehtinen Jan 30 '14 at 23:33
  • 1
    I made sure the l4d2 account has at least read access to all files in /opt/left4dead2 and subfolders. – aef Jan 31 '14 at 3:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.