Cannot connect to Asterisk Manager Interface after 2.6 upgrade.

Treytor's picture

I went to upgrade my version of FreePBX from 2.5.0.1 to the latest 2.6 beta, and everything appeared to install correctly, that is until I hit "Apply Configuration Settings"... then I'm greeting with a "Reload failed because FreePBX could not connect to the asterisk manager interface."

The front page says this "Critical Error retrieve_conf failed, config not applied"

Any idea what may have gone wrong? Thanks in advance for any help on this!

This is what the log says in the popup:

exit: 0

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
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
PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 144
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Use of undefined constant last - assumed 'last' in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 780
PHP Notice: Use of undefined constant last - assumed 'last' in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 780
PHP Notice: Use of undefined constant last - assumed 'last' in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 780
PHP Notice: Use of undefined constant last - assumed 'last' in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 780
PHP Notice: Use of undefined constant last - assumed 'last' in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 780
Please update your modules and reload Asterisk by browsing to your server.

1 error(s) occured, you should view the notification log on the dashboard or main screen to check for more details.


__________________


Comment viewing options

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

#3840 is responsible for

p_lindheimer's picture

#3840 is responsible for some of your errors


__________________

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


Thanks for the response!

Treytor's picture

I've swapped out retrieve_op_conf_from_mysql.php with the one in that ticket, but am still getting an error, which is different now:

exit: 0

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
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
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/modules/iaxsettings/functions.inc.php on line 166
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/modules/iaxsettings/functions.inc.php on line 197
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/modules/sipsettings/functions.inc.php on line 167
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/modules/sipsettings/functions.inc.php on line 221
Please update your modules and reload Asterisk by browsing to your server.

1 error(s) occured, you should view the notification log on the dashboard or main screen to check for more details.


don't know what the error in

p_lindheimer's picture

don't know what the error in dashboard is but the warnings are not important (though I've checked in changes to remove them). They will not result in any issue.


__________________

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


Dashboard

Treytor's picture

My mistake, the error in the dashboard is the same:

retrieve_conf failed, config not applied
Reload failed because FreePBX could not connect to the asterisk manager interface.
Added 1 minute ago
(freepbx.RCONFFAIL)

Is there somewhere else I can look to find some more information?


check your manager.conf

p_lindheimer's picture

check your manager.conf credentials compared to your amportal.conf configuration.


__________________

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


check your manager.conf

rats's picture

I have the same problem, after attempting and upgrade to 2.6 I received the error message: Reload failed because FreePBX could not connect to the asterisk manager interface.

I checked the credentials in /etc/amportal.conf and they were correct. I could not find manager.conf anywhere on the computer.

Is there a way to construct or reconstruct the file? If so, can you tell me how to do it?

Thanks.


Config compare

Treytor's picture

Okay I'm looking at these two files but am unclear what exactly I'm comparing...

I'd paste them here but there may be information within that I don't want publicly accessible.

I notice the passwords for AMPMGRPASS are the same in both files, which I assume is correct?

Thanks again for your time.


I get the same error as in

TimoCarl's picture

I get the same error as in the first contribution.

change as in ticket # 3840, I have already done

can you help me?


exit: 0 Checking for PEAR

TimoCarl's picture

exit: 0

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
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
PHP Warning: array_keys(): The first argument should be an array in /var/www/html/admin/extensions.class.php on line 292
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/extensions.class.php on line 292
PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 144
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
Please update your modules and reload Asterisk by visiting http://192.168.11.26/admin

1 error(s) occured, you should view the notification log on the dashboard or main screen to check for more details.


If you can't connect to the

p_lindheimer's picture

If you can't connect to the manager, check your credentials against your config. There are no obvious errors above. The warnings would not have anything to do with the issue, furthermore, if retrieve_conf could not connect to the manger, it should have bailed out earlier on (I thought, would have to check)


__________________

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


The Credentials are correct.

TimoCarl's picture

The Credentials are correct. permissions are also checked. any idea? The error came right after the update


Credentials...

Treytor's picture

from what I can tell, the credentials between amportal.conf and manager.conf match up...


there just isn't enough

p_lindheimer's picture

there just isn't enough information here to say what is going on.

Are you able to go to the FreePBX GUI and does it allow you to add an extension, for instance? Or is your extension tab greyed out?


__________________

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


the extension tab is greyed

TimoCarl's picture

the extension tab is greyed out and asterisk Server Status show error


ok - well something clearly

p_lindheimer's picture

ok - well something clearly is not right with your configuration. Make sure your amportal.conf file does not have the credentials wrong. Look at the whole file, it is read from top to bottom and any duplicate will have the last entry used.


__________________

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


Here my amportal.conf, it

TimoCarl's picture

Here my amportal.conf, it was not changed by me:

# This file contains settings for components of the Asterisk Management Portal
# Spaces are not allowed!
# Run /usr/src/AMP/apply_conf.sh after making changes to this file

# AMPDBHOST: the host to connect to the database named 'asterisk'
AMPDBHOST=localhost

# AMPDBUSER: the user to connect to the database named 'asterisk'
AMPDBUSER=asteriskuser

# AMPDBENGINE: the type of database to use
AMPDBENGINE=mysql

# AMPDBPASS: the password for AMPDBUSER
AMPDBPASS=amp109

# AMPENGINE: the telephony backend engine to use
AMPENGINE=asterisk

# AMPMGRUSER: the user to access the Asterisk manager interface
AMPMGRUSER=admin

# AMPMGRPASS: the password for AMPMGRUSER
AMPMGRPASS=amp111

# AMPBIN: where command line scripts live
AMPBIN=/var/lib/asterisk/bin

#AMPSBIN: where (root) command line scripts live
AMPSBIN=/usr/local/sbin

# AMPWEBROOT: the path to Apache's webroot (leave off trailing slash)
AMPWEBROOT=/var/www/html

# AMPCGIBIN: the path to Apache's cgi-bin dir (leave off trailing slash)
AMPCGIBIN=/var/www/cgi-bin

# AMPWEBADDRESS: the IP address or host name used to access the AMP web admin
#AMPWEBADDRESS=192.168.1.101
AMPWEBADDRESS=

# FOPWEBROOT:web root for the Flash Operator Panel
FOPWEBROOT=/var/www/html/panel

# FOPPASSWORD: the secret code for performing transfers and hangups in the Flash Operator Panel
FOPPASSWORD=passw0rd

# FOPSORT: FOP should sort extensions by Last Name [lastname] or by Extension [extension]
FOPSORT=extension

# FOPRUN: set to true if you want FOP started by freepbx_engine (amportal_start), false otherwise
FOPRUN=true

# AUTHTYPE: authentication type to use for web admin
# If type set to 'database', the primary AMP admin credentials will be the AMPDBUSER/AMPDBPASS above
# valid: none, database
AUTHTYPE=none

# AMPADMINLOGO: Defines the logo that is to be displayed at the TOP RIGHT of the admin screen.
# This enables you to customize the look of the administration screen.
# NOTE: images need to be saved in the ..../admin/images directory of your AMP install
# This image should be 55px in height
AMPADMINLOGO=custom-logo.png

# USECATEGORIES: Controls if the menu items in the admin interface are sorted by category (true),
# or sorted alphebetically with no categories shown (false). Defaults to true.
#USECATEGORIES=false

# AMPEXTENSIONS: the type of view for extensions admin
# If set to 'deviceanduser' Devices and Users will be administered seperately, and Users will be able to "login" to devices.
# If set to 'extensions' Devices and Users will me administered in a single screen.
AMPEXTENSIONS=extensions

# POST_RELOAD: automatically execute a script after applying changes in the AMP admin
# Set POST_RELOAD to the script you wish to execute after applying changes
# If POST_RELOAD_DEBUG=true, you will see the output of the script in the web page
# POST_RELOAD=
# POST_RELOAD_DEBUG=false

# ENABLECW: Enable call waiting by default when an extension is created (DEFAULT is yes)
# Set to 'no' to if you don't want phones to be commissioned with call waiting already
# enabled. The user would then be required to dial the CW feature code (*70 default) to
# enable their phone. Most installations should leave this alone. It allows multi-line
# phones to receive multiple calls on their line appearances.
ENABLECW=yes

#CWINUSEBUSY: Set to yes for extensions that have CW enabled to report as busy if
# they don't answer (resulting in busy voicemail greeting). Otherwise they simply
# report as no-answer (e.g. busy greeting servers no purpose
CWINUSEBUSY=yes

# AMPBADNUMBER: Set to false if you do not want the bad-number context generated which
# traps any bogus number or freature code and plays a message to the effect. If you use
# the Early Dial feature on some Grandstream phones, you will want to set this to false
AMPBADNUMBER=true

# The following are used to optionally have the freepbx backup program optionally
# send the generated backup to an ftp server
#
# FTPBACKUP=YES to enable
# FTPUSER, FTPPASSWORD, FTPSERVER must be set
# FTPSUBDIR is an optional subdirectory at the ftp server, it will cause ftp to do a cd
#
# There is no error checking so you should check to make sure these are set correctly. The
# ftp is saved after the backup, so it will not cause the local backup file to be effected
#
# FTPBACKUP=yes
#FTPUSER=asterisk
#FTPPASSWORD=password
#FTPSUBDIR=mybackupfolder
#FTPSERVER=myftpserver

# SSH BACKUP INFO: must have a valid SSHRSAKEY file and server, only supported through
# ssh. SUBDIR is optional and will be created if it does not exist.
#
# If SSHUSER is not set, it will default to the current user which is asterisk in any
# standard configuration.
#
#SSHBACKUP=yes
#SSHUSER=backups
#SSHRSAKEY=/etc/asterisk/backup_rsa
#SSHSUBDIR=mysubdir
#SSHSERVER=mybackupserver.com

# AMPPROVROOT=/var/ftp /tftpboot
# One or more directories where there are provisioning files that should be included in the backup. Currently
# these get backed up only, the FreePBX utility does not automatically restore them.
#
#AMPPROVROOT=/var/ftp /tftpboot
# AMPPROVEXCLUDE=/var/ftp/exclude-from-file-list
# a list of files to exclude, to be used in tar's --exclude-from argument
#
#AMPPROVEXCLUDE=/var/ftp/exclude-from-file-list

#AMPDBUSER=asteriskuser
#AMPDBPASS=amp109
#AMPDBNAME=asterisk
#ASTETCDIR=/etc/asterisk
#ASTMODDIR=/usr/lib/asterisk/modules
#ASTVARLIBDIR=/var/lib/asterisk
#ASTAGIDIR=/var/lib/asterisk/agi-bin
#ASTSPOOLDIR=/var/spool/asterisk
#ASTRUNDIR=/var/run/asterisk
#ASTLOGDIR=/var/log/asterisk
#AMPDISABLELOG=true


don't know what to tell you.

p_lindheimer's picture

don't know what to tell you.

Something is not right with your configuration somewhere because there is no issue in 2.6 to get to the manager and there are over 1000 people who have upgraded to 2.6, the forum would be flooded if that were broken.

Look again, or try manually connecting to the manager with those credentials and telnet, and various other diagnostics to figure out what is not computing.


__________________

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


ok many thanks

TimoCarl's picture

ok many thanks


Upgraded again to beta 2.2 - Problem still persists

Treytor's picture

Any ideas? FreePBX has been useless for me for the past week...

exit: 0

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
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
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
PHP Notice: Undefined offset: 1 in /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.php on line 133
Please update your modules and reload Asterisk by browsing to your server.

1 error(s) occured, you should view the notification log on the dashboard or main screen to check for more details.


There is unfortunately no

p_lindheimer's picture

There is unfortunately no information here of help. the notices are not related.

There seems to be something specific to your installation that you are going to have to troubleshoot. If it is the same issue wrt to manager access, you will need to dig deeper and find out why they are not working.

I realize this does not help you specifically but there are over 1700 beta installations currently and almost no issues being reported, which means that it is generally working very solid and you need to focus on what might be different, customized, etc. on your installation.


__________________

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


Check your Hosts file

indesignfirm's picture

So I had this exact same problem and ran for circles. Asterisk would tell me that it was online, yet freepbx wouldn't...

Here is what I figured out, and I hope it really helps you. Check your hosts file. For some unknown reason, localhost was no longer in my host file. Therefore when FreePBX was connecting to localhost, it had nowhere to go... I added localhost back into my hosts file, and immediately the world began turning on it's axis again!

HURRAY!!!! Thanks everyone for your hard work. Hope this helps!


That fixed it for me too

iandunn's picture

Thanks man, that was a huge help :)


That worked for me as well

castortech's picture

Thanks so much.

I never had any entries in hosts and it always worked before, but it seems to be a new requirement for this version.

That should be either checked or documented to avoid other from reliving the same daunting experience.

Thanks again for the clue.

Alain


Thanks for posting a fix.

Treytor's picture

Thanks for posting a fix. Excuse my newbie question here but where exactly is the hosts file on a freepbx install?


/etc/hosts

indesignfirm's picture

If you nano /etc/hosts you should have a entry that looks like this:

127.0.0.1 localhost

If you don't, add it and save it. This should help... Good Luck!


I see a hosts.allow file,

Treytor's picture

I see a hosts.allow file, which contains this:

#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#

Does it need to be just hosts or should I add " 127.0.0.1 localhost " to the hosts.allow file?

Thanks again for your help.

EDIT: Okay I SSH'd into the server and did a nano /etc/hosts - this is what it currently is -

# Do not remove the following line, or various programs
# that require network functionality will fail.
XXX.XXX.XXX.XX pbx.local pbx localhost.localdomain localhost
127.0.0.1 pbx.local pbx localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

I edited out the first IP, by the way.


Put the 127.0.0.1 Entry at top

indesignfirm's picture

Put the 127.0.0.1 entry at the top, and this should make the traffic route to the local IP instead of trying to use the external one... Save it and see if that works..


Brilliant!

Treytor's picture

That fixed it! Cheers mate, thank you again so much for your help!


No Problem

indesignfirm's picture

Glad it helped. Been banging my head against the wall for 3 days. If I can save someone else the brain damage, I'm glad to know I did! :)


Quote: Excuse my newbie

SkykingOH's picture
Quote:
Excuse my newbie question here but where exactly is the hosts file on a freepbx install?

This is not a FreePBX question it's a Linux one. Look in /etc

Just a point of curiosity, how did you get FreePBX installed from scratch without knowing where the hosts file is? If you used an ISO, which one?

Hope this helps...


PBX in a Flash

Treytor's picture

PBX in a Flash


Did a fresh install of

merlyn's picture

Did a fresh install of pbxinaflash openvz 32 bit version and the host file is incomplete just as you said.

Thanks I wrestled with this error for a while and finally just wiped the whole install and did the whole install over again, from scratch it was easier :)

I went with the option of not installing the beta and that fixed it hehehe . wll at least i know what the problem was.

merlyn


Wow three answers as fast as

SkykingOH's picture

Wow three answers as fast as I could type mine.

127.0.0.1 is the loopback address. Look at ifconfig and it will make sense. Ethernet specs call for a loopback so processes can use the Ethernet stack as a way to communicate internally.

It's much more efficient that semaphores and pipes and such and allows the same code to be used for internal vs external communication.

I mention this because hosts.allow controls the types of traffic flows. You don't want to touch that file.


Reload failed because FreePBX could not connect to the asterisk

wasi.syed's picture

hello,

Current Freepbx version 2.8.1.3
even myself facing same kind of error after upgrading some component online .

throughout current thread had checked all parameter and done changes but still problem persist.

pls check manager.conf and amportal.conf

Amportal.conf

GNU nano 1.3.12 File: amportal.conf

# This file is part of FreePBX.
#
# FreePBX is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# FreePBX is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with FreePBX. If not, see .
#
# This file contains settings for components of the Asterisk Management Portal
# Spaces are not allowed!
# Run /usr/src/AMP/apply_conf.sh after making changes to this file

# AMPDBHOST: the host to connect to the database named 'asterisk'
AMPDBHOST=localhost

# AMPDBUSER: the user to connect to the database named 'asterisk'
# AMPDBUSER=asteriskuser
AMPDBUSER=asteriskuser
# AMPMGRPASS: the password for AMPMGRUSER
# AMPMGRPASS=amp111
AMPMGRPASS=elastix456

# AMPBIN: where command line scripts live
AMPBIN=/var/lib/asterisk/bin

#AMPSBIN: where (root) command line scripts live
AMPSBIN=/usr/sbin

# AMPWEBROOT: the path to Apache's webroot (leave off trailing slash)
AMPWEBROOT=/var/www/html

# AMPCGIBIN: the path to Apache's cgi-bin dir (leave off trailing slash)
AMPCGIBIN=/var/www/cgi-bin

# AMPWEBADDRESS: the IP address or host name used to access the AMP web admin

#AMPWEBADDRESS=192.168.1.101
AMPWEBADDRESS=192.168.10.5:2179

# FOPWEBROOT:web root for the Flash Operator Panel
FOPWEBROOT=/var/www/html/panel

# FOPPASSWORD: the secret code for performing transfers and hangups in the Flas$
# FOPPASSWORD=passw0rd
FOPPASSWORD=eLaStIx.2oo7

# AMPMGRPASS: the password for AMPMGRUSER
# AMPMGRPASS=amp111
AMPMGRPASS=elastix456

# AMPBIN: where command line scripts live
AMPBIN=/var/lib/asterisk/bin

#AMPSBIN: where (root) command line scripts live
AMPSBIN=/usr/sbin

# AMPWEBROOT: the path to Apache's webroot (leave off trailing slash)
AMPWEBROOT=/var/www/html

# AMPCGIBIN: the path to Apache's cgi-bin dir (leave off trailing slash)
AMPCGIBIN=/var/www/cgi-bin

# AMPWEBADDRESS: the IP address or host name used to access the AMP web admin
#AMPWEBADDRESS=192.168.1.101
AMPWEBADDRESS=192.168.10.5:2179

# FOPWEBROOT:web root for the Flash Operator Panel
FOPWEBROOT=/var/www/html/panel

# FOPPASSWORD: the secret code for performing transfers and hangups in the Flas$
# FOPPASSWORD=passw0rd
FOPPASSWORD=eLaStIx.2oo7

# AMPEXTENSIONS: the type of view for extensions admin
# If set to 'deviceanduser' Devices and Users will be administered seperately, and Users will be able to "login" to devices.
# If set to 'extensions' Devices and Users will me administered in a single screen.
AMPEXTENSIONS=extensions

# ENABLECW: Enable call waiting by default when an extension is created (DEFAULT is yes)
# Set to 'no' to if you don't want phones to be commissioned with call waiting already
# enabled. The user would then be required to dial the CW feature code (*70 default) to
# enable their phone. Most installations should leave this alone. It allows multi-line
# phones to receive multiple calls on their line appearances.
# ENABLECW=yes
ENABLECW=no

# CWINUSEBUSY: Set to yes for extensions that have CW enabled to report as busy if
# they don't answer (resulting in busy voicemail greeting). Otherwise they simply
# report as no-answer (e.g. busy greeting servers no purpose
# CWINUSEBUSY=yes

# AMPBADNUMBER: Set to false if you do not want the bad-number context generated which
# traps any bogus number or freature code and plays a message to the effect. If you use
# the Early Dial feature on some Grandstream phones, you will want to set this to false
#AMPBADNUMBER=true

# The following are used to optionally have the freepbx backup program optionally
# send the generated backup to an ftp server
#
# FTPBACKUP=YES to enable
# FTPUSER, FTPPASSWORD, FTPSERVER must be set
# FTPSUBDIR is an optional subdirectory at the ftp server, it will cause ftp to do a cd
#
# There is no error checking so you should check to make sure these are set correctly. The
# ftp is saved after the backup, so it will not cause the local backup file to be effected

# FTPBACKUP=yes
#FTPUSER=asterisk
#FTPPASSWORD=password
#FTPSUBDIR=mybackupfolder
#FTPSERVER=myftpserver

# SSH BACKUP INFO: must have a valid SSHRSAKEY file and server, only supported through
# ssh. SUBDIR is optional and will be created if it does not exist.
#
# If SSHUSER is not set, it will default to the current user which is asterisk in any
# standard configuration.
#
#SSHBACKUP=yes
#SSHUSER=backups
#SSHRSAKEY=/etc/asterisk/backup_rsa
#SSHSUBDIR=mysubdir
#SSHSERVER=mybackupserver.com

# AMPPROVROOT=/var/ftp /tftpboot
# One or more directories where there are provisioning files that should be included in the backup. Currently
# these get backed up only, the FreePBX utility does not automatically restore them.
#
#AMPPROVROOT=/var/ftp /tftpboot
# AMPPROVEXCLUDE=/var/ftp/exclude-from-file-list
# a file containing a list of file/directories to exclude, (will be used in tar's --exclude-from argument)
#
#AMPPROVEXCLUDE=/var/ftp/exclude-from-file-list

#AMPBACKUPSUDO=false|true
#AMPPROVEXCLUDELIST=/dir file
# a list of files/directories to exclude, (will be used in tar's --exclude argument)
#
#AMPPROVEXCLUDELIST=/etc/selinux /tftpboot/polycom /tftpboot/*.ld /tftpboot/*.cmp /tftpboot/*.st

#AMPBACKADMIN=true|false
#option to exclude the admin/ web dir from backups. This is will result in significantly smaller backups
# defaults to true - always backup admin dir
#AMPBACKADMIN=true

# If CUSTOMASERROR is set to false, then the Destination Registry will not report unknow destinations as errors
# this should be left to the default true and custom destinations should be moved into the new custom apps registry
# CUSTOMASERROR=false

# if DYNAMICHINTS is set to true, Core will not statically generate hints. Instead it will make a call to the
# AMPBIN php script, generate_hints.php, through an Asteirsk's #exec call. This requires Asterisk.conf to be
# configured with "execincludes=yes" set in the [options] section.
# DYNAMICHINTS=true

# XTNCONFLICTABORT, BADDESTABORT
# setting either of these to true will result in retrieve_conf aborting during a reload if an extension
# conflict is detected or a destination is detected. It is usually better to allow the reload to go
# through and then correct the problem but these can be set if a more strict behavior is desired
# both default to false if not set
XTNCONFLICTABORT=false
BADDESTABORT=false

# SERVERINTITLE if set to true, the browser title will be preceded with the server name. default false
SERVERINTITLE=false
# USEDEVSTATE = true|false # DEFAULT VALUE false
# If this is set, it assumes that you are running Asterisk 1.4 or higher and want to take advantage of the
# func_devstate.c backport available from Asterisk 1.6 which allows custom hints to be created to support
# BLF for server side feature codes such as daynight, followme, etc.
#
USEDEVSTATE=true

# MODULEADMINWGET=true|false # DEFAULT VALUE false
# Module Admin normally tries to get its online information through direct file open type calls to URLs that
# go back to the freepbx.org server. If it fails, typically because of content filters in firewalls that don't
# like the way PHP formats the requests, the code will fall back and try a wget to pull the information.
# This will often solve the problem. However, in such environemnts there can be a significant timeout before
# the failed file open calls to the URLs return and there are often 2-3 of these that occur. Setting this value
# will force FreePBX to avoid the attempt to open the URL and go straight to the wget calls.
#
MODULEADMINWGET=false

# AMPDISABLELOG=true|false # DEFAULT VALUE true
# Whether or not to invoke the freepbx log facility

# AMPSYSLOGLEVEL=LOG_EMERG|LOG_ALERT|LOG_CRIT|LOG_ERR|LOG_WARNING|LOG_NOTICE|LOG_INFO|LOG_DEBUG|LOG_SQL|SQL # DEFAULT VALUE LOG_ERR
# Where to log if enabled, SQL, LOG_SQL logs to old MySQL table, others are passed to syslog system to determine where to log

# AMPENABLEDEVELDEBUG=true|false # DEFAULT VALUE false
# Whether or not to include log messages marked as 'devel-debug' in the log system

# AMPMPG123=true|false # DEFAULT VALUE true
# When set to false, the old MoH behavior is adopted where MP3 files can be loaded and WAV files converted to MP3
# The new default behavior assumes you have mpg123 loaded as well as sox and will convert MP3 files to WAV. This is
# highly recommended as MP3 files heavily tax the system and can cause instability on a busy phone system.

# CDR DB Settings: Only used if you dont use the default values provided by freepbx.
# CDRDBHOST: hostname of db server if not the same as AMPDBHOST
# CDRDBPORT: Port number for db host
# CDRDBUSER: username to connect to db with if its not the same as AMPDBUSER
# CDRDBPASS: password for connecting to db if its not the same as AMPDBPASS
# CDRDBNAME: name of database used for cdr records
# CDRDBTYPE: mysql or postgres mysql is default
# CDRDBTABLENAME: Name of the table in the db where the cdr is stored cdr is default

# AMPVMUMASK: defaults to 077 allowing only the asterisk user to have any permissions on VM files. If set to something
# like 007, it would allow the group to have permissions. This can be used if setting apache to a different
# user then asterisk, so that the apache user (and thus ARI) can have access to read/write/delete the
# voicemail files. If changed, some of the voicemail directory strucuters may have to be manually changed.

# DASHBOARD_STATS_UPDATE_TIME=integer_seconds
# DEFAULT VALUE: 6
# DASHBOARD_INFO_UPDATE_TIME=integer_seconds
# DEFAULT VALUE: 20
# These can be used to change the refresh rate of the System Status Panel. Most of
## less frequently (such as Astersisk Uptime) based on the INFO value

# FOPDISABLE=true|false # DEFAULT VALUE false
# Disables FOP in interface and retrieve_conf. Usefull for sqlite3 or if you don't want FOP.

# ZAP2DAHDICOMPAT=true|false
ZAP2DAHDICOMPAT=true
# DEFAULT VALUE: false
# If set to true, FreePBX will check if you have chan_dadhi installed. If so, it will
# automatically use all your ZAP configuration settings (devices and trunks) and
# silently convert them, under the covers, to DAHDI so no changes are needed. The
# GUI will continue to refer to these as ZAP but it will use the proper DAHDI channels.
# This will also keep Zap Channel DIDs working.

# CHECKREFERER=true|false
DEFAULT VALUE: false
# When set to the default value of true, all requests into FreePBX that might possibly add/edit/delete settings will
the stats are updated based on the STATS interval but a few items are checked
# USEQUEUESTATE=true|false
# DEFAULT VALUE: false
# Setting this flag will generate the required dialplan to integrate with the following Asterisk patch:
# https://issues.asterisk.org/view.php?id=15168
# This feature is planned for a future 1.6 release but given the existance of the patch can be used prior. Once
# the release version is known, code will be added to automatically enable this format in versions of Asterisk
# that support it.

# USEGOOGLEDNSFORENUM=true|false
# DEFAULT VALUE: false
# Setting this flag will generate the required global variable so that enumlookup.agi will use Google DNS 8.8.8.8
# when looking up ENUMS
# Not all DNS deals with NAPTR record, but Google does. There is a drawback to this as Google tracks every
# lookup. If you are not comfortable with this, do not enable this setting. Please read Google FAQ about this:
# http://code.google.com/speed/public-dns/faq.html#privacy

# MOHDIR=subdirectory_name
# This is the subdirectory for the MoH files/directories which is located in ASTVARLIBDIR
# if not specified it will default to mohmp3 for backward compatibility.
MOHDIR=mohmp3

# AMPMODULEXML lets you change the module repository that you use. By default, it
# should be set to http://mirror.freepbx.org/ - Presently, there are no third
# party module repositories.
AMPMODULEXML=http://mirror.freepbx.org/

# AMPMODULESVN is the prefix that is appended to tags in the XML file.
# This should be set to http://mirror.freepbx.org/modules/
AMPMODULESVN=http://mirror.freepbx.org/modules/
AMPDBNAME=asterisk

ASTETCDIR=/etc/asterisk
ASTMODDIR=/usr/lib64/asterisk/modules
ASTVARLIBDIR=/var/lib/asterisk
ASTAGIDIR=/var/lib/asterisk/agi-bin
ASTSPOOLDIR=/var/spool/asterisk
ASTRUNDIR=/var/run/asterisk
ASTLOGDIR=/var/log/asterisk

MANAGER.CONF

;
; AMI - Asterisk Manager interface
;
; FreePBX needs this to be enabled. Note that if you enable it on a different IP, you need
; to assure that this can't be reached from un-authorized hosts with the ACL settings (permit/deny).
; Also, remember to configure non-default port or IP-addresses in amportal.conf.
;
; The AMI connection is used both by the portal and the operator's panel in FreePBX.
;
; FreePBX assumes an AMI connection to localhost:5038 by default.
;
[general]
enabled = yes
port = 5038
; port = 2179
bindaddr = 127.0.0.1

[admin]
secret = elastix456
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate

# include manager_additional.conf
# include manager_custom.conf

Pls advise further troubleshoot..

regds
wasi