pelican-eggs / eggs

Service eggs for the pterodactyl panel
MIT License
2.85k stars 2.32k forks source link

[Bug]: DayZ steamcmd 2FA #1841

Closed wilroboly closed 2 years ago

wilroboly commented 2 years ago

Panel Version

1.10.1

Wings Version

1.7.0

Service

egg-dayz-experimental.json

Modified

No, I did not modify the egg

Expected Behavior

Once a request for a steam guard 2FA code, this should really only be needed once for the entire mod upload / install / update process.

Actual Behavior

Instead, the process requests the 2FA on EACH mod install. This leads to an eventual :

Logging in user '---' to Steam Public...FAILED (Rate Limit Exceeded)

Here's a snipped of the resulting issue:

[UPDATE]: Mod download/update successful!
[UPDATE]: Downloading new Mod: "DayZ-Expansion-Licensed" (2116157322)
        Mod was last updated: Sat Jul 30 11:48:24 EDT 2022
        Attempting mod update/download via SteamCMD...
WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
Redirecting stderr to '/home/container/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1660762488
-- type 'quit' to exit --
Loading Steam API...OK
Logging in user '---' to Steam Public...{code entered}
Enter the current code from your Steam Guard Mobile Authenticator app
Two-factor code:OK
Waiting for client config...OK
Waiting for user info...OK
Downloading item 2116157322 ...
Success. Downloaded item 2116157322 to "/home/container/Steam/steamapps/workshop/content/221100/2116157322" (693163549 bytes) 
        Making mod @2116157322 files/folders lowercase...
        Moving any mod .bikey files to the ~/keys/ folder...
[UPDATE]: Mod download/update successful!
[UPDATE]: Downloading new Mod: "DayZ-Expansion-Experimental" (2178159764)
        Mod was last updated: Fri Aug 26 07:16:24 EDT 2022
        Attempting mod update/download via SteamCMD...
WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
Redirecting stderr to '/home/container/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1660762488
-- type 'quit' to exit --
Loading Steam API...OK
Logging in user '---' to Steam Public...{code ENTERED again}
Enter the current code from your Steam Guard Mobile Authenticator app
Two-factor code:FAILED (Rate Limit Exceeded)
[UPDATE]: Cannot login to Steam - Improperly configured account and/or credentials
        Please contact your administrator/host and give them the following message:
        Your Egg, or your client's server, is not configured with valid Steam credentials.
        Either the username/password is wrong, or Steam Guard is not properly configured
        according to this egg's documentation/README.
container@pterodactyl~ Server marked as offline...
[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 1
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Checking server disk space usage, this could take a few seconds...
[Pterodactyl Daemon]: Updating process configuration files...
[Pterodactyl Daemon]: Ensuring file permissions are set correctly, this could take a few seconds...
container@pterodactyl~ Server marked as starting...
[Pterodactyl Daemon]: Pulling Docker container image, this could take a few minutes to complete...
Pulling from parkervcp/games 
Status: Image is up to date for ghcr.io/parkervcp/games:dayz 
Digest: sha256:1ffcf42004c635a44999dbf6f73f1a47e9249d8b670d7d20fa474f02a999c8a8 
[Pterodactyl Daemon]: Finished pulling Docker container image
[STARTUP]: Starting checks for all updates...
(It is okay to ignore any "SDL" errors during this process)
[UPDATE]: Checking for game server updates with App ID: 1042420...
WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
Redirecting stderr to '/home/container/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1660762488
-- type 'quit' to exit --
Loading Steam API...OK
Logging in user '---' to Steam Public...FAILED (Rate Limit Exceeded)

This goes on until we hit the rate limit.

Steps To Reproduce

Step 1 : install and setup DayZ Experimental Server Step 2 : On the server startup admin page, update the Steam Username and Password Step 3 : Start up the server - wait for it to hit the first 2FA request and follow it through to installation Step 4 : Boot up DayZ in steam, get a list of mods you want to use. Save that out to a file (modlist.html) and update the file on the server accordingly. Step 5 : Restart the server so it picks up the modlist Step 6 : Watch as it stops on the first mod request 2FA, enter the code, and then rinse and repeast.

Install logs

https://pteropaste.com/gbrwvb

parkervcp commented 2 years ago

Due to how long if takes to set up the install and get to a point where 2fa need to be filled would require active input during the install which pterodactyl doesn't do.

This is also true for the startup so far as i understood.

My personal recommendation is to have an account, that owns games that require users to install them, that doesn't have 2fa for this reason.

lilkingjr1 commented 2 years ago

I forgot to mention in the README of this egg that Steam Guard is required to be completely turned off, which I will fix when I have time. Each mod download is a call to SteamCMD to log in and download the mod (because a single SteamCMD call with a SteamCMD script for all the mods to download is prone to fail catastrophically if just one mod fails), which isn't an issue if Steam Guard is off (which is also recommended by Valve themselves for server hosting).

wilroboly commented 2 years ago

@lilkingjr1 This is good to know. I had no idea. Given that I do not wish to use Steam without the Guard. I'll attempt to install all the mods manually.

Thank you.