Closed patriotgames closed 9 years ago
Hey. Can I have the output of details please and also ls -al of the main script directory.
Hi, Of course. pwd
/home/patriot/gameservers
ls -a
. .. functions gsquery.py l4d2server .l4d2-server.lock log serverfiles steamcmd
Output for details is attached. I've just found that running ./l4d2-server monitor on a crashed game server correctly recognizes that the server is not running and then restarts it. However, if I then run ./l4d2-server stop the command is ignored and the server keeps running.
Let me know if I can test anything else for you or provide additional details. Cheers,
Patriot
From: Daniel Gibbs [mailto:notifications@github.com] Sent: Tuesday, March 17, 2015 1:43 PM To: dgibbs64/linuxgameservers Cc: patriotgames Subject: Re: [linuxgameservers] L4D2server script fails to find lock file (#318)
Hey. Can I have the output of details please and also ls -al of the main script directory.
— Reply to this email directly or view https://github.com/dgibbs64/linuxgameservers/issues/318#issuecomment-82589782 it on GitHub. https://github.com/notifications/beacon/AHlAajaXxgg8hlthWt1x_qPdMt1zNe8Oks5n2IlhgaJpZM4DwQKH.gif
patriot@ubuntu:~/gameservers$ ./l4d2server details loading fn_details...OK loading fn_details_distro...OK
Distro: Ubuntu 14.04.2 LTS Arch: x86_64 Kernel: 3.16.0-30-generic Hostname: ubuntu tmux: tmux 1.8 GLIBC: 2.19
Uptime: 0d, 0h, 56m Avg Load: 0.00, 0.01, 0.05
Mem: total used free Physical: 2.0G 621M 1.3G Swap: 2.0G 0B 2.0G
Disk available: 3.3G Serverfiles: 7.7G
Server name: ubuntu test Server IP: 192.168.1.220:27015 RCON password: 12345 Status: ONLINE
Service name: l4d2-server User: patriot Location: /home/patriot/gameservers Config file: /home/patriot/gameservers/serverfiles/left4dead2/cfg/l4d2-server.cfg
No Backups created
./srcds_run -game left4dead2 -strictportbind -ip 192.168.1.220 -port 27015 +clientport 27005 +map c5m1_waterfront +servercfgfile l4d2-server.cfg -maxplayers 8
Change ports by editing the command-line parameters in l4d2server.
Useful port diagnostic command: netstat -atunp | grep srcds_linux
DESCRIPTION DIRECTION PORT PROTOCOL
Game/RCON INBOUND 27015 tcp/udp < Client OUTBOUND 27005 udp
Status: ONLINE
There is nothing obvious causing the issue. All servers use the same function for stop that simply kills off the tmux session. The only note is that tmux 1.8 does have issues with logging. It may also be useful to see the script logs when the issue happened.
Hi,
Script and console logs attached. Console log says there is a bug with tmux 1.8...
Cheers,
Patriot
From: Daniel Gibbs [mailto:notifications@github.com] Sent: Tuesday, March 17, 2015 2:10 PM To: dgibbs64/linuxgameservers Cc: patriotgames Subject: Re: [linuxgameservers] L4D2server script fails to find lock file (#318)
There is nothing obvious causing the issue. All servers use the same function for stop that simply kills off the tmux session. The only note is that tmux 1.8 does have issues with logging. It may also be useful to see the script logs when the issue happened.
— Reply to this email directly or view https://github.com/dgibbs64/linuxgameservers/issues/318#issuecomment-82602103 it on GitHub. https://github.com/notifications/beacon/AHlAaudnILbZuI8kgFKstTysU6G9NQr_ks5n2I-7gaJpZM4DwQKH.gif
No attachments listed
l4d2-server-console.log Console logging disabled: Bug in tmux 1.8 breaks logging Currently installed: tmux 1.8
l4d2-server-script.log Mar 17 13:43:42 l4d2-server: Starting: Started ubuntu test Mar 17 13:45:01 l4d2-server: Monitor: ubuntu test Mar 17 13:45:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:48:01 l4d2-server: Monitor: ubuntu test Mar 17 13:48:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:51:01 l4d2-server: Monitor: ubuntu test Mar 17 13:51:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:54:01 l4d2-server: Monitor: ubuntu test Mar 17 13:54:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:57:01 l4d2-server: Monitor: ubuntu test Mar 17 13:57:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 14:00:01 l4d2-server: Monitor: ubuntu test Mar 17 14:00:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 14:03:01 l4d2-server: Monitor: ubuntu test Mar 17 14:03:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 14:06:01 l4d2-server: Monitor: ubuntu test Mar 17 14:06:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 14:09:01 l4d2-server: Monitor: ubuntu test Mar 17 14:09:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 14:15:01 l4d2-server: Monitor: ubuntu test Mar 17 14:15:02 l4d2-server: Monitor: Disabled: No lock file found
l4d2-server-script-17-03-2015-13-43-37.log Mar 17 12:53:34 l4d2-server: Starting: Started ubuntu test Mar 17 12:54:01 l4d2-server: Monitor: ubuntu test Mar 17 12:54:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 12:57:01 l4d2-server: Monitor: ubuntu test Mar 17 12:57:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:00:01 l4d2-server: Monitor: ubuntu test Mar 17 13:00:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:03:01 l4d2-server: Monitor: ubuntu test Mar 17 13:03:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:06:01 l4d2-server: Monitor: ubuntu test Mar 17 13:06:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:09:01 l4d2-server: Monitor: ubuntu test Mar 17 13:09:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:12:01 l4d2-server: Monitor: ubuntu test Mar 17 13:12:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:15:01 l4d2-server: Monitor: ubuntu test Mar 17 13:15:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:18:01 l4d2-server: Monitor: ubuntu test Mar 17 13:18:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:21:01 l4d2-server: Monitor: ubuntu test Mar 17 13:21:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:24:01 l4d2-server: Monitor: ubuntu test Mar 17 13:24:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:27:01 l4d2-server: Monitor: ubuntu test Mar 17 13:27:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:30:01 l4d2-server: Monitor: ubuntu test Mar 17 13:30:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:33:01 l4d2-server: Monitor: ubuntu test Mar 17 13:33:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:36:01 l4d2-server: Monitor: ubuntu test Mar 17 13:36:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:39:02 l4d2-server: Monitor: ubuntu test Mar 17 13:39:03 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:42:01 l4d2-server: Monitor: ubuntu test Mar 17 13:42:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:43:37 l4d2-server: Monitor: ubuntu test Mar 17 13:43:38 l4d2-server: Monitor: Checking session: CHECKING Mar 17 13:43:39 l4d2-server: Monitor: Checking session: FAIL Mar 17 13:43:40 l4d2-server: Monitor: Monitor is starting ubuntu test Mar 17 13:43:40 l4d2-server: Starting: ubuntu test Mar 17 13:43:41 l4d2-server: Starting: Rotating log files
The check near the end of the last log output was from running ./l4d2-server monitor
and not from the automated process.
I cannot see any reason why you are getting an issue. Kill the server make sure the lock file is removed . start the server and check a lock file is there then test the monitor again
Done.
./l4d2server start
and running process confirmed in htop and hlsw..l4d2-server.lock
fileMar 17 15:00:02 l4d2-server: Monitor: Disabled: No lock file found
Console logging disabled: Bug in tmux 1.8 breaks logging Currently installed: tmux 1.8
./l4d2server stop
does nothing./l4d2server restart
reports:
[ INFO ] Starting l4d2-server: ubuntu test is already running
but does not restart the server../l4d2server validate-restart
successfully validates all files, but will not restart the server:
[ INFO ] Starting l4d2-server: ubuntu test is already running
quit
in rcon it is not restarted by the monitoring process.That's all I can do at this point.
Patriot
@patriotgames Do you still encounter this issue or is it working when you update to the latest version? (delete functions directory)
And the parameter 'validate-restart' was merged with 'update-restart' in commit 904df3a3b92560b0f517997367e42d99f06712b3 on 15th April. So please update and try again =)
@xFaNaTiix
I've not tested the newest scripts since running these older testes on the latest Ubuntu and Debian distros. In fact, both of my dedicated servers are running Ubuntu 12.04.5 LTS specifically to avoid the potential bug documented above. And then there is the Tmux 1.8 issue that as far as I know still exists for lgsm in the latest release of these distros.
The lgsm scripts running on my servers are an older version that I customized to fit my needs (e.g. running multiple servers under one user account, imbedding rcon password in server start up line, etc.)
When I have some time, I can install another virtual machine and run the tests again using the latest script release with Deb 8 and Ubuntu 14.
Patriot
I can confirm that Ubuntu 14.10 uses tmux 1.9. Also there is a link about upgrading tmux on 14.04 LTS
http://stackoverflow.com/questions/25940944/ugrade-tmux-from-1-8-to-1-9-on-ubuntu-14-04
I'm hoping that upgrading your script may resolve the issue.
Closing. If more help required please re open
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Background
Testing your latest L4D2server script on two different VMs, one with a fresh install of Ubuntu Server 14.04.2 LTS and the other with a fresh install of Debian 8 Jessie amd64. All required 32-bit libraries and other packages were installed per your instructions at:
http://danielgibbs.co.uk/lgsm/l4d2server/
L4D2server script completes the Initial game server installation without issue. Script functions (start, stop, restart, update, validate, etc.) all work correctly.
Automated monitoring setup by downloading
gsquery.py
(by script during initial installation) and a new cron job created for 3 minute checks:*/3 * * * * /home/patriot/gameservers/l4d2server monitor > /dev/null 2>&1
Issuing the command
./l4d2server start
the game server starts correctly without issue and a.l4d2-server.lock
file is created in the same directory where the script andgsquery.py
exist.Issue
The
l4d2-server-script.log
located in/home/patriot/gameservers/log/script
has these entries:Mar 17 13:21:01 l4d2-server: Monitor: ubuntu test Mar 17 13:21:02 l4d2-server: Monitor: Disabled: No lock file found Mar 17 13:24:01 l4d2-server: Monitor: ubuntu test Mar 17 13:24:02 l4d2-server: Monitor: Disabled: No lock file found
and yet the lock file clearly exists. Debian 8 produces the same results in its script log.
Result
Because the script fails to find the
.l4d2-server.lock
file, the game server monitoring process does not work and if the game server is forced to crash with the rcon commandquit
, the server is not restarted by the cron job.This is the only issue I've found with your latest script. If you are able to resolve it the script seems very solid.
Thank you for all of your hard work developing these scripts and for making them available to the community free of charge.
Cheers, Patriot