I’m running FreePBX 13 on a CentOS 6 VPS. All is working well, but I have one problem I can’t work out. When I reboot the VPS, I can’t apply the config because of the error: “Could not connect to remote Asterisk”. I checked
/var/run/asterisk/
To see the file permissions. When I change the ownership of the asterisk.cli file to the asterisk group, all is well. But any time I reboot those permissions are reset back to root:root.
Any idea what I’m doing wrong? Is this by design? Can I change the boot-permission setup?
After rebooting, check whether Asterisk is running as root (it should be running as asterisk).
If it’s root, there is probably a startup file left over from when you installed Asterisk (before installing FreePBX).
You can probably disable this via chkconfig asterisk off
Now reboot and you’ll probably find that Asterisk is not running at all. If so, you need to issue fwconsole start
at boot time to (among other things) start Asterisk properly.
A simple way is to add the command at the end of /etc/rc.local
You seem to be my hero of the day. Your answer was spot on. I used ps aux | grep asterisk
to find out that asterisk was running as root. So I used chkconfig asterisk off
and added fwconsole start
to the /etc/rc.local file. All seems to be working well. For anyone stumbling upon this thread, this also worked to set the permissions for voicemail files through UCP correctly.
safe_asterisk is a wrapper around asterisk, it sees if asterisk is running every $SLEEPSECS , 4 by default and restarts it if necessary. it also emails $NOTIFY , root@localhost by default when such an event happens
More importantly to let you know you need to fix things, Stable Asterisk just shouldn’t and generally doesn’t crash unless you have discovered a new bug.Unfotunately, very few admins ever read the root@localhost mailbox.