Socket can't be restarted
Granddave opened this issue · 1 comments
Granddave commented
Hi again, found another bug.
If the socket is stopped, it won't be able to start again until /run/minecraft/console is deleted.
Example:
root@mc-1:~$ systemctl restart minecraft*
Job for minecraft.socket failed.
See "systemctl status minecraft.socket" and "journalctl -xe" for details.
A dependency job for minecraft.service failed. See 'journalctl -xe' for details.
root@mc-1:~# systemctl status minecraft.socket
● minecraft.socket - Minecraft Server Console
Loaded: loaded (/etc/systemd/system/minecraft.socket; enabled; vendor preset: enabled)
Active: failed (Result: resources) since Sun 2019-04-28 22:30:49 CEST; 1min 55s ago
Listen: /run/minecraft/console (FIFO)
Apr 28 21:28:55 mc-1 systemd[1]: Starting Minecraft Server Console.
Apr 28 21:28:55 mc-1 systemd[1]: Listening on Minecraft Server Console.
Apr 28 22:30:49 mc-1 systemd[1]: Closed Minecraft Server Console.
Apr 28 22:30:49 mc-1 systemd[1]: Stopping Minecraft Server Console.
Apr 28 22:30:49 mc-1 systemd[1]: minecraft.socket: Failed to listen on sockets: File exists
Apr 28 22:30:49 mc-1 systemd[1]: minecraft.socket: Failed with result 'resources'.
Apr 28 22:30:49 mc-1 systemd[1]: Failed to listen on Minecraft Server Console.
root@mc-1:~# rm /run/minecraft/console
root@mc-1:~# systemctl start minecraft.socket
root@mc-1:~# systemctl status minecraft.socket
● minecraft.socket - Minecraft Server Console
Loaded: loaded (/etc/systemd/system/minecraft.socket; enabled; vendor preset: enabled)
Active: active (listening) since Sun 2019-04-28 22:33:33 CEST; 4s ago
Listen: /run/minecraft/console (FIFO)
Tasks: 0 (limit: 4639)
CGroup: /system.slice/minecraft.socket
Apr 28 22:33:33 mc-1 systemd[1]: Starting Minecraft Server Console.
Apr 28 22:33:33 mc-1 systemd[1]: Listening on Minecraft Server Console.
root@mc-1:~#