Open Source Training Seminar


Not Logged in - No Account?

Don't have an account? Registering an account with us allows you to post to the forums, easily track new posts, subscribe to threads, pm (private message) other forum members, and receive periodic news letters (you can opt out if you desire). Once you are logged in this message will no longer appear. If you don't have an account, you can create one by registering here. Lost your password, request a new password. We respect your privacy which means we collect minimal information when you register and we do not resell that information or use it in any objectionable way. You can review our privacy policy for full details.


Reloading retrieve_conf failed

Randy's picture

After installing FreePBX I am not able to use 'Apply Configuration Changes' succesfully. FreePBX is running, just like Asterisk. The problem is I can't effectuate the changes I entered in FreePBX. Doing that I started with Reload failed because retrieve_conf encountered an error: 126. After changing some filepermissions I ended up with Reload failed because retrieve_conf encountered an error: 255. The notification log on the dashboard isn't helpful. It only gives the above messages.

During the installation I encountered several problems, most of them solved by changing the filepermissions or installing extra software components. Now I think there is one step to take to finish the installation completely and get a fully functional system.
I don't think the FreePBX-software itself is failing. I suspect the combination of an existing Asterisk configuration on Suse extended by an install of FreePBX with a non-standard webroot.

Is there anyone who can give a few checkpoints?
What are the files and permissions to look for?

Basic configuration:
openSUSE 10.2
Asterisk 1.4.4
FreePBX 2.3.0RC1.1
Serverroot: http://localhost/asterisk (/srv/www/htdocs/asterisk)


__________________


Comment viewing options

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

Same failure here

dzone's picture

We are having the same problem in similar circumstances. We had a Centos4.5 box with Asterisk 1.4.10.1 already running, and we have just built everything to get FreePBX RC1 going.

We're close, but no cigar. For some reason the retrieve_conf fails just as you have described above. If we find a fix I will post it.

Rick Ross
DZone - fresh links for developers
http://www.dzone.com


Reloading retrieve_conf failed

final_target's picture

hi,
I had the same too, and solved it by reinstalling "framework-2.3.0.3.tgz" module, now it work properly. u can DL it from:
http://www.freepbx.org/trac/browser/modules/release/2.4


Reloading retrieve_conf failed

p_lindheimer's picture

Run retrieve_conf from the command line to see if you can get any more specific information:

cd /var/lib/asterisk/bin # or equivalent location on your distro
su - asterisk ./retrieve_conf

and see if any more details are provided as to where you are failing.


__________________

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


Reloading retrieve_conf failed

Randy's picture

Thanks for the hint.
Using "su - asterisk ./retrieve_conf" didn't show any traces, even using tail. However, when i did run ./retrieve_conf as root i got the following line:

PHP Fatal error: Call to undefined function _() in /var/lib/asterisk/bin/retrieve_conf on line 10

This line says:

define("WARNING_BANNER", "; "._("do not edit this file, this is an auto-generated file by freepbx\n")."; "._("all modifications must be done from the web gui")."\n\n\n");

To lazy to figure out what was wrong with the line I simply commented it out and rerun the script (again as root). Now it showed

[code]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/asterisk
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Added to globals: AMPMGRUSER = admin
Added to globals: AMPMGRPASS = amp111
Please update your modules and reload Asterisk by visiting http://192.168.1.2/admin

The problems seems te solved. It's now possible to do 'Apply Configuration Changes' in FreePBX. I think I still didn't solved the real problem, but for now it works for me.
There are a few points left:
- I still don't know why the script failed.
- It's not possible for me to run the scripts as the user asterisk.
- The last line of output generated by the script shows the wrong url because it uses AMPWEBADDRESS instead of AMPWEBROOT.


Reloading retrieve_conf failed

p_lindheimer's picture

can you try the following patch:

Index: retrieve_conf
===================================================================
--- retrieve_conf       (revision 4852)
+++ retrieve_conf       (working copy)
@@ -1,6 +1,13 @@
 #!/usr/bin/php -q
 
 <?php
+
+if (! function_exists("_")) {
+       function _($str) {
+               return $str;
+       }
+}
+
 ini_set('error_reporting', E_ALL & ~E_NOTICE);
 
 define("AMP_CONF", "/etc/amportal.conf");

You appear not to have the localization environment setup (the _() function) and this will fix that. As far as not being able to run as asterisk, that is problematic and you will want to get to root cause on that.

But please try the above patch as you have pointed out a valid bug that should be addressed which is to define the function if it is not in your environment.


__________________

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


Re: Same failure here

dzone's picture
dzone wrote:
We're close, but no cigar. For some reason the retrieve_conf fails just as you have described above. If we find a fix I will post it.

OK, it turns out this problem was all about permissions for us. Our apache is running as daemon/daemon, and it is not a desirable option for us to run apache on this machine as asterisk/asterisk.

It would be great if you could somehow supply the user/group under which apache is running and have FreePBX use those. We thought that possibly we could take advantage of suEXEC to help with this, but it didn't help.

We added daemon to the asterisk group, and we have had to add g+w to a lot of files and directories, but now it is mostly ok. The biggest problem is that many of the files/dirs being created by FreePBX and Asterisk are not group-writeable.

Rick


Reloading retrieve_conf failed

p_lindheimer's picture

the problem is with Asterisk and how it sets permissions on some voicemail files (600). Until we get to the point where we have a daemon (in the plans) it needs to run as asterisk or you will have problems with some functionality.

However - did the above patch fix the _() problem for you, feedback would be appreciated.


__________________

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


Reloading retrieve_conf failed

Randy's picture

The posted patch is ok.
The generated output file now contains the lines:

; do not edit this file, this is an auto-generated file by freepbx
; all modifications must be done from the web gui

Reload failed because retrieve_conf encountered an error: 255

carlcarr's picture

I am still getting the error message after applying the patch. FreePBX notice: retrieve_conf failed, config not appliedReload failed because retrieve_conf encountered an error: 255
Added ago
(freepbx.RCONFFAIL)

I tried su - asterisk ./retrieve_conf but I am getting an error on line 3 and line 11. This happened right after the upgrade this morning.

UPDATE NOTICE: There are 3 modules available for online upgrades framework 2.4.0beta1.1 (current: 2.4.0beta1.0) parking 2.4.0.2 (current: 2.4.0.1) core 2.4.0beta1.2 (current: 2.4.0beta1.1)


Cannot download the latest framework update

carlcarr's picture

Downloading framework 0 of (0%)Error(s) downloading framework:
Error opening http://mirror.freepbx.org/modules/release/2.4/framework-2.4.0beta1.2.tgz for reading

--------------------------------------------------------------------------------


bad timing - try again, make

p_lindheimer's picture

bad timing - try again, make sure it had been 10 minutes since the last time you tried.


__________________

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


All is fine now

carlcarr's picture

Hello Philippe,

All is working now after the upgrade. - Thank you for being a part of FreePBX. I cetainly appreciate your hard work and devotion. I am not a guru but, I am willing to help out where I can if you need any assistance.

Carl


I got this error and

jdaustin's picture

I got this error and determined that PHP was running out of memory.
I increased this line and it worked fine after that:

#memory_limit = 16M ; Maximum amount of memory a script may consume
memory_limit = 64M ; Maximum amount of memory a script may consume


Use of uninitialized value in string

eseixas's picture

When i run the /var/lib/asterisk/bin/retrieve_conf i'm getting this message:

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/asterisk
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Use of uninitialized value in string eq at /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.pl line 415.

Any idea ?


Not enough details to even

fskrotzki's picture

Not enough details to even guess. What version of FreePBX are you running? have you looked at the file at around line 415 to see what it is doing? Did it just suddenly start happening? is this a new install? what was changed previous to this?

In that the code for this file had some big changes (a hundred or so lines added) to it when 2.4.0.0 came out or right after it not possible to just guess.