systemd failed at step user spawning no such process
5,830
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
Related videos on Youtube
Author by
zifan yan
Updated on September 18, 2022Comments
-
zifan yan 3 months
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:
[Unit] Description=leave service [Service] User=ec2-user # The configuration file application.properties should be here: #change this to your workspace WorkingDirectory=/home/ec2-user #path to executable. #executable is a bash script which calls jar file ExecStart=/home/ec2-user/project-error-404/microservice/leaveService/target/leaveService.jar SuccessExitStatus=143 TimeoutStopSec=10 Restart=always RestartSec=5 [Install] WantedBy=multi-user.target
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.
-
SYN about 3 yearsAny chance that user would be somehow disabled? Or non-existent (if non-default AMI?). Similar error reported a while ago: superuser.com/questions/1156676/…
-
zifan yan about 3 yearsi am sure that user exists, but how can i check whether user is disabled?
-