Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

expand the notification,

p_lindheimer's picture

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


__________________

Philippe Lindheimer - FreePBX Project Leader
FreePBX Training Opportunities - Click Here
Get Official Paid Support - Click Here


Here it is... not too helpful to me anyway

dpsims's picture

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


check permissions on

p_lindheimer's picture

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


__________________

Philippe Lindheimer - FreePBX Project Leader
FreePBX Training Opportunities - Click Here
Get Official Paid Support - Click Here


Seems to be executable and owned by asterisk....

dpsims's picture

root@pbx# 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

p_lindheimer's picture

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


__________________

Philippe Lindheimer - FreePBX Project Leader
FreePBX Training Opportunities - Click Here
Get Official Paid Support - Click Here


Found it....

dpsims's picture

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


Same problem

emil.s's picture

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:

root@Sandnabba.se: /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
root@Sandnabba.se: /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

emil.s's picture

Solved! Wrote a script which fixed everything. :)

#!/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 install_amp do this?

Rhombus's picture

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


because of built in asterisk

p_lindheimer's picture

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.


__________________

Philippe Lindheimer - FreePBX Project Leader
FreePBX Training Opportunities - Click Here
Get Official Paid Support - Click Here


Another Solution

ricoche's picture

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


below, as above, fixed my installation also

m4him7's picture

/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)


new error

m3shine's picture

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


same error

bontura's picture

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


Me too

Jeroen_Universal's picture

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


Additional info

Jeroen_Universal's picture

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

fskrotzki's picture

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.


New topic

Jeroen_Universal's picture

Done !

The new topic can be found at : http://www.freepbx.org/forum/freepbx/installation/critical-error-retriev...

Greetings Jeroen


can´t update

volney's picture

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


volney, This is also

fskrotzki's picture

volney,

This is also considered hijacking a thread (just like the poster above your post). Please post a new thread with a proper subject and I'll bet you'll get answers. Here at the end of the thread about a retrieve_conf error you will not.


after updating trixbox 2.2.12 from freepbx 2.3 -> 2.4 -> 2.5

mm2001's picture

I had this problem after a fresh install of Trixbox 2.2.12 (the last one that still runs on C3 processors) and then did an update to FreePBX versions 2.4 then 2.5.

All seemed to work correctly until my fellow admin changed something on the "General Settings" page and got the error that started the thread.

I did this and it seemed to fix things:

cd /var/lib/asterisk/bin

chmod a+x *

I'm concerned there may be similar problems lurking elsewhere, but the phones are ringing again, so on to the next problem!

cheers, michael


It seems it's gone after I

john.yan's picture

It seems it's gone after I added a new extension and saved.


Hi all

katauri's picture

I have same problem, but other error
# /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
PHP Warning: Missing argument 1 for connectdirs::create(), called in /var/lib/asterisk/bin/retrieve_conf on line 430 and defined in /var/lib/asterisk/bin/retrieve_conf on line 13
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/asterisk
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Added to globals: AMPMGRUSER = admin
Added to globals: AMPMGRPASS = ****
Added to globals: AMPDBENGINE = mysql
Added to globals: AMPDBHOST = localhost
Added to globals: AMPDBNAME = asterisk
Added to globals: AMPDBUSER = asteriskuser
Added to globals: AMPDBPASS = ****
Notice: no Queues defined
Notice: no Parking Lots defined
Notice: no iax trunks defined
Notice: no AMP Users defined
Please update your modules and reload Asterisk by visiting http://192.168.0.125/admin

In /var/lib/asterisk/bin/retrieve_conf i have "function &create(&$db) {" at line 13 and "$con_dirs = connectdirs::create();" at line 430. FreePBX 2.7.0.4.
Any idea here?


it's a harmless warning that

p_lindheimer's picture

it's a harmless warning that has been fixed and will be out in the next framework update.

Is it making your system fail though? If so, you may need to turn down your error reporting in php to keep it from failing your reload until the fix is pushed out (or just go modify the code until then and get rid of the &$db in the declaration which was a bug and has been removed)>


__________________

Philippe Lindheimer - FreePBX Project Leader
FreePBX Training Opportunities - Click Here
Get Official Paid Support - Click Here


selinux=permissive

razmikm's picture

I've encountered same problem in FreePBX(meanwhile asterisk was working without an issue).
Solutions posted here was not helpful so I thought posting here the one that resolved my problem could save some time. I found it on Elastix forum:
http://www.elastix.org/en/component/kunena/1/20315/

change selinux from to permissive either by running "setup" from console or by editing /etc/selinux/config file


selinux should be

mickecarlsson's picture

selinux should be diabled!!!!


__________________

Mikael Carlsson
(I am off-line, tinkering with my Chevy and my radios, don't know when I will be back)