So I followed about 3 or 4 methods of installing Asterisk 2.9/2.10 and Asterisk 1.8 on CentOS 5 on a VPS, using all default values and passwords (yes, I tried custom passwords also and I’ll change them later once I figure out were the problem is) I got it to install. So the first time I log into the web interface I have to click the “Apply Changes” button, but once I do that it gives be this error:
exit: 1
Sun, 04 Nov 2012 08:27:17 +0400 - Unable to connect to manager localhost:5038 (4):
[FATAL] Unable to connect to Asterisk Manager from /var/lib/asterisk/bin/retrieve_conf, aborting
1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.
So I’ve gone through all of the postings I could find, tried every suggestion that was suggested, changing bind address, changing ownership… etc. I’ve made sure amportel.conf and manager.conf match-up, and I tried executing retrieve_conf as root. The result of which is below:
[root@332694 ~]# /var/lib/asterisk/bin/retrieve_conf
Sun, 04 Nov 2012 08:54:35 +0400 - Unable to connect to manager localhost:5038 (111): Connection refused
[FATAL] Unable to connect to Asterisk Manager from /var/lib/asterisk/bin/retrieve_conf, aborting
What could be the problem, what am I missing, I know its most likely something very simple, but I’m stumped, I’ve spent about 40 hours now figuring this out and no luck. Any suggestions?
So I reinstalled, like a 6 or 7th time, again, with 2.10. I did not change any of the freepbx.conf, amportel.conf, or manager.conf files, just made sure they match, and they do, but I still get the same error:
Reload failed because retrieve_conf encountered an error: 1
exit: 1
[FATAL] Unable to connect to Asterisk Manager from /var/lib/asterisk/bin/retrieve_conf, aborting
1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.
so I tried executing retrieve_conf as root and I get a different result this time:
[root@332694 ~]# /var/lib/asterisk/bin/retrieve_conf
Added to globals: ASTETCDIR = /etc/asterisk
Added to globals: ASTMODDIR = /usr/lib/asterisk/modules
Added to globals: ASTVARLIBDIR = /var/lib/asterisk
Added to globals: ASTAGIDIR = /var/lib/asterisk/agi-bin
Added to globals: ASTSPOOLDIR = /var/spool/asterisk
Added to globals: ASTRUNDIR = /var/run/asterisk
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Added to globals: AMPMGRUSER = admin
Added to globals: AMPMGRPASS = amp111
Added to globals: AMPDBENGINE = mysql
Added to globals: AMPDBHOST = localhost
Added to globals: AMPDBNAME = asterisk
Added to globals: AMPDBUSER = asteriskuser
Added to globals: AMPDBPASS = amp109
Added to globals: VMX_CONTEXT = from-internal
Added to globals: VMX_PRI = 1
Added to globals: VMX_TIMEDEST_CONTEXT =
Added to globals: VMX_TIMEDEST_EXT = dovm
Added to globals: VMX_TIMEDEST_PRI = 1
Added to globals: VMX_LOOPDEST_CONTEXT =
Added to globals: VMX_LOOPDEST_EXT = dovm
Added to globals: VMX_LOOPDEST_PRI = 1
Added to globals: MIXMON_DIR =
Added to globals: MIXMON_POST =
Please update your modules and reload Asterisk by browsing to your server.
So I still don’t get it. everything is default and I didn’t change anything, and it still doesn’t work.
I am using asterisk 1.8, If I had the possibility, to load my VPS from an ISO I would, but my VPS provider is not giving be that option, so for now I’m using CentOS-5-x86_64, that seems to work best during installation.
I have tried installing this to two different machines from the standard ISO.
Version Stable-1.1009.210.62
1st machine was a Pentium 4 2.8 GHz Machine with 2 Gigs RAM
2nd machine is a AMD Athlon System with 1 Gig.
OK well something with the virtual server is not letting the asterisk user execute commands and it seems to not be a linux level thing as best as I can see but something with how the virtual server is working.
To test run the following command as root and it works fine
/var/lib/asterisk/bin/retrieve_conf
Now run the same command as the asterisk user and it fails
sudo -u asterisk /var/lib/asterisk/bin/retrieve_conf
Not sure where to go from here as its not a FreePBX issue or install issue but something with the user permissions. Any ideas?
tried that, changed permisions, changed owners, changed groups, tried changing everything I could come up with, still doesnt want to run under asterisk user
when i run: ls -l /var/lib/asterisk/bin/retrieve_conf
gives me this:
-rwxrwxrwx 1 asterisk asterisk 34974 Nov 8 13:19 /var/lib/asterisk/bin/retrieve_conf
but when i run: sudo -u asterisk /var/lib/asterisk/bin/retrieve_conf
Still gives me this error:
[FATAL] Unable to connect to Asterisk Manager from /var/lib/asterisk/bin/retrieve_conf, aborting
if (!$bootstrap_settings[‘astman_connected’]) {
fatal(sprintf(_(“Unable to connect to Asterisk Manager from %s, aborting”),FILE));
}
Your freepbx.conf file does not contain a suitable user/password that agrees with your/etc/asterisk/manager* heirarchy and/or depending on the version of FreePBX you are using in your mysql tables