Skip to content

Systemd wont start #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nikkii94 opened this issue Feb 4, 2019 · 5 comments
Closed

Systemd wont start #42

nikkii94 opened this issue Feb 4, 2019 · 5 comments

Comments

@nikkii94
Copy link

nikkii94 commented Feb 4, 2019

Hello! I have a symfony app with a socket command. I'm using your lib to run the socket constantly, but and it was working fine for weeks, but suddenly it stopped, and I can't get it work anymore.

Everytime I try to start it I get this:

systemctl status -l myapp.service
● myapp.service 
   Loaded: loaded (/etc/systemd/system/myapp.service; enabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2019-02-04 10:42:47 CET; 3s ago
  Process: 17029 ExecStart=/home/myapp/symfony/bin/console app:start (code=exited, status=127)
 Main PID: 17029 (code=exited, status=127)

systemd[1]: Unit myapp.service entered failed state.
systemd[1]: myapp.service failed.

Here is my myapp.service file:

[Unit]
Description=myapp
After=syslog.target

[Service]
ExecStart=/home/myapp/symfony/bin/console app:start
Restart=always
RestartSec=5s

[Install]
WantedBy=multi-user.target

Can you help me please? :)

@mac-cain13
Copy link
Owner

What happens if you try to run the command yourself instead of starting it as a service? That would help debug if the problem is with systemd or with the app.

@nikkii94
Copy link
Author

nikkii94 commented Feb 4, 2019

That way it runs perfectly

@mac-cain13
Copy link
Owner

Okay, so the problem is with systemd or the way systemd is starting your command. Not with the library.

I see the command exists with errorcode 127, which means something like command not found. So maybe some rights or paths changed and give problems?

@nikkii94
Copy link
Author

nikkii94 commented Feb 4, 2019

Yes, I updated the command file, the path not changed, and I gave 777 permission on the command file, and directory too, but nothing changed. I even disabled/deleted the service and recreated, but still got the error. I have no clue what could be the problem :(

@mac-cain13
Copy link
Owner

If you can execute /home/myapp/symfony/bin/console app:start yourself from any directory and it works, but systemd can't start the service with errorcode 127, it's probably a rights issue.

I can't really help you any further since the library seems to work and I can't look into your setup or system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants