Reload failed because retrieve_conf encountered an error: 126

Hi,

Any clues here??

TIA,

Dave

expand the notification, what are the rest of the details, there should be a code at the end which is very useful in tracking it.

Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx

Reload failed because retrieve_conf encountered an error: 126
Added ago
(freepbx.RCONFFAIL)

check permissions on retrieve_conf, make sure it is owned by asterisk, apache is running asterisk and it is executable. It sounds like it is not running at all because if it were there would be additional notifications coming from retrieve_conf with more specific information (this comes when it tries to run retrieve_conf and gets an error code of 126)

Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx

[email protected]# ls -al retrieve_conf

-rwxr-xr-x 1 asterisk asterisk 20467 2007-09-04 23:23 retrieve_conf

Any other thoughts?

assuming apache is running as asterisk, (verify that) make yourself user asterisk and run retrieve_conf directly from linux and see what it says.

Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx

Hi,

It seems that there are two retrieve_conf files:

/var/lib/asterisk/bin/retrieve_conf
/var/www/pbx/admin/modules/framework/bin/retrieve_conf

the one in /var/lib/asterisk/bin did not have the execute bit set in it’s permissions (i.e., 644 vs 755)

Thanks, I would never have found it without your clues…

Dave

Hi! I’m having the same problem. I have tried with setting “chmod 777” on “/var/lib/asterisk/bin/retrieve_conf”, but i still get the same error.

If i run it directly:[code]
[email protected]: /usr/src/freepbx-2.3.1 # /var/lib/asterisk/bin/retrieve_conf

Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
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 = /usr/share/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 = XXXXXX
Added to globals: AMPMGRPASS = XXXXX
Please update your modules and reload Asterisk by visiting http://my-page.se/XXX
[/code]

[email protected]: /home/emil # ls -l /var/lib/asterisk/bin/retrieve_conf -rwxrwx--- 1 asterisk www-data 21750 2007-12-07 18:57 /var/lib/asterisk/bin/retrieve_conf

Any idea here?

Solved! Wrote a script which fixed everything. :slight_smile:

#!/bin/bash chown asterisk:www-data -R /var/lib/asterisk/ chown asterisk:www-data -R /etc/asterisk/ chown asterisk:www-data -R /etc/amportal.conf chmod 770 -R /var/lib/asterisk/ chmod 775 -R /etc/asterisk/ chmod 770 -R /etc/amportal.conf

Why doesn’t the default install script (install_amp) check the permissions and ownership accordingly?

because of built in asterisk limitation, (which may or may not still be there as it has been a while since I checked), apache should run as asterisk. I suspect once you made that change, your permission issues would go away.

I had this same problem and found that the Shebang needed to be changed to #!/usr/local/bin/php -q with regards to my server. I have PHP compiled a bit differently and noticed Freepbx script files have #!/usr/bin/php -q instead. Once I changed that everything reloaded just fine. - Jim

/var/lib/asterisk/bin/retrieve_conf
/var/www/pbx/admin/modules/framework/bin/retrieve_conf

the one in /var/lib/asterisk/bin did not have the execute bit set in it’s permissions (i.e., 644 vs 755)

the error 126 disapeared but :
exit: 1

Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
[FATAL] DB Error: no such table

Error selecting from announcement

i have the same error while running ./retrieve_conf
here is it:

Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
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/log/asterisk
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Added to globals: AMPMGRUSER = xxxx
Added to globals: AMPMGRPASS = xxxx
Name “main::numbuttonsx” used only once: possible typo at /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.pl line 44.
[ERROR] queues access failed, Queues module may not be installed: DB Error: no such table
Please update your modules and reload Asterisk by visiting http://xx.xx.xx.xx/admin

I also have this error , I am fairly new to linux and completed the installation proces yesterday, it toke me a lot of time solving all the errors I had before (during install) . Mainly restriction / permissions errors . I’ve tried all the above with no results .

Maybe we need to focus on “DB Error: no such table”.

Have you solved the problem since your previous post? Can anyone tell me how to solve this ?

Thanks Jeroen

By this , I meant this error :

Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
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
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Added to globals: AMPMGRUSER = admin
Added to globals: AMPMGRPASS = xxxxxxx

//(AMPMGRPASS = xxxxxxx WHICH IS THE SAME IN manager.conf [admin] secret)

[ERROR] queues access failed, Queues module may not be installed: DB Error: no such table
Please update your modules and reload Asterisk by visiting http://localhost/admin

Jeroen_Universal,

Please start a new thread as you’ll get better responses and help when the subject is directly related to your problem and not tagged onto the end of another one. It is considered hijacking and as the two previous posters before you also found out you don’t always get a response when you do that.

So when you do start a clean thread please provide the following: your error, your configuration and versions of everything (OS, asterisk, FreePBX), who’s directions (a link please) you followed, where you deviated from the directions and why along with where you had permissions problems occurring because I’ll bet that you have not totally solved the permissions issue, and/or you missed installing something that something else is expecting to already be in place.

Done !

The new topic can be found at : http://www.freepbx.org/forum/freepbx/installation/critical-error-retrieve-conf-failed-config-not-applied-0

Greetings Jeroen

I have mandrake 10.1 but… apply configuration changes

./retrieve_conf

Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
[FATAL]
SELECT s1.ext ext, dest, dmode, s2.description description FROM daynight s1
INNER JOIN
(
SELECT ext, dest description FROM daynight WHERE dmode = ‘fc_description’) s2
ON s1.ext = s2.ext WHERE dmode in (‘day’,‘night’)
[nativecode=1064 ** You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT ext, dest description FROM daynight WHERE dmode = 'fc_de]SQL -

SELECT s1.ext ext, dest, dmode, s2.description description FROM daynight s1
INNER JOIN
(
SELECT ext, dest description FROM daynight WHERE dmode = ‘fc_description’) s2
ON s1.ext = s2.ext WHERE dmode in (‘day’,‘night’)

say error