ich777 / docker-steamcmd-server

Simple Dockerfile that installs steamcmd and a selected game server
127 stars 101 forks source link

Question: How do i use the console/ where do i see the logs of the server? #32

Closed hofq closed 1 year ago

hofq commented 1 year ago

Hey There,

i have setup a gmod server using your docker image. Sadly it gets somehow stuck in the start process. Where can i find the logs/ can i somehow attach to the srcds binary to run commands/ see what's wrong?

the logs in docker only show this with no inidcator whats missing. grafik

ich777 commented 1 year ago

@hofq on what platform do you run Gmod? Are you sure that your binaries are up to date? If you are running the container on Unraid make sure that you are using the real file path (/mnt/cache/... or /mnt/diskX/...) instead of the FUSE file path (/mnt/user/...).

EDIT: is there a crash or is it restarting? If not the server seems to be running.

hofq commented 1 year ago

instead of the FUSE file path (/mnt/user/...).

okay, so i am currently using the fuse path for steamcmd, but have selected the real path for the gameserver.

Is there a way to see if the server is running successfully/ if it is failing on some point? the Terminal does not Restart, so i see the message in the scr on top forever. (I've left it that way over night.)

Edit: i'm on Unraid. my container runs your Gmod Template on Unraid.

ich777 commented 1 year ago

so i am currently using the fuse path for steamcmd

This should be no issue, since steamcmd will/should always work on the FUSE path, only the game files have to be on the real path.

Have you yet tried to add the Gmod server in the Steam Server Browser (View -> Server Browser -> Favorites -> Add -> enter your LANIP:PORT -> and press Refresh twice).

I'm not sure if Gmod has some additional logs since I've put this together a long time ago but I don't think so. I have now also tried it and without changing anything in the template it shows just up fine in the Steam Server Browser and I can connect to it fine.

hofq commented 1 year ago

No, sadly it does not show up. Just the following message get's displayed:

image

same in Gmod and with the direct connect link (steam://connect/IP:PORT)

ich777 commented 1 year ago

On what Unraid version are you?

hofq commented 1 year ago

6.11.5

ich777 commented 1 year ago

Did you change any of the port settings or something else in the template? Do you try it with your local IP or your public IP? I even can see it in the LAN tab. Do you maybe have some weird network configuration of some sort with VLANs or anything like that?

Here is the log from the first start and a few screenshots: gmod.txt

grafik grafik grafik

hofq commented 1 year ago

no, i have not.


<Container version="2">
  <Name>GarrysMod</Name>
  <Repository>ich777/steamcmd:garrysmod</Repository>
  <Registry>https://hub.docker.com/r/ich777/steamcmd/</Registry>
  <Network>bridge</Network>
  <MyIP/>
  <Shell>sh</Shell>
  <Privileged>false</Privileged>
  <Support>https://forums.unraid.net/topic/79530-support-ich777-gameserver-dockers/</Support>
  <Project>https://www.steampowered.com/</Project>
  <Overview>This Docker will download and install SteamCMD. It will also install Garry's Mod and run it.&#xD;
&#xD;
ATTENTION: First Startup can take very long since it downloads the gameserver files!&#xD;
&#xD;
Update Notice: Simply restart the container if a newer version of the game is available.&#xD;
&#xD;
You can also run multiple servers with only one SteamCMD directory!</Overview>
  <Category>GameServers:</Category>
  <WebUI/>
  <TemplateURL/>
  <Icon>https://raw.githubusercontent.com/ich777/docker-templates/master/ich777/images/garrysmod.png</Icon>
  <ExtraParams>--restart=unless-stopped</ExtraParams>
  <PostArgs/>
  <CPUset/>
  <DateInstalled>1676144014</DateInstalled>
  <DonateText>If you like my work please </DonateText>
  <DonateLink>https://www.paypal.me/chips777</DonateLink>
  <Requires/>
  <Config Name="SteamCMD" Target="/serverdata/steamcmd" Default="" Mode="rw" Description="" Type="Path" Display="always" Required="true" Mask="false">/mnt/ssd-cache/appdata/steamcmd</Config>
  <Config Name="ServerFiles" Target="/serverdata/serverfiles" Default="" Mode="rw" Description="" Type="Path" Display="always" Required="true" Mask="false">/mnt/ssd-cache/appdata/garrysmod</Config>
  <Config Name="GAME_ID" Target="GAME_ID" Default="" Mode="" Description="The GAME_ID that the container download at startup.&#13;&#10;(https://developer.valvesoftware.com/wiki/Dedicated_Servers_List)" Type="Variable" Display="always" Required="true" Mask="false">4020</Config>
  <Config Name="GAME_NAME" Target="GAME_NAME" Default="" Mode="" Description="Game name to start (is connected to the GAME_PARAMS)." Type="Variable" Display="always" Required="true" Mask="false">garrysmod</Config>
  <Config Name="GAME_PARAMS" Target="GAME_PARAMS" Default="" Mode="" Description="Enter your start up commands for the server." Type="Variable" Display="always" Required="false" Mask="false">-secure +maxplayers 45 +map ttt_old_factory +sv_setsteamaccount XXXXXXXXXXXXXXXXXXXXXXXXXXXX+gamemode terrortown +host_workshop_collection XXXXXXXXX</Config>
  <Config Name="Validate Installation" Target="VALIDATE" Default="" Mode="" Description="Set the Variable to 'true' if you want to validate the installation otherwise leave it blank." Type="Variable" Display="always-hide" Required="false" Mask="false"/>
  <Config Name="UDP" Target="27015" Default="" Mode="udp" Description="UDP Gameport (if you need another port, please delete this entry and create a new UDP Port with the required port number, also don't forget to click an 'Show more settings ...' and change the port number" Type="Port" Display="always" Required="true" Mask="false">27015</Config>
  <Config Name="TCP RCON" Target="27015" Default="" Mode="tcp" Description="TCP RCON Port (not required)" Type="Port" Display="always" Required="false" Mask="false">27015</Config>
  <Config Name="Steam-Username" Target="USERNAME" Default="" Mode="" Description="Your Steam username goes here if you want to install a game that needs a valid account, otherwise leave it blank (ATTENTION: You have to disable Steam Guard)." Type="Variable" Display="advanced-hide" Required="false" Mask="false"/>
  <Config Name="Steam-Password" Target="PASSWRD" Default="" Mode="" Description="Your Steam password goes here if you want to install a game that needs a valid account, otherwise leave it blank (ATTENTION: You have to disable Steam Guard)." Type="Variable" Display="advanced-hide" Required="false" Mask="true"/>
  <Config Name="GAME_PORT" Target="GAME_PORT" Default="" Mode="" Description="" Type="Variable" Display="advanced" Required="true" Mask="false">27015</Config>
  <Config Name="UID" Target="UID" Default="" Mode="" Description="" Type="Variable" Display="advanced-hide" Required="true" Mask="false">99</Config>
  <Config Name="GID" Target="GID" Default="" Mode="" Description="" Type="Variable" Display="advanced-hide" Required="true" Mask="false">100</Config>
</Container>
ich777 commented 1 year ago

Please change the GAME_PARAMS to the default values and try again, I think something is wrong there.

hofq commented 1 year ago

oh yes, there is. Is there a way to get the logs from the binary like when i start the server on a host directly instead of running it in the container? i seriously have no clue what could be the issue

ich777 commented 1 year ago

oh yes, there is. Is there a way to get the logs from the binary like when i start the server on a host directly instead of running it in the container?

I really don't know, the logs from Docker should reflect that what the binaries spit out when you start the server for example on bare metal.

These are the default GAME_PARAMS: -secure +maxplayers 12 +map gm_flatgrass

hofq commented 1 year ago

yes, i know. they work very well.

on my servers on windows-basis i get a feed in the logs, that shows how the server installs all the workshop contents and shows errors. i just don't understand why the container doesn't do it so i can find the error in my conf/ setup

ich777 commented 1 year ago

on my servers on windows-basis i get a feed in the logs, that shows how the server installs all the workshop contents and shows errors. i just don't understand why the container doesn't do it so i can find the error in my conf/ setup

I don't know if it works the same on Linux as on Windows because these two systems are completely different and AFAIK on Linux most workshop commands doesn't work properly on other game servers or at least they are different.

EDIT: So if you use the default startup parameters it is working as expected. Please don't forget that I only can support the basic functionality from the container and modding is always up to the user.

hofq commented 1 year ago

i just looked into the Workshop part from Facepunch wiki: https://wiki.facepunch.com/gmod/Linux_Dedicated_Server_Hosting#startingtheserver

Looks like its possible to do it on linux like i did. Sadly adding the parameter and doing on the watch on the filesize reveals that nothing seems to be changed.

ich777 commented 1 year ago

Sadly enough I really can't help with that, I would recommend that you create a thread for that on the facepunch forums (if they have one). I'm really not into Gmod but AFAIK a user back then in the support thread on the Unraid forums was able to add workshop contents but I can't remember how he did it (I think he downloaded the content on his PC an moved it over to the Docker).

hofq commented 1 year ago

The error was in my Workshop Collection. I had to setup a server on windows to see the error log. wired Workaround, but i fixed it