papermc.service: Failed with result 'exit-code'.

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
Jappe
Posts: 3
Joined: Sun Oct 31, 2021 11:39 pm

papermc.service: Failed with result 'exit-code'.

Post by Jappe »

Hello,
I installed papermc and wanted to tweak the java heap memory max from default 1024mb to 2048m (I run it on a 4GB raspi 4).
I edited the service via DietPi-Services like mentioned here https://dietpi.com/docs/software/gaming/#papermc.

When I try now to start the service I get this error message:

Code: Select all

papermc.service: Failed with result 'exit-code'.
systemctl status papermc.service gives me this:

Code: Select all

 papermc.service: Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
So I guess it now uses the default ExecStart= and my uncommented ExecStart=, which is not a wanted behaviour?
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: papermc.service: Failed with result 'exit-code'.

Post by Joulinar »

You would need to add an additional ExecStart= before your tweak, to clear the original setting
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Jappe
Posts: 3
Joined: Sun Oct 31, 2021 11:39 pm

Re: papermc.service: Failed with result 'exit-code'.

Post by Jappe »

Joulinar wrote: Mon Nov 01, 2021 12:14 am You would need to add an additional ExecStart= before your tweak, to clear the original setting
Yes, this did the job!
my dietpi-services_edit.conf looks now like this:

Code: Select all

[Unit]
#Description=PaperMC (DietPi)
#Documentation=https://paper.readthedocs.io/

[Service]
#SyslogIdentifier=PaperMC
#User=papermc
#WorkingDirectory=/mnt/dietpi_userdata/papermc
ExecStart=
ExecStart=/usr/bin/java -Xms1g -Xmx2g -jar /opt/papermc/paperclip.jar --nogui --noconsole

[Install]
#WantedBy=multi-user.target
So to who can I write to correct the incorrect doc? (https://dietpi.com/docs/software/gaming/#papermc)
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: papermc.service: Failed with result 'exit-code'.

Post by Joulinar »

@MichaIng
should we add this to our docs to have an additional ExecStart= added?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3514
Joined: Sat Nov 18, 2017 6:21 pm

Re: papermc.service: Failed with result 'exit-code'.

Post by MichaIng »

Indeed that is missing! It is always required to unset the previous value, else it is handled as a second "ExecStart" directive, not supported on this type of service. Good find.

PR up: https://github.com/MichaIng/DietPi-Docs/pull/609
Post Reply