Hi guys!
I recently ran into the problem that I cannot restart the service.
service asterisk restart
Restarting asterisk (via systemctl): Job for asterisk.service failed. See “systemctl status asterisk.service” and “journalctl -xe” for details.
[FAILED]
Oct 24 09:22:45 mypbx..com systemd[1]: Starting LSB: Asterisk PBX…
Oct 24 09:22:45 mypbx..com asterisk[27374]: Asterisk is already running.
Oct 24 09:22:45 mypbx..com systemd[1]: Can’t open PID file /var/run/asterisk/asterisk.pid (yet?) after start: No such file or directory
Oct 24 09:22:45 mypbx..com systemd[1]: Failed to start LSB: Asterisk PBX.
Oct 24 09:22:45 mypbx..com systemd[1]: Unit asterisk.service entered failed state.
Oct 24 09:22:45 mypbx..com systemd[1]: asterisk.service failed.
I don’t know why this started happening. What are my actions? Thank you very much in advance!
Also I get the given error message with rights. The most interesting thing is that nothing happened in the system. I suspect this may have happened after the update.
Oct 24 10:26:07 mypbx…com systemd[1]: Starting LSB: Asterisk PBX…
Oct 24 10:26:07 mypbx…com asterisk[13186]: Asterisk is already running.
Oct 24 10:26:07 mypbx…com systemd[1]: New main PID 11312 does not belong to service, and PID file is not owned by root. Refusing.
Oct 24 10:26:07 mypbx…com systemd[1]: New main PID 11312 does not belong to service, and PID file is not owned by root. Refusing.
Oct 24 10:26:07 mypbx…com systemd[1]: Failed to start LSB: Asterisk PBX.
Oct 24 10:26:07 mypbx…com systemd[1]: Unit asterisk.service entered failed state.
Oct 24 10:26:07 mypbx…com systemd[1]: asterisk.service failed.
And process 11312 - it’s Asterisk:
Connected to Asterisk 16.13.0 currently running on mypbx (pid = 11312)
The logs that you are providing are only showing that Asterisk is terminating very soon after being started. They are not showing why. Yo need to provide the logs produced by Asterisk to have a chance of finding out why.
/var/log/asterisk/full should be useful, but isn’t normally enabled.
Another approach is to try and start Asterisk interactively, with “asterisk -cvvvv”, and any other relevant parameters, from a root console session. Look for console messages explaining a problem.
–
– Unit asterisk.service has begun starting up.
Oct 24 22:35:12 mypbx…comu asterisk[615]: Asterisk is already running.
Oct 24 22:35:12 mypbx…com systemd[1]: Can’t open PID file /var/run/asterisk/asterisk.pid (yet?) after start: No such file or directory
Oct 24 22:35:12 mypbx…com systemd[1]: Failed to start LSB: Asterisk PBX.
– Subject: Unit asterisk.service has failed
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
– Unit asterisk.service has failed.
– The result is failed.
Oct 24 22:35:12 mypbx…com systemd[1]: Unit asterisk.service entered failed state.
Oct 24 22:35:12 mypbx…com systemd[1]: asterisk.service failed.
Oct 24 22:35:12 mypbx…com polkitd[693]: Unregistered Authentication Agent for unix-process:609:1010621 (system bus name :1.766, object pat
Oct 24 22:35:12 mypbx…com systemd[1]: Removed slice User Slice of asterisk.
– Subject: Unit user-995.slice has finished shutting down
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
– Unit user-995.slice has finished shutting down.
Oct 24 22:35:16 mypbx…com runuser[644]: pam_unix(runuser:session): session opened for user asterisk by (uid=0)
Oct 24 22:35:16 mypbx…com runuser[644]: pam_unix(runuser:session): session closed for user asterisk
As I understand this is a chmod issue.
File in /var/run/asterisk/asterisk.pid is missing.
I don’t know where to start yet.
The log /var/log/asterisk/full is huge, I can’t figure out what kind of error occurs (