thorkseng / pi4valheim

experimental Docker file to run a Valheim server in a Raspberry Pi4
16 stars 12 forks source link

I want to see the server container's output #9

Closed GocasPT closed 1 year ago

GocasPT commented 1 year ago

I followed all the steps you indicated and everything went well. But my friend and I are setting up the server to automatically restart when the Raspberry Pi restarts, but it takes a long time to restart, and it is forced to close. We don't know if it's saving anything in the process. One way to know if it's saving would be to have the output, which should exist because it appears when executed on another machine. But we don't know how to do it. Do you have any tips or commands for this?

thorkseng commented 1 year ago

You can see the console with the docker command to get the logs:

docker logs valheim

if you want to see the logs in real time you can add the --follow flag (you can stop view with control + c):

docker logs --follow valheim

GocasPT commented 1 year ago

Ok thanx, but now I don't now if is ruining (correctly) when I do that command Output:

############################## Basic variables running box64: BOX64_LD_LIBRARY_PATH: ./linux64:/root/steam/linux32:$BOX64_LD_LIBRARY_PATH BOX64_LOG: 1 BOX64_TRACE_FILE: /root/valheim_data/output.log BOX64_TRACE: 1 ############################## ############################## Final Valheim parameters to run: -nographics -batchmode -name SERVERNAME -port 2456 -world SERVERWORLD -password PASSWORD -savedir /root/valheim_data -public 0 -logFile /root/valheim_data/log.txt -saveinterval 1800 -backups 4 -backupshort 7200 -backuplong 43200 ##############################

Note: I "censure" the server info for obvious reason xD

thorkseng commented 1 year ago

For the output you show, it should be run correctly. I think you have more information that in the log (when it starts is really long long with the load of some other libraries). Is this all the output that you got of the "docker logs valheim" command?

GocasPT commented 1 year ago

Yes, just that

GocasPT commented 1 year ago

And this is in the log.txt in the directory _/root/valheimdata

Mono path[0] = '/root/valheim_server/valheim_server_Data/Managed' Mono config path = '/root/valheim_server/valheim_server_Data/MonoBleedingEdge/etc' Preloaded 'libsteam_api.so' Unable to preload the following plugins: libparty.so PlayerPrefs - Creating folder: /root/.config/unity3d/IronGate PlayerPrefs - Creating folder: /root/.config/unity3d/IronGate/Valheim Unable to load player prefs Initialize engine version: 2020.3.33f1 (915a7af8b0d5) [Subsystems] Discovering subsystems at path /root/valheim_server/valheim_server_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

The shader Hidden/Dof/DepthOfFieldHdr (UnityEngine.Shader) on effect Main Camera (UnityStandardAssets.ImageEffects.DepthOfField) is not supported on this platform! The image effect Main Camera (UnityStandardAssets.ImageEffects.DepthOfField) has been disabled as it's not supported on the current platform. The shader Hidden/SunShaftsComposite (UnityEngine.Shader) on effect Main Camera (UnityStandardAssets.ImageEffects.SunShafts) is not supported on this platform! The shader Hidden/SimpleClear (UnityEngine.Shader) on effect Main Camera (UnityStandardAssets.ImageEffects.SunShafts) is not supported on this platform! The image effect Main Camera (UnityStandardAssets.ImageEffects.SunShafts) has been disabled as it's not supported on the current platform. 03/03/2023 01:32:07: Game server connected 03/03/2023 01:32:07: Starting music menu 03/03/2023 01:32:07: UI Group status changed Menu = True

Unloading 19 unused Assets to reduce memory usage. Loaded Objects now: 135870. Total: 523.763240 ms (FindLiveObjects: 43.733482 ms CreateObjectMapping: 48.304944 ms MarkObjects: 417.887093 ms DeleteObjects: 13.551185 ms)

Unloading 6 Unused Serialized files (Serialized files now loaded: 0) UnloadTime: 218.902018 ms HDR Render Texture not supported, disabling HDR on reflection probe. HDR Render Texture not supported, disabling HDR on reflection probe. 03/03/2023 01:32:13: Using default prefs 03/03/2023 01:32:13: isModded: False 03/03/2023 01:32:13: Zonesystem Awake 435 03/03/2023 01:32:13: DungeonDB Awake 435 03/03/2023 01:32:13: Registering lobby 03/03/2023 01:32:13: Worldgenerator version setup:2 03/03/2023 01:32:25: Audioman already exist, destroying self

Unloading 100 unused Assets to reduce memory usage. Loaded Objects now: 140376. Total: 634.822111 ms (FindLiveObjects: 42.595537 ms CreateObjectMapping: 49.107944 ms MarkObjects: 522.713667 ms DeleteObjects: 20.401592 ms)

03/03/2023 01:33:18: Zonesystem Start 435 03/03/2023 01:33:23: Added 3 locations, 0 vegetations, 0 environments, 0 biome env-setups, 0 clutter from locations_cp1 03/03/2023 01:33:23: Added 1 locations, 0 vegetations, 1 environments, 0 biome env-setups, 0 clutter from locations_mountaincaves 03/03/2023 01:33:23: Added 27 locations, 25 vegetations, 5 environments, 1 biome env-setups, 3 clutter from locations_mistlands 03/03/2023 01:33:24: DungeonDB Start 435 03/03/2023 01:33:28: ZRpc timeout set to 30s 03/03/2023 01:33:28: Load world: Escolinha (Escolinha) 03/03/2023 01:33:28: Loading 696924 zdos , my id 2997900641 data version:29 03/03/2023 01:34:15: Loaded 100000 dead zdos 03/03/2023 01:34:15: Removed 0 OLD generated ZDOS 03/03/2023 01:34:16: Loaded 10072 locations 03/03/2023 01:34:16: Unloading unused assets Unloading 9 Unused Serialized files (Serialized files now loaded: 0) The shader Hidden/Dof/DepthOfFieldHdr (UnityEngine.Shader) on effect Main Camera (UnityStandardAssets.ImageEffects.DepthOfField) is not supported on this platform! The image effect Main Camera (UnityStandardAssets.ImageEffects.DepthOfField) has been disabled as it's not supported on the current platform. The shader Hidden/SunShaftsComposite (UnityEngine.Shader) on effect Main Camera (UnityStandardAssets.ImageEffects.SunShafts) is not supported on this platform! The shader Hidden/SimpleClear (UnityEngine.Shader) on effect Main Camera (UnityStandardAssets.ImageEffects.SunShafts) is not supported on this platform! The image effect Main Camera (UnityStandardAssets.ImageEffects.SunShafts) has been disabled as it's not supported on the current platform.

thorkseng commented 1 year ago

I will test the docker again in my pi and get back you more information.

thorkseng commented 1 year ago

I think you need more patience. I have compiled from zero the dockerfile and run the server. It takes several minutes to startup it, but it works fine, and I was able to connect to play on the server. You need to wait until the startup finished.

You can check it here: image

Also, I have upload a new docker image in the docker hub with the last release.

GocasPT commented 1 year ago

Wel... when i ask the time as bigger xP Now i restart the docker command and have the same problem

image

thorkseng commented 1 year ago

Yes, the execution seems fine. Did you have access to play in the server? Did you check the logs of /root/valheim_data/log.txt?

I you want check it open a new connection to the pi4 and use the command "docker exec -it valheim bash" to enter in the bash of the valheim container, then you can read the /root/valheim_data/log.txt, you can use the next command to check continuous the log with the next one: "tail -f -n 100 /root/valheim_data/log.txt"

It takes several minutes to be enabled to accept connections. I checked on my ip with the default world.env values and works fine with the last version of Valheim (vanilla version/ no mods)

GocasPT commented 1 year ago

Ok, now i have the "true" console logger of the server. Thanks man image

thorkseng commented 1 year ago

I am happy 👍

Last point. You can change the env.world as you wish. If you remove the log line, it should send the alert.log to the docker console standard output.