pterodactyl / images

Generic docker images designed to work with Pterodactyl Panel and its daemon.
https://pterodactyl.io
MIT License
49 stars 182 forks source link

Improve the rust image's wrapper #55

Closed TrixterTheTux closed 4 years ago

TrixterTheTux commented 4 years ago

This PR improves the rust wrapper by piping stdout and stderr of the rust process into the console, allowing the user to see what is happening during the server load. It also allows the server to be stopped in the middle of its startup, and shows error message about RCON not being in a ready state when attempting to run commands before the process is ready to accept them.

I've also pushed quay.io/trixterthetux/pterodactyl-eggs:rust for easy testing.

Josh5K commented 4 years ago

In the last 3-4 days I have been using quay.io/trixterthetux/pterodactyl-eggs:rust to help debug some startup issues.

The container was crashing constantly about every 1-3 hours. There was no oxide/rust errors before the crash and the container had plenty of resources. After switching back to quay.io/parkervcp/pterodactyl-images:game_rust the crashes stopped.

Each crash is exiting with a null exit code and appears to be coming from this newly added section.

gameProcess.on('exit', function (code, signal) {
    exited = true;

    console.log("Game process exited with code " + code + ".");
    process.exit(code);
});

Is it possible the gameProcess being tracked isn't a process that is present through the entire rust server lifecycle?

TrixterTheTux commented 4 years ago

I've commented out the process.exit() line, modified the exit code message (to easily be able to check if the image got updated) and pushed a new build of the image. You'll need to rebuild the server container for the changes to apply. Could you test if it works fine now?

Josh5K commented 4 years ago

No crashes in the last 24 hours.

steak-sauce commented 4 years ago

Hi, trying to use the updated egg, but I for some reason the container will only download 366MB of the needed files. A working Rust server is using 5GB+.

I am able to spin up the default rust container and other game servers work as well, and this one did work for a few days, but no such luck now.

[info] Server marked as STARTING [info] Your server container needs to be rebuilt. This should only take a few seconds, but could take a few minutes. You do not need to do anything else while this occurs. Your server will automatically continue with startup once this process is completed. [info] Server marked as STOPPING [info] Server marked as OFF [info] Rebuilding server container... [info] New container built, rotating hamsters... [info] Container is being initialized... [info] Completed rebuild process for server. Server is now booting. [info] Server marked as STARTING [info] Checking size of server data directory... [info] Disk Usage: 366M / 10240M [info] Ensuring file permissions. [info] Running server preflight. [info] Starting server container. 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... [----] Download complete. [----] Installing update... [----] Extracting package... [----] Verifying installation... [ 0%] Downloading update... [ 0%] Checking for available updates... [----] Download complete. [----] Extracting package... Steam Console Client (c) Valve Corporation -- type 'quit' to exit -- Loading Steam API...OK. Connecting anonymously to Steam Public...Logged in OK Waiting for user info...OK Update state (0x3) reconfiguring, progress: 0.00 (0 / 0) Update state (0x11) preallocating, progress: 7.57 (358160990 / 4730108181) Error! App '258550' state is 0x602 after update job. :/home/container$ ./RustDedicated -batchmode +server.port 29170 +server.identity rust +rcon.port 29171 +rcon.web true +server.hostname "A Rust Server" +server.level "Procedural Map" +server.description "" +server.url "" +server.headerimage "" +server.worldsize "3000" +server.seed "" +server.maxplayers 40 +rcon.password "CHANGEME" +server.saveinterval 60 Starting Rust... /bin/sh: 1: ./RustDedicated: not found Game process exited with code 127 [not exiting from parent process] Waiting for RCON to come up... Waiting for RCON to come up... Waiting for RCON to come up... Waiting for RCON to come up... Waiting for RCON to come up...

parkervcp commented 4 years ago

The important part here is not that it is stuck there but thie line /bin/sh: 1: ./RustDedicated: not found

You game didn't install properly.

steak-sauce commented 4 years ago

Clearly :). The question is why does this container not download (and thus install) the game properly.

If there are other logs you would like to see, I'm happy to provide them, or give you an account to test with.

parkervcp commented 4 years ago

This is not the place for general like this, discord is.

It's not an egg issue. It's a steam install issue. Specifically state is 0x602 after update job. 0x602 could be lots of things.

If you read the logs you would have been able to find all of these errors.

Greenus commented 4 years ago

Work, nice, How do I hide these system messages? so that they can not be seen, what should be corrected in the wrapper? Initialize engine version: 2019.2.0f1 (20c1667945cf) [XR] Discovering subsystems at path /home/container/RustDedicated_Data/UnitySubsystems Forcing GfxDevice: Null GfxDevice: creating device client; threaded=0 Missing shader in effect - Hurt (UnityStandardAssets.ImageEffects.VignetteAndChromaticAberration) (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35) WARNING: Shader Unsupported: 'Hidden/Nature/Terrain/Utilities' - Setting to default shader. Shader 'Nature/Terrain/Diffuse': dependency 'AddPassShader' shader 'Hidden/TerrainEngine/Splatmap/Diffuse-AddPass' not found Shader 'Hidden/TerrainEngine/Splatmap/Standard-AddPass': fallback shader 'Hidden/TerrainEngine/Splatmap/Diffuse-AddPass' not found Requested RenderTexture format R8 UNorm (5) is not supported on this platform, using RGBA8 UNorm (8) fallback format (Filename: ./Runtime/Graphics/RenderTexture.cpp Line: 800) To display only the normal server load without any unnecessary messages. The example above indicated. Thank you for your help!

TrixterTheTux commented 4 years ago

Those are the default messages shown by the server, which the wrapper has no control over. You can always disable the changes by building your own image without the modifications introduced in this PR if you want it to only have "Waiting for RCON..." messages.

Greenus commented 4 years ago

Those are the default messages shown by the server, which the wrapper has no control over. You can always disable the changes by building your own image without the modifications introduced in this PR if you want it to only have "Waiting for RCON..." messages.

I understood, I here want that process of loading of the server was displayed, but without these superfluous messages system, process of loading of the server Rust: Loading Prefab Bundle 0%, Asset Warmup (1111/5923), Asset Warmup (2755/5923) in such format. Is it possible to do this? If Yes, you can share how I can do it. Thanks for the answer!

TrixterTheTux commented 4 years ago

You'd want to write something to filter them out I guess? But I don't see the point in doing that myself as those messages are still part of the server's startup process.

Greenus commented 4 years ago

You'd want to write something to filter them out I guess? But I don't see the point in doing that myself as those messages are still part of the server's startup process.

I want to display the normal process of loading the server. As it was before. Is it possible to do this?

Greenus commented 4 years ago

You'd want to write something to filter them out I guess? But I don't see the point in doing that myself as those messages are still part of the server's startup process.

Yes, filter make messages to system messages such as:

Missing shader in effect-Water (UnityStandardAssets.ImageEffects.BlurOptimized) (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35) Set current directory to /home/container Found path: /home/container/RustDedicated Waiting for RCON to come up... Mono path[0] = '/home/container/RustDedicated_Data/Managed' Mono config path = '/home/container/RustDedicated_Data/MonoBleedingEdge/etc' Preloaded 'libRakNet.so' Preloaded 'libRustNative.so' eac_server.so [x64] :: OnLoad() Preloaded 'libeac_server.so' Preloaded 'libeasyanticheat.so' Preloaded 'libsteam_api.so' Preloaded 'libsteam_api.so' Preloaded 'steamclient.so' Unable to preload the following plugins: libRenderer.so Initialize engine version: 2019.2. 0f1 (20c1667945cf) [XR] Discovering subsystems at path /home/container/RustDedicated_Data/UnitySubsystems Forcing GfxDevice: Null GfxDevice: creating device client; threaded=0 NullGfxDevice: Version: NULL 1.0 [1.0] Renderer: Null Device Vendor: Unity Technologies Begin MonoManager ReloadAssembly

  • Completed reload, in 2.733 seconds WARNING: Shader Unsupported: 'Hidden/Internal-ScreenSpaceShadows' - Pass " shader has no vertex WARNING: Shader Unsupported: 'Hidden/Internal-ScreenSpaceShadows' - Pass " shader has no vertex

Not displayed when loading. Can you help?