Left4DevOps / l4d2-docker

L4D2 Server Docker Image
28 stars 9 forks source link

Steam API error when trying to start #9

Closed Kevin-Luke closed 2 months ago

Kevin-Luke commented 2 months ago

When running the Quickstart (or any) example, the server does not start. An error is thrown:

[S_API FAIL] SteamAPI_Init() failed; create pipe failed.Looking up breakpad interfaces from steamclient

This started happening yesterday evening. I have not been able to launch this dockerimage or derivatives anywhere.

I have tried two separate Linux Ubuntu systems. A MacOS system. A friends MacOS system in a different global location.

All three throw identical errors.

hazmeister commented 2 months ago

That message is written by Valve looks a lot scarier than it is. All it means is that steam is not currently running, it should connect shortly afterward.

Here’s what my startup looks like:

Server will auto-restart if there is a crash.
Updating server using Steam.
----------------------------
tid(16) burning pthread_key_t == 0 so we never use it
Redirecting stderr to '/home/louis/Steam/logs/stderr.txt'
Logging directory: '/home/louis/Steam/logs'
minidumps folder is set to /tmp/dumps
[  0%] Checking for available updates...
[----] Verifying installation...
UpdateUI: skip show logoSteam Console Client (c) Valve Corporation - version 1709846822
-- type 'quit' to exit --
Loading Steam API...OK
force_install_dir /home/louis/l4d2

Connecting anonymously to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
app_update 222860
Success! App '222860' already up to date.
quit
----------------------------
Setting breakpad minidump AppID = 222860
Using breakpad crash handler
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API] SteamAPI_Init(): Loaded '/home/louis/.steam/sdk32/steamclient.so' OK.
#Using shader api: bin/shaderapiempty_srv.so
#
#Console initialized.
#Using breakpad minidump system
tid(36) burning pthread_key_t == 0 so we never use it
#Game_srv.so loaded for "Left 4 Dead 2"
Server is hibernating
ConVarRef test_progression_loop doesn't point to an existing ConVar
[S_API FAIL] SteamAPI_Init() failed; create pipe failed.Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
[S_API] SteamAPI_Init(): Loaded local 'steamclient.so' OK.
CAppInfoCacheReadFromDiskThread took 2 milliseconds to initialize
Setting breakpad minidump AppID = 550
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Setting breakpad minidump AppID = 222860

Are you running the game at home or on a cloud server?

Are you running L4D or L4D2?

Can you ‘docker pull’ the latest image?

Kevin-Luke commented 2 months ago

To answer your questions: I am running left4dead2 Ive tried with steam running and without. I've tried running from local linux and local macos and a friends macos in a different region.

This was working fine about 2 days ago. Youre supposed to get an IP in the logs and it will start broadcasting over the port. As you have shown, thats not happening.

I will be running this from AWS eventually.

I tried a full purge and re pull of the image and my friend had never pulled it before and experienced the same issue.

Kevin-Luke commented 2 months ago

I tried pulling latest and rerunning with: docker run --name l4d2-lan \ --network host \ -e LAN=true \ left4devops/l4d2

Still no difference. Server doesn't start:

>     --network host \
>     -e LAN=true \
> left4devops/l4d2
Server will auto-restart if there is a crash.
Updating server using Steam.
----------------------------
tid(16) burning pthread_key_t == 0 so we never use it
Redirecting stderr to '/home/louis/Steam/logs/stderr.txt'
Logging directory: '/home/louis/Steam/logs'
minidumps folder is set to /tmp/dumps
[  0%] Checking for available updates...
[----] Verifying installation...
[  0%] Downloading update...
[  0%] Checking for available updates...
[----] Download complete.
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching Steamcmd...
UpdateUI: skip show logosteamcmd.sh[11]: Restarting steamcmd by request...
tid(29) burning pthread_key_t == 0 so we never use it
Redirecting stderr to '/home/louis/Steam/logs/stderr.txt'
Logging directory: '/home/louis/Steam/logs'
minidumps folder is set to /tmp/dumps
[  0%] Checking for available updates...
[----] Verifying installation...
UpdateUI: skip show logoSteam Console Client (c) Valve Corporation - version 1709846822
-- type 'quit' to exit --
Loading Steam API...OK
force_install_dir /home/louis/l4d2

Connecting anonymously to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
app_update 222860
Success! App '222860' already up to date.
quit
----------------------------
Setting breakpad minidump AppID = 222860
Using breakpad crash handler
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API] SteamAPI_Init(): Loaded '/home/louis/.steam/sdk32/steamclient.so' OK.
#Using shader api: bin/shaderapiempty_srv.so
#
#Console initialized.
#Using breakpad minidump system
tid(49) burning pthread_key_t == 0 so we never use it
#Game_srv.so loaded for "Left 4 Dead 2"
Server is hibernating
ConVarRef test_progression_loop doesn't point to an existing ConVar
[S_API FAIL] SteamAPI_Init() failed; no appID found.
Either launch the game from Steam, or put the file steam_appid.txt containing the correct appID in your game folder.
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
[S_API] SteamAPI_Init(): Loaded local 'steamclient.so' OK.
CAppInfoCacheReadFromDiskThread took 2 milliseconds to initialize
Setting breakpad minidump AppID = 550
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Setting breakpad minidump AppID = 222860

LAN mode says i don't need Steam running.. How would I host this on an external cloud instance if thats the case?

EDIT: With steam started, this still occurs.

hazmeister commented 2 months ago

I think the message you're expecting to see is only printed to the logs after someone connects from a lobby. That log output looks basically the same as mine. Although you have:

[S_API FAIL] SteamAPI_Init() failed; no appID found.

it's followed a few lines later by

[S_API] SteamAPI_Init(): Loaded local 'steamclient.so' OK.

Which means Steam is running inside the container. Let's start from the beginning:

Can you try running run:

docker run -d --name l4d2 -p 27015:27015/tcp  -p 27015:27015/udp  left4devops/l4d2
docker logs -f l4d2

Which will run the server in bridge mode. Then if you can open Steam on the same machine, open the Server Browser from View > Game Servers in the Steam client. Switch to LAN mode and you should see the server listed.

image

If that's working, you should be able to try connecting from another machine on your LAN, or if you have the ports forwarded on your router, someone should be able to connect remotely.

If all that works, try again with host networking. Host networking is experimental on macOS and windows in the latest docker release, you'll need to ensure it you're running the latest version and make sure it's turned on in docker settings.

Kevin-Luke commented 2 months ago

Thanks for your explanation and update of the readme. With your example, I was able to connect using host networking. I got confused because I seem to remember seeing an IP broadcast prior to starting the game, but my guess is it was after I'd opened L4D2.

Sorry for the silly issue. Consider it resolved.

Is there a recommended way of running remote on AWS?

hazmeister commented 2 months ago

No worries, I'm planning more updates, including DoS recommendations and ready to launch cloud templates.

Have you used opentofu, terraform cdk or cloud formation before? I have a terraform template nearly ready to share.

If you want to run really cheaply on AWS, the secret is to not run your server 24/7, just when you want to play. My current setup uses an auto scaling group with rules to power off daily at 4am. It only powers on when I manually update the auto scaling group. ECS is then used to deploy the docker container. Means I can start the server from my phone.

But if you just want something running you can go less enterprise and spin up an ec2 instance in a public subnet and run docker directly on there. Make sure you open your game port on the security group.

You can get the game running on a t3a.small, which is probably the cheapest instance you can get away with running the game on. Use a c6a.large if you afford it as it'll have a better CPU.

IPs on Amazon cost $4 whilst in use, so if you are powering off your server, I'd recommend setting the steam group in the config, so you don't have to worry about which IP you're using.

Amazon have some DoS protection, so I'm testing if the game lags out when running with no other protection. Played a short campaign uninterrupted last night, so initially things look promising. Let me know what how you get on.