futel / asteriskserver

SIP server for Futel
Creative Commons Zero v1.0 Universal
25 stars 7 forks source link

asterisk breaking when restarted? #551

Closed kra closed 1 year ago

kra commented 1 year ago

systemctl stop asterisk systemctl start asterisk

or reboot box?

does this cause issues? It did at one time when testing.

kra commented 1 year ago

reboot VM no /var/run/asterisk directory

[root@rocky8 ~]# service asterisk status|cat ● asterisk.service - Asterisk PBX and telephony daemon. Loaded: loaded (/etc/systemd/system/asterisk.service; enabled; vendor preset: disabled) Active: activating (start) since Tue 2023-02-21 09:55:42 PST; 22s ago Process: 2536 ExecStart=/usr/sbin/asterisk -mqF -C /etc/asterisk/asterisk.conf (code=exited, status=0/SUCCESS) Tasks: 73 (limit: 4962) Memory: 38.2M CGroup: /system.slice/asterisk.service └─2537 /usr/sbin/asterisk -mqF -C /etc/asterisk/asterisk.conf

Feb 21 09:55:42 rocky8.localdomain systemd[1]: Starting Asterisk PBX and telephony daemon.... Feb 21 09:55:42 rocky8.localdomain systemd[1]: asterisk.service: Can't open PID file /var/run/asterisk/asterisk.pid (yet?) after start: No such file or directory

kra commented 1 year ago

/etc/systemd/system/asterisk.service expects a pid file in /var/run/asterisk rocky is clearing /var/run each reboot? /var/run/asterisk is created by the asterisk rpm

add RuntimeDirectory to /etc/systemd/system/asterisk.service https://serverfault.com/a/779648