GameServerManagers / GameServerManagers/LinuxGSM

[BUG] monitor starts server while it's backing up causing duplicate instances

Open
#3,972 0 comments 0 reactions 0 assignees View on GitHub
command: backup command: console command: monitor command: restart command: start command: stop distro: CentOS distro: Ubuntu info: tmux type: bug type: feature
Dominant language
Shell
Stars
4.9k
Forks
864
PR merge metrics
No merged PRs in 30d

Description

Issues raised here are **ONLY** for:
* LinuxGSM bugs.
* Feature suggestions.
* Code contributions.

Issues raised here are **NOT** for:
* General support.
* Specific game server issues (e.g CS:GO, TF2).
* Dedicated server issues (e.g Ubuntu, CentOS).
* Anything not directly related to LinuxGSM development.

For general support visit the **[LinuxGSM-Support](https://linuxgsm.com/support)**.

***Please use the template below, deleting the above text***

## User Story

I have a LGSM PaperMC server running. I have an LGSM monitor cron running every 5 minutes. I'm not even sure if that's necessary but I've disabled it now due to this issue anyway. I've had it running for months and had no issues. The server restarts once a day automatically by running a LGSM backup. Suddenly today I realize it has caused a server to attempt to run twice at once causing one instance to crash due to a lock file being found and one instance to be inaccessible to any LGSM commands. For example trying to stop the server says it's not running, trying to start a new one says it's already running, and there were no tmux sessions available to connect to either. There was a java process trying to run the server. I had to kill it to shut it down.

## Basic info

* **Distro:** [Ubuntu 22.04.1 LTS]
* **Game:** [PaperMC]
* **Command:** [Monitor, Backup]
* **LinuxGSM version:** [v22.1.0]

## Further Information

Monitor starts a server that is currently backing up, possibly after it has finished backing up but has begun but not completed starting itself again.

The server runs `~/pmcserver backup` to backup and restart itself.

## To Reproduce

Steps to reproduce the behaviour:
1. Backup
2. Run monitor at just the right time.

## Expected behaviour

Should backup and start the server again without trying to monitor it to restart it causing duplicate instances.

Thank you!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.