Systemd forking service starts and stops simultaneously on Ubuntu 18.04 - Minecraft server issues
up vote
0
down vote
favorite
I recently upgraded to 18.04.1 and am having trouble getting my Minecraft systemd service working again. I did a clean install of 18.04 from 16.04. This service was working properly on 16.04, but now it doesn't seem to work. When I run "systemctl start minecraft.service" it seems to run the ExecStart script and the ExecStop script together based on the status output below, but I do not see any output from the scripts in my tmux console that it should be running through. If I call the startup script manually, it works fine, so something is wrong in the systemd service.
The service is set to run as the minecraft user under minecraft group. Everything in /srv/minecraft is owned by minecraft user/group. The minecraft.service file is owned by root. All of this is the same as it was in 16.04 when it was working. Please let me know if you have any ideas to get it running again! Thanks!!
:/etc/systemd/system$ systemctl status minecraft.service
● minecraft.service - Minecraft Server
Loaded: loaded (/etc/systemd/system/minecraft.service; enabled; vendor
preset
Active: inactive (dead) since Wed 2018-11-14 16:33:25 PST; 3s ago
Process: 4667 ExecStop=/srv/minecraft/mc_server.sh stop (code=exited,
status=0/SUCCESS)
Process: 4651 ExecStart=/srv/minecraft/mc_server.sh start (code=exited,
status=0/SUCCESS)
Nov 14 16:33:11 systemd[1]: Starting Minecraft Server...
Nov 14 16:33:11 mc_server.sh[4651]: Session found. Connecting.
Nov 14 16:33:11 mc_server.sh[4651]: Minecraft server successfully
started
Nov 14 16:33:11 mc_server.sh[4667]: step 1 successs
Nov 14 16:33:19 mc_server.sh[4667]: step 2 success
Nov 14 16:33:21 mc_server.sh[4667]: server shutdown success
Nov 14 16:33:25 systemd[1]: Started Minecraft Server.
Here is the systemd script:
# Source: https://github.com/agowa338/MinecraftSystemdUnit/
# License: MIT
[Unit]
Description=Minecraft Server
After=network.target auditd.service
[Service]
WorkingDirectory=/srv/minecraft/
# PrivateUsers=true
User=minecraft
Group=minecraft
ProtectSystem=full
ProtectHome=true
# ProtectKernelTunables=true
# Implies MountFlags=slave
# ProtectKernelModules=true
# Implies NoNewPrivileges=yes
# ProtectControlGroups=true
# Implies MountAPIVFS=yes
Type=forking
ExecStart=/srv/minecraft/mc_server.sh start
ExecStop=/srv/minecraft/mc_server.sh stop
Restart=on-abnormal
RestartSec=60s
[Install]
WantedBy=multi-user.target
#########
# HowTo
#########
#
# Create a directory in /opt/minecraft/XX where XX is a name like 'survival'
# Add minecraft_server.jar into dir with other conf files for minecraft server
#
# Enable/Start systemd service
# systemctl enable minecraft@survival
# systemctl start minecraft@survival
#
# To run multiple servers simply create a new dir structure and enable/start it
# systemctl enable minecraft@creative
server 18.04 scripts systemd minecraft
add a comment |
up vote
0
down vote
favorite
I recently upgraded to 18.04.1 and am having trouble getting my Minecraft systemd service working again. I did a clean install of 18.04 from 16.04. This service was working properly on 16.04, but now it doesn't seem to work. When I run "systemctl start minecraft.service" it seems to run the ExecStart script and the ExecStop script together based on the status output below, but I do not see any output from the scripts in my tmux console that it should be running through. If I call the startup script manually, it works fine, so something is wrong in the systemd service.
The service is set to run as the minecraft user under minecraft group. Everything in /srv/minecraft is owned by minecraft user/group. The minecraft.service file is owned by root. All of this is the same as it was in 16.04 when it was working. Please let me know if you have any ideas to get it running again! Thanks!!
:/etc/systemd/system$ systemctl status minecraft.service
● minecraft.service - Minecraft Server
Loaded: loaded (/etc/systemd/system/minecraft.service; enabled; vendor
preset
Active: inactive (dead) since Wed 2018-11-14 16:33:25 PST; 3s ago
Process: 4667 ExecStop=/srv/minecraft/mc_server.sh stop (code=exited,
status=0/SUCCESS)
Process: 4651 ExecStart=/srv/minecraft/mc_server.sh start (code=exited,
status=0/SUCCESS)
Nov 14 16:33:11 systemd[1]: Starting Minecraft Server...
Nov 14 16:33:11 mc_server.sh[4651]: Session found. Connecting.
Nov 14 16:33:11 mc_server.sh[4651]: Minecraft server successfully
started
Nov 14 16:33:11 mc_server.sh[4667]: step 1 successs
Nov 14 16:33:19 mc_server.sh[4667]: step 2 success
Nov 14 16:33:21 mc_server.sh[4667]: server shutdown success
Nov 14 16:33:25 systemd[1]: Started Minecraft Server.
Here is the systemd script:
# Source: https://github.com/agowa338/MinecraftSystemdUnit/
# License: MIT
[Unit]
Description=Minecraft Server
After=network.target auditd.service
[Service]
WorkingDirectory=/srv/minecraft/
# PrivateUsers=true
User=minecraft
Group=minecraft
ProtectSystem=full
ProtectHome=true
# ProtectKernelTunables=true
# Implies MountFlags=slave
# ProtectKernelModules=true
# Implies NoNewPrivileges=yes
# ProtectControlGroups=true
# Implies MountAPIVFS=yes
Type=forking
ExecStart=/srv/minecraft/mc_server.sh start
ExecStop=/srv/minecraft/mc_server.sh stop
Restart=on-abnormal
RestartSec=60s
[Install]
WantedBy=multi-user.target
#########
# HowTo
#########
#
# Create a directory in /opt/minecraft/XX where XX is a name like 'survival'
# Add minecraft_server.jar into dir with other conf files for minecraft server
#
# Enable/Start systemd service
# systemctl enable minecraft@survival
# systemctl start minecraft@survival
#
# To run multiple servers simply create a new dir structure and enable/start it
# systemctl enable minecraft@creative
server 18.04 scripts systemd minecraft
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I recently upgraded to 18.04.1 and am having trouble getting my Minecraft systemd service working again. I did a clean install of 18.04 from 16.04. This service was working properly on 16.04, but now it doesn't seem to work. When I run "systemctl start minecraft.service" it seems to run the ExecStart script and the ExecStop script together based on the status output below, but I do not see any output from the scripts in my tmux console that it should be running through. If I call the startup script manually, it works fine, so something is wrong in the systemd service.
The service is set to run as the minecraft user under minecraft group. Everything in /srv/minecraft is owned by minecraft user/group. The minecraft.service file is owned by root. All of this is the same as it was in 16.04 when it was working. Please let me know if you have any ideas to get it running again! Thanks!!
:/etc/systemd/system$ systemctl status minecraft.service
● minecraft.service - Minecraft Server
Loaded: loaded (/etc/systemd/system/minecraft.service; enabled; vendor
preset
Active: inactive (dead) since Wed 2018-11-14 16:33:25 PST; 3s ago
Process: 4667 ExecStop=/srv/minecraft/mc_server.sh stop (code=exited,
status=0/SUCCESS)
Process: 4651 ExecStart=/srv/minecraft/mc_server.sh start (code=exited,
status=0/SUCCESS)
Nov 14 16:33:11 systemd[1]: Starting Minecraft Server...
Nov 14 16:33:11 mc_server.sh[4651]: Session found. Connecting.
Nov 14 16:33:11 mc_server.sh[4651]: Minecraft server successfully
started
Nov 14 16:33:11 mc_server.sh[4667]: step 1 successs
Nov 14 16:33:19 mc_server.sh[4667]: step 2 success
Nov 14 16:33:21 mc_server.sh[4667]: server shutdown success
Nov 14 16:33:25 systemd[1]: Started Minecraft Server.
Here is the systemd script:
# Source: https://github.com/agowa338/MinecraftSystemdUnit/
# License: MIT
[Unit]
Description=Minecraft Server
After=network.target auditd.service
[Service]
WorkingDirectory=/srv/minecraft/
# PrivateUsers=true
User=minecraft
Group=minecraft
ProtectSystem=full
ProtectHome=true
# ProtectKernelTunables=true
# Implies MountFlags=slave
# ProtectKernelModules=true
# Implies NoNewPrivileges=yes
# ProtectControlGroups=true
# Implies MountAPIVFS=yes
Type=forking
ExecStart=/srv/minecraft/mc_server.sh start
ExecStop=/srv/minecraft/mc_server.sh stop
Restart=on-abnormal
RestartSec=60s
[Install]
WantedBy=multi-user.target
#########
# HowTo
#########
#
# Create a directory in /opt/minecraft/XX where XX is a name like 'survival'
# Add minecraft_server.jar into dir with other conf files for minecraft server
#
# Enable/Start systemd service
# systemctl enable minecraft@survival
# systemctl start minecraft@survival
#
# To run multiple servers simply create a new dir structure and enable/start it
# systemctl enable minecraft@creative
server 18.04 scripts systemd minecraft
I recently upgraded to 18.04.1 and am having trouble getting my Minecraft systemd service working again. I did a clean install of 18.04 from 16.04. This service was working properly on 16.04, but now it doesn't seem to work. When I run "systemctl start minecraft.service" it seems to run the ExecStart script and the ExecStop script together based on the status output below, but I do not see any output from the scripts in my tmux console that it should be running through. If I call the startup script manually, it works fine, so something is wrong in the systemd service.
The service is set to run as the minecraft user under minecraft group. Everything in /srv/minecraft is owned by minecraft user/group. The minecraft.service file is owned by root. All of this is the same as it was in 16.04 when it was working. Please let me know if you have any ideas to get it running again! Thanks!!
:/etc/systemd/system$ systemctl status minecraft.service
● minecraft.service - Minecraft Server
Loaded: loaded (/etc/systemd/system/minecraft.service; enabled; vendor
preset
Active: inactive (dead) since Wed 2018-11-14 16:33:25 PST; 3s ago
Process: 4667 ExecStop=/srv/minecraft/mc_server.sh stop (code=exited,
status=0/SUCCESS)
Process: 4651 ExecStart=/srv/minecraft/mc_server.sh start (code=exited,
status=0/SUCCESS)
Nov 14 16:33:11 systemd[1]: Starting Minecraft Server...
Nov 14 16:33:11 mc_server.sh[4651]: Session found. Connecting.
Nov 14 16:33:11 mc_server.sh[4651]: Minecraft server successfully
started
Nov 14 16:33:11 mc_server.sh[4667]: step 1 successs
Nov 14 16:33:19 mc_server.sh[4667]: step 2 success
Nov 14 16:33:21 mc_server.sh[4667]: server shutdown success
Nov 14 16:33:25 systemd[1]: Started Minecraft Server.
Here is the systemd script:
# Source: https://github.com/agowa338/MinecraftSystemdUnit/
# License: MIT
[Unit]
Description=Minecraft Server
After=network.target auditd.service
[Service]
WorkingDirectory=/srv/minecraft/
# PrivateUsers=true
User=minecraft
Group=minecraft
ProtectSystem=full
ProtectHome=true
# ProtectKernelTunables=true
# Implies MountFlags=slave
# ProtectKernelModules=true
# Implies NoNewPrivileges=yes
# ProtectControlGroups=true
# Implies MountAPIVFS=yes
Type=forking
ExecStart=/srv/minecraft/mc_server.sh start
ExecStop=/srv/minecraft/mc_server.sh stop
Restart=on-abnormal
RestartSec=60s
[Install]
WantedBy=multi-user.target
#########
# HowTo
#########
#
# Create a directory in /opt/minecraft/XX where XX is a name like 'survival'
# Add minecraft_server.jar into dir with other conf files for minecraft server
#
# Enable/Start systemd service
# systemctl enable minecraft@survival
# systemctl start minecraft@survival
#
# To run multiple servers simply create a new dir structure and enable/start it
# systemctl enable minecraft@creative
server 18.04 scripts systemd minecraft
server 18.04 scripts systemd minecraft
edited 2 hours ago
asked yesterday
MysticEagle
184
184
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093040%2fsystemd-forking-service-starts-and-stops-simultaneously-on-ubuntu-18-04-minecr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown