Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: cs2server. Monitor will fail when server is actually on. Then it will send quit and restart server. #4575

Open
tk1114632 opened this issue May 10, 2024 · 2 comments

Comments

@tk1114632
Copy link

tk1114632 commented May 10, 2024

User story

Need help to fix.

Game

cs2server

Linux distro

Ubuntu 22.04

Command

command: monitor

Further information

Monitor will fail when server is actually on. Then it will send quit and restart server.

Log shows: "PIDS with old type tmux session are running." What is it meaning?

image

Relevant log output

Script log:

May 02 20:33:19.085 cs2server-2: MONITOR: INFO: Checking session: CHECKING
May 02 20:33:19.297 cs2server-2: MONITOR: ERROR: Checking session: ERROR
May 02 20:33:19.298 cs2server-2: MONITOR: ERROR: Checking session: PIDS with old type tmux session are running
May 02 20:33:19.298 cs2server-2: MONITOR: ERROR: Checking session: Killing session with the session name cs2server-2
May 02 20:33:20.971 cs2server-2: STOP: INFO: Graceful: sending "quit"
May 02 20:33:25.678 cs2server-2: STOP: PASS: Graceful: sending "quit": OK: 3 seconds
May 02 20:33:26.182 cs2server-2: STOP: INFO: tmux kill-session: cs2server-2: Flaming Rose
May 02 20:33:27.289 cs2server-2: STOP: PASS: Stopped Flaming Rose
May 02 20:33:28.327 cs2server-2: START: INFO: Using anonymous Steam login
May 02 20:33:29.036 cs2server-2: START: INFO: Rotating log files

Steps to reproduce

  1. crontab: * * * * * ~/cs2server-X m
  2. After server runs for random period, server is restarted by monitor.
@vg2808
Copy link

vg2808 commented Aug 18, 2024

I also came across such a mistake.. Any fix?

@mayersgamer
Copy link

mayersgamer commented Nov 8, 2024

me too , server restart with same error when using 2 instances with the same installation
i have set monitor to verify every 2 minutes so i think i will remove it because its causing the restart.

Nov 08 17:34:07.865 cs2server: MONITOR: PASS: Querying port: gsquery: 31.56.0.68:27015 : 1 : OK
Nov 08 17:34:07.869 cs2server: MONITOR: INFO: LinuxGSM version: v24.3.2
Nov 08 17:34:07.871 cs2server: MONITOR: PASS: core_exit.sh exiting with code: 0
Nov 08 17:36:02.697 cs2server: MONITOR: PASS: Using cached IP as public IP address
Nov 08 17:36:03.592 cs2server: MONITOR: PASS: Using cached IP as public IP address
Nov 08 17:36:05.148 cs2server: MONITOR: INFO: Checking session: CHECKING
Nov 08 17:36:05.361 cs2server: MONITOR: PASS: Checking session: OK
Nov 08 17:36:05.363 cs2server: MONITOR: INFO: gamedig is not installed
Nov 08 17:36:05.364 cs2server: MONITOR: INFO: https://docs.linuxgsm.com/requirements/gamedig
Nov 08 17:36:06.868 cs2server: MONITOR: INFO: Querying port: gsquery: 31.56.0.68:27015 : 1 : QUERYING
Nov 08 17:36:07.092 cs2server: MONITOR: PASS: Querying port: gsquery: 31.56.0.68:27015 : 1 : OK
Nov 08 17:36:07.097 cs2server: MONITOR: INFO: LinuxGSM version: v24.3.2
Nov 08 17:36:07.099 cs2server: MONITOR: PASS: core_exit.sh exiting with code: 0
Nov 08 17:38:02.009 cs2server: MONITOR: PASS: Using cached IP as public IP address
Nov 08 17:38:03.204 cs2server: MONITOR: PASS: Using cached IP as public IP address
Nov 08 17:38:04.757 cs2server: MONITOR: INFO: Checking session: CHECKING
Nov 08 17:38:04.971 cs2server: MONITOR: PASS: Checking session: OK
Nov 08 17:38:04.974 cs2server: MONITOR: INFO: gamedig is not installed
Nov 08 17:38:04.976 cs2server: MONITOR: INFO: https://docs.linuxgsm.com/requirements/gamedig
Nov 08 17:38:06.481 cs2server: MONITOR: INFO: Querying port: gsquery: 31.56.0.68:27015 : 1 : QUERYING
Nov 08 17:38:06.705 cs2server: MONITOR: PASS: Querying port: gsquery: 31.56.0.68:27015 : 1 : OK
Nov 08 17:38:06.711 cs2server: MONITOR: INFO: LinuxGSM version: v24.3.2
Nov 08 17:38:06.712 cs2server: MONITOR: PASS: core_exit.sh exiting with code: 0
Nov 08 17:40:02.818 cs2server: MONITOR: PASS: Using cached IP as public IP address
Nov 08 17:40:03.542 cs2server: MONITOR: PASS: Using cached IP as public IP address
Nov 08 17:40:05.094 cs2server: MONITOR: INFO: Checking session: CHECKING
Nov 08 17:40:05.309 cs2server: MONITOR: PASS: Checking session: OK
Nov 08 17:40:05.311 cs2server: MONITOR: INFO: gamedig is not installed
Nov 08 17:40:05.313 cs2server: MONITOR: INFO: https://docs.linuxgsm.com/requirements/gamedig
Nov 08 17:40:06.816 cs2server: MONITOR: INFO: Querying port: gsquery: 31.56.0.68:27015 : 1 : QUERYING
Nov 08 17:40:07.042 cs2server: MONITOR: PASS: Querying port: gsquery: 31.56.0.68:27015 : 1 : OK
Nov 08 17:40:07.048 cs2server: MONITOR: INFO: LinuxGSM version: v24.3.2
Nov 08 17:40:07.049 cs2server: MONITOR: PASS: core_exit.sh exiting with code: 0
Nov 08 17:42:02.083 cs2server: MONITOR: PASS: Using cached IP as public IP address
Nov 08 17:42:02.790 cs2server: MONITOR: PASS: Using cached IP as public IP address
Nov 08 17:42:04.339 cs2server: MONITOR: INFO: Checking session: CHECKING
Nov 08 17:42:04.552 cs2server: MONITOR: PASS: Checking session: OK
Nov 08 17:42:04.554 cs2server: MONITOR: INFO: gamedig is not installed
Nov 08 17:42:04.555 cs2server: MONITOR: INFO: https://docs.linuxgsm.com/requirements/gamedig
Nov 08 17:42:06.059 cs2server: MONITOR: INFO: Querying port: gsquery: 31.56.0.68:27015 : 1 : QUERYING
Nov 08 17:42:06.281 cs2server: MONITOR: PASS: Querying port: gsquery: 31.56.0.68:27015 : 1 : OK
Nov 08 17:42:06.286 cs2server: MONITOR: INFO: LinuxGSM version: v24.3.2
Nov 08 17:42:06.287 cs2server: MONITOR: PASS: core_exit.sh exiting with code: 0
Nov 08 17:44:02.767 cs2server: MONITOR: PASS: Using cached IP as public IP address
Nov 08 17:44:03.501 cs2server: MONITOR: PASS: Using cached IP as public IP address
Nov 08 17:44:05.052 cs2server: MONITOR: INFO: Checking session: CHECKING
Nov 08 17:44:05.266 cs2server: MONITOR: PASS: Checking session: OK
Nov 08 17:44:05.268 cs2server: MONITOR: INFO: gamedig is not installed
Nov 08 17:44:05.270 cs2server: MONITOR: INFO: https://docs.linuxgsm.com/requirements/gamedig
Nov 08 17:44:06.773 cs2server: MONITOR: INFO: Querying port: gsquery: 31.56.0.68:27015 : 1 : QUERYING
Nov 08 17:44:06.999 cs2server: MONITOR: PASS: Querying port: gsquery: 31.56.0.68:27015 : 1 : OK
Nov 08 17:44:07.003 cs2server: MONITOR: INFO: LinuxGSM version: v24.3.2
Nov 08 17:44:07.005 cs2server: MONITOR: PASS: core_exit.sh exiting with code: 0
Nov 08 17:46:01.875 cs2server: MONITOR: PASS: Using cached IP as public IP address
Nov 08 17:46:02.541 cs2server: MONITOR: PASS: Using cached IP as public IP address
Nov 08 17:46:04.095 cs2server: MONITOR: INFO: Checking session: CHECKING
Nov 08 17:46:04.309 cs2server: MONITOR: ERROR: Checking session: ERROR
Nov 08 17:46:04.310 cs2server: MONITOR: ERROR: Checking session: PIDS with old type tmux session are running
Nov 08 17:46:04.312 cs2server: MONITOR: ERROR: Checking session: Killing session with the session name cs2server
Nov 08 17:46:04.389 cs2server: RESTART: PASS: Using cached IP as public IP address
Nov 08 17:46:04.998 cs2server: STOP: PASS: Using cached IP as public IP address
Nov 08 17:46:05.567 cs2server: STOP: PASS: Using cached IP as public IP address
Nov 08 17:46:06.107 cs2server: STOP: INFO: Graceful: sending "quit"
Nov 08 17:46:10.819 cs2server: STOP: PASS: Graceful: sending "quit
Nov 08 17:46:11.820 cs2server: START: PASS: Using cached IP as public IP address
Nov 08 17:46:11.869 cs2server: START: INFO: Using anonymous Steam login
Nov 08 17:46:12.066 cs2server: START: PASS: Using cached IP as public IP address
Nov 08 17:46:12.614 cs2server: START: INFO: Rotating log files

crontab :
*/2 * * * * /home/server1/cs2server monitor > /dev/null 2>&1
*/30 * * * * /home/server1/cs2server update > /dev/null 2>&1
0 0 * * 0 /home/server1/cs2server update-lgsm > /dev/null 2>&1
@reboot /home/server1/cs2server start > /dev/null 2>&1
0 6 * * * /home/server1/cs2server restart > /dev/null 2>&1
*/2 * * * * /home/server1/cs2server-2 monitor > /dev/null 2>&1
*/30 * * * * /home/server1/cs2server-2 update > /dev/null 2>&1
@reboot /home/server1/cs2server-2 start > /dev/null 2>&1
0 6 * * * /home/server1/cs2server-2 restart > /dev/null 2>&1

ok maybe it was happning before when i had 2 servers with 2 diffrent users and diffrent instalation i used to see steamgamemanagment token key being refreshed 2-3 times a day and it shoudnt because i set the servers to restart only at 6 am every day .

so i think monitor failled to monitor and leads the servers to quit and restart .

im going to try for monitor once every hour and see if steam game manager token will refresh the token of my servers outside the sheduled time for restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New Issues
Development

No branches or pull requests

3 participants