mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 14:15:59 +03:00
[GH-ISSUE #318] L4D2server script fails to find lock file #268
Labels
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#268
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @patriotgames on GitHub (Mar 17, 2015).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/318
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>&1Issuing the command
./l4d2server startthe game server starts correctly without issue and a.l4d2-server.lockfile is created in the same directory where the script andgsquery.pyexist.Issue
The
l4d2-server-script.loglocated in/home/patriot/gameservers/log/scripthas 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.lockfile, 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
@dgibbs64 commented on GitHub (Mar 17, 2015):
Hey. Can I have the output of details please and also ls -al of the main script directory.
@patriotgames commented on GitHub (Mar 17, 2015):
Hi,
Of course.
pwd
ls -a
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 Details
Distro: Ubuntu 14.04.2 LTS
Arch: x86_64
Kernel: 3.16.0-30-generic
Hostname: ubuntu
tmux: tmux 1.8
GLIBC: 2.19
Performance
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 Usage
Disk available: 3.3G
Serverfiles: 7.7G
Left 4 Dead 2 Server Details
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
Backups
No Backups created
Command-line Parameters
./srcds_run -game left4dead2 -strictportbind -ip 192.168.1.220 -port 27015 +clientport 27005 +map c5m1_waterfront +servercfgfile l4d2-server.cfg -maxplayers 8
Ports
Change ports by editing the command-line
parameters in l4d2server.
Useful port diagnostic command:
netstat -atunp | grep srcds_linux
DESCRIPTION DIRECTION PORT PROTOCOL
Status: ONLINE
@dgibbs64 commented on GitHub (Mar 17, 2015):
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.
@patriotgames commented on GitHub (Mar 17, 2015):
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
@dgibbs64 commented on GitHub (Mar 17, 2015):
No attachments listed
@patriotgames commented on GitHub (Mar 17, 2015):
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 monitorand not from the automated process.@dgibbs64 commented on GitHub (Mar 17, 2015):
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
@patriotgames commented on GitHub (Mar 17, 2015):
Done.
./l4d2server startand running process confirmed in htop and hlsw..l4d2-server.lockfileMar 17 15:00:02 l4d2-server: Monitor: Disabled: No lock file foundConsole logging disabled: Bug in tmux 1.8 breaks logging Currently installed: tmux 1.8./l4d2server stopdoes nothing./l4d2server restartreports:[ INFO ] Starting l4d2-server: ubuntu test is already runningbut does not restart the server../l4d2server validate-restartsuccessfully validates all files, but will not restart the server:[ INFO ] Starting l4d2-server: ubuntu test is already runningquitin rcon it is not restarted by the monitoring process.That's all I can do at this point.
Patriot
@marvinlehmann commented on GitHub (May 26, 2015):
@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
904df3a3b9on 15th April. So please update and try again =)@patriotgames commented on GitHub (May 26, 2015):
@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
@dgibbs64 commented on GitHub (May 26, 2015):
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.
@dgibbs64 commented on GitHub (Jun 22, 2015):
Closing. If more help required please re open
@lock[bot] commented on GitHub (Jul 19, 2018):
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.