systemd failed at step user spawning no such process

Posted on

Problem :

I am trying to run my custom service using systemctl, but it alwasy gave me error:

Oct 29 14:09:30 ip-10-0-0-215.ap-southeast-1.compute.internal systemd[12402]: Failed at step USER spawning /home/ec2-user/zuul/target/zuul.jar: No such process
Oct 29 14:09:30 ip-10-0-0-215.ap-southeast-1.compute.internal systemd[1]: zuul.service: main process exited, code=exited, status=217/USER
Oct 29 14:09:30 ip-10-0-0-215.ap-southeast-1.compute.internal systemd[1]: Unit zuul.service entered failed state.
Oct 29 14:09:30 ip-10-0-0-215.ap-southeast-1.compute.internal systemd[1]: zuul.service failed.

the configuration in zuul.service:

Description=leave service
# The configuration file should be here:
#change this to your workspace
#path to executable.
#executable is a bash script which calls jar file

how i run the service is:

sudo systemctl daemon-reload
sudo systemctl enable zuul.service
sudo systemctl start zuul

I have tried remove user from the service file but it does not help.
I am sure that the owner of the file and directory is ec2-user.
And with the same configuration, it can run on my other instances.
But i have spent hours on this and i had no solution.

Solution :

I think i find out why. i need to install java run time. BUT the error log is not helpful at all, i just randomly tried everything possible to fix this.

the weird thing is that i can run it perfectly on a normal command,(but i installd java with sdkman, and i think this is the reason)

so for me solution is just sudo yum install java

Leave a Reply

Your email address will not be published.