ich777 / docker-steamcmd-server

Simple Dockerfile that installs steamcmd and a selected game server
119 stars 95 forks source link

tail: invalid PID: '' #22

Closed dkcas11 closed 2 years ago

dkcas11 commented 2 years ago

Hey, i'm getting an error with a missing PID, al though for the first part of startup the PID is found. It looks like some PID is not passed along. Any idea how to fix this? Running on macOS 12.3 Monterey, Docker 4.6.1, Compose 2.3.3.

Im using docker compose, my config looks like this:

---
version: "2"
services:
    vrising:
        image: ich777/steamcmd:vrising
        container_name: vrising
        environment:
          - GAME_ID=1829350
          - SERVER_NAME='V Rising Docker'
          - WORLD_NAME='world1'
          - UID=501
          - GID=20
        volumes:
          - ~/v-rising-server/steamcmd:/serverdata/steamcmd
          - ~/v-rising-server/vrising:/serverdata/serverfiles
        ports:
          - 9876-9877:9876-9877/udp

This is the output:

[+] Running 1/0
 ⠿ Container vrising  Created                                                                                                                                                   0.0s
Attaching to vrising
vrising  | ---Ensuring UID: 501 matches user---
vrising  | usermod: no changes
vrising  | ---Ensuring GID: 20 matches user---
vrising  | usermod: no changes
vrising  | ---Setting umask to 000---
vrising  | ---Checking for optional scripts---
vrising  | ---No optional script found, continuing---
vrising  | ---Taking ownership of data...---
vrising  | ---Starting...---
vrising  | ---Update SteamCMD---
vrising  | Redirecting stderr to '/serverdata/Steam/logs/stderr.txt'
vrising  | [  0%] Checking for available updates...
vrising  | [----] Verifying installation...
vrising  | Steam Console Client (c) Valve Corporation - version 1653101151
vrising  | -- type 'quit' to exit --
vrising  | Loading Steam API...OK
vrising  | 
vrising  | Connecting anonymously to Steam Public...OK
vrising  | Waiting for client config...OK
vrising  | Waiting for user info...OK
vrising  | ---Update Server---
vrising  | Redirecting stderr to '/serverdata/Steam/logs/stderr.txt'
vrising  | [  0%] Checking for available updates...
vrising  | [----] Verifying installation...
vrising  | Steam Console Client (c) Valve Corporation - version 1653101151
vrising  | -- type 'quit' to exit --
vrising  | Loading Steam API...OK
vrising  | "@sSteamCmdForcePlatformType" = "windows"
vrising  | 
vrising  | Connecting anonymously to Steam Public...OK
vrising  | Waiting for client config...OK
vrising  | Waiting for user info...OK
vrising  | Success! App '1829350' already up to date.
vrising  | ---Checking if WINE workdirectory is present---
vrising  | ---WINE workdirectory found---
vrising  | ---Checking if WINE is properly installed---
vrising  | ---WINE properly set up---
vrising  | ---Checking for old display lock files---
vrising  | ---Server ready---
vrising  | ---Start Server---
vrising  | tail: invalid PID: ‘’

after that the license is posted following a "Terminated" line.

dkcas11 commented 2 years ago

I tried to add PID=501 to my compose file and that removed the error line. However the license is still printed following vrising exited with code 0. So for some reason the server just shuts down itself.

ich777 commented 2 years ago

@dkcas11 It's only tested to work on Linux for now.

I've never seen this issue but it seems like that V-Rising don't start on your system and that's why you get this message.

I tried to add PID=501

This isn't the solution to this because the container looks for the PID from VRisingServer.exe (because it's always another one) and it seems like that on OSX something is borked with the PIDs see this line here in conjunction with line 5 from this file produces this message.

ich777 commented 2 years ago

@dkcas11 is the log folder created in the main directory from the container, if yes, what is in the logs?

dkcas11 commented 2 years ago

Aha, that makes somewhat sense, though i don't know why the PID is empty from that. Yea the PID env var was just to see where the PID might get picked up from since i couldn't find it. The log couldn't be created the first time i start the container, so i had to make the folder and file myself. It got written to, however its only licenses as thats what is printed just before the termination.

-------------------------------------------------------------------------------
Open Font License
-------------------------------------------------------------------------------

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL

-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded, 
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

-------------------------------------------------------------------------------
FIOLEX MEPHISTO v.1.0 - 03/2008
-------------------------------------------------------------------------------

*****************************************************************

(c) 2008 Fiolex Software - www.fiolex.com

LICENSE
-------

The Font is Freeware, both for personal and commercial use.
It may be freely copied and redistributed "as it is" and FOR FREE.
Please include this Readme-file to all downloads.
Link and credit are welcome, but not requested.
Sublicensing and resell not allowed without prior agreement.

CONTACT
-------

For further information contact us at: info@fiolex.com

-------------------------------------------------------------------------------
Steamworks.NET 15.0.1 - 02 May 2021
-------------------------------------------------------------------------------

The MIT License (MIT)

Copyright (c) 2013-2021 Riley Labrecque

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

-------------------------------------------------------------------------------
Lidgren.Network gen3 - 22 Aug 2015
-------------------------------------------------------------------------------

The MIT License (MIT)

Copyright (c) 2015 lidgren

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

-------------------------------------------------------------------------------
Newtonsoft.Json - 25 Jul 2013
-------------------------------------------------------------------------------

The MIT License (MIT)

Copyright (c) 2007 James Newton-King

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-------------------------------------------------------------------------------
source-rcon-library - 19 May 2022
-------------------------------------------------------------------------------

MIT License

Copyright (c) 2018 Julien H.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
ich777 commented 2 years ago

The log couldn't be created the first time i start the container, so i had to make the folder and file myself. It got written to, however its only licenses as thats what is printed just before the termination.

Then I think it simply won't work on OSX, TBH I've never seen such a file in the log folder with that contents...

It is maybe caused because WINE won't work fully on OSX that I use in this container. Sorry these are just guesses because I'm not too familiar with OSX.

dkcas11 commented 2 years ago

Thats fair, maybe you knew what was up. Im gonna dig into the problem a little, now that you've pointed me in the direction of the issue

ich777 commented 2 years ago

Can this be closed or do you investigate further? I also got a few users on the Unraid forums with that issue, they haven't responded yet to my questions.

dkcas11 commented 2 years ago

I ran out of time yesterday to look more into it. I wanted to try and change the command in the script without forking the repo, but i couldn't find it locally. I did end up writing a command that grabs the PID of a process my its name:

ps -A | grep Finder | awk '{print $1}' | head -n 1

I might try and fork the repo and give it a shot later today. You can close the issue if you like.

ich777 commented 2 years ago

@dkcas11 I will close this for now, feel free to open it up again or contact me if you got new information about this.