911 Emergency Upgrade From 12 to 13 Fail

Did a 12 to 13 upgrade and it failed.

Keep this this error when doing a amportal reload

Error(s) have occured, the following is the retrieve_conf output:
exit: 1
Exception: Unable to connect to Asterisk Manager from /var/lib/asterisk/bin/retrieve_conf, aborting in file /var/lib/asterisk/bin/retrieve_conf on line 13
Stack trace:

  1. Exception->() /var/lib/asterisk/bin/retrieve_conf:13

I have tried everything that i know to do

fwconsole chown

When I run

amportal reload i get this

Reloading FreePBX
Error(s) have occured, the following is the retrieve_conf output:
exit: 1
Exception: Unable to connect to Asterisk Manager from /var/lib/asterisk/bin/retrieve_conf, aborting in file /var/lib/asterisk/bin/retrieve_conf on line 13
Stack trace:

  1. Exception->() /var/lib/asterisk/bin/retrieve_conf:13

chown [args1] … [argsN]

So I ran

amportal a m
then
UPDATE freepbx_settings SET value=‘newpassword’ WHERE keyword=‘AMPMGRPASS’;

and still get the same error.

[[email protected] freepbx]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 321
Server version: 5.1.73 Source distribution

Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> use asterisk;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from admin where variable = ‘version’;
±---------±---------+
| variable | value |
±---------±---------+
| version | 13.0.113 |
±---------±---------+
1 row in set (0.00 sec)

mysql>

Sorry for all the post but trying to give as much info as I can

I ran a statement in mysql and the password is correct in the database and in the manager.conf

mysql> select * from freepbx_settings where keyword=‘AMPMGRPASS’;
±-----------±-------±--------------------------±------±-----------------------------------------------------------------------------------------------------------------±-----±--------±-----------±---------±-------±-----------------±-------±--------±----------+
| keyword | value | name | level | description | type | options | defaultval | readonly | hidden | category | module | emptyok | sortorder |
±-----------±-------±--------------------------±------±-----------------------------------------------------------------------------------------------------------------±-----±--------±-----------±---------±-------±-----------------±-------±--------±----------+
| AMPMGRPASS | amp111 | Asterisk Manager Password | 2 | Password for accessing the Asterisk Manager Interface (AMI), this will be automatically updated in manager.conf. | text | | amp111 | 0 | 0 | Asterisk Manager | | 0 | -100 |
±-----------±-------±--------------------------±------±-----------------------------------------------------------------------------------------------------------------±-----±--------±-----------±---------±-------±-----------------±-------±--------±----------+
1 row in set (0.00 sec)


Database changed
mysql> select * from freepbx_settings where keyword=‘AMPMGRUSER’;
±-----------±------±----------------------±------±-----------------------------------------------------------------------------------------------------------------±-----±--------±-----------±---------±-------±-----------------±-------±--------±----------+
| keyword | value | name | level | description | type | options | defaultval | readonly | hidden | category | module | emptyok | sortorder |
±-----------±------±----------------------±------±-----------------------------------------------------------------------------------------------------------------±-----±--------±-----------±---------±-------±-----------------±-------±--------±----------+
| AMPMGRUSER | admin | Asterisk Manager User | 2 | Username for accessing the Asterisk Manager Interface (AMI), this will be automatically updated in manager.conf. | text | | admin | 0 | 0 | Asterisk Manager | | 0 | -100 |
±-----------±------±----------------------±------±-----------------------------------------------------------------------------------------------------------------±-----±--------±-----------±---------±-------±-----------------±-------±--------±----------+
1 row in set (0.00 sec)

mysql>

amportal.conf

had the wrong password in it so i changed it but yet still no asterisk starting.

ANYBODY HAVE ANY IDEAS ON WHAT I CAN TRY NEXT

# Asterisk Manager Host
# Default Value: localhost
ASTMANAGERHOST=localhost

# Asterisk Manager Password
# Default Value: amp111
AMPMGRPASS=amp111

FreePBX is unable to connect to the Asterisk AMI, this could be because:

  1. Asterisk is not running
  2. The AMI credentials between FreePBX and Asterisk don’t match
  3. Asterisk is running but there is an issue with AMI

Ignore amportal.conf. From your SQL queries, you know that FreePBX expects the AMI credentials to be admin/amp111 so check the content of /etc/asterisk/manager.conf and see if the credentials match. Then at the asterisk CLI:

*CLI> manager show user admin

          username: admin
            secret: <Set>
               ACL: yes
         read perm: system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate,message
        write perm: system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate,message
   displayconnects: no
allowmultiplelogin: yes
         Variables:

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
bindaddr = 0.0.0.0
displayconnects=no ;only effects 1.6+

[admin]
secret = amp111
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,message
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message
writetimeout = 5000

#include manager_additional.conf
#include manager_custom.conf

Please wait…

/var/lib/asterisk/bin/freepbx_engine: line 236: /var/lib/asterisk/bin/freepbx_engine_hook_dahdiconfig: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 236: /var/lib/asterisk/bin/freepbx_engine_hook_pagingpro: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 236: /var/lib/asterisk/bin/freepbx_engine_hook_ucp: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 236: /var/lib/asterisk/bin/freepbx_engine_hook_vqplus: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 236: /var/lib/asterisk/bin/freepbx_engine_hook_xmpp: No such file or directory
!!!amportal is depreciated. Please use fwconsole!!!
forwarding all commands to 'fwconsole’
Running FreePBX startup…
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions…

[Whoops\Exception\ErrorException]
filetype(): Lstat failed for /var/spool/asterisk/monitor/2015/06/15/in-6184633559-9192663671-20150615-103711-1434382630.
19858.wav

start [–pre] [–post] [args1] … [argsN]

Starting REST applications daemon: [ OK ]
REST Applications module is not licensed.
Stopping fail2ban: [ OK ]
Ensuring logfiles are presentStarting fail2ban: [ OK ]
[[email protected] ~]#

[[email protected] ~]# amportal reload

Please wait…

/var/lib/asterisk/bin/freepbx_engine: line 236: /var/lib/asterisk/bin/freepbx_engine_hook_dahdiconfig: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 236: /var/lib/asterisk/bin/freepbx_engine_hook_pagingpro: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 236: /var/lib/asterisk/bin/freepbx_engine_hook_ucp: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 236: /var/lib/asterisk/bin/freepbx_engine_hook_vqplus: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 236: /var/lib/asterisk/bin/freepbx_engine_hook_xmpp: No such file or directory
!!!amportal is depreciated. Please use fwconsole!!!
forwarding all commands to 'fwconsole’
Reloading FreePBX
Error(s) have occured, the following is the retrieve_conf output:
exit: 1
Exception: Unable to connect to Asterisk Manager from /var/lib/asterisk/bin/retrieve_conf, aborting in file /var/lib/asterisk/bin/retrieve_conf on line 13
Stack trace:

  1. Exception->() /var/lib/asterisk/bin/retrieve_conf:13

I had a similar error - the way I was connecting to Asterisk was messing me up - I had set it up to connect from 127.0.0.1 and then told the rest of the system to always use 192.168.0.2.

I fixed it by double checking all of my allow and permit statements (IP address ACLs) to make sure that the localhost entry was included AS WELL AS the local network. Once I got it up and running, I was able to tune it down to just the addresses I actually needed and was also able to find all of the places where I’d gotten the access ranges for the IP addresses wrong.

I dont run the firewall or acls. THis was just a upgrade from 12 to 13

In the manager.conf file set, there are IP address lists that you need to make sure are set correctly.

IIRC, not having them is the same as “don’t allow access from anywhere”.

Also, make sure that the password didn’t change. I recall a problem with one of the passwords in the default config files suddenly changing and making some stuff inaccessible,

This sounds like there may be a file system issue on your machine. That file was reported to exist, and when it went to look at it, it wasn’t there.

This maybe what is causing your issue. If that file exists, delete it.

I deleted those files but i still get

[[email protected] ~]# amportal reload

Please wait…

!!!amportal is depreciated. Please use fwconsole!!!
forwarding all commands to 'fwconsole’
Reloading FreePBX
Error(s) have occured, the following is the retrieve_conf output:
exit: 1
Exception: Unable to connect to Asterisk Manager from /var/lib/asterisk/bin/retrieve_conf, aborting in file /var/lib/asterisk/bin/retrieve_conf on line 13
Stack trace:

  1. Exception->() /var/lib/asterisk/bin/retrieve_conf:13
    [[email protected] ~]#

Is asterisk running?

manager.conf in /etc/asterisk is as follows

;
; 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
bindaddr = 0.0.0.0
displayconnects=no ;only effects 1.6+

[admin]
secret = My Password
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,message
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message
writetimeout = 5000

#include manager_additional.conf
#include manager_custom.conf

No not al all lol

asterterisk -rvvvv get me this

[[email protected] ~]# asterisk -rvv
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
[[email protected] ~]#

fwconsole start is going to fix your problem then

[[email protected] ~]# fwconsole start
Running FreePBX startup…
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions…

[Whoops\Exception\ErrorException]
filetype(): Lstat failed for /var/spool/asterisk/monitor/2015/06/15/in-6184
633559-9192663671-20150615-103711-1434382630.19858.wav

start [–pre] [–post] [args1] … [argsN]

[[email protected] ~]#

As I Said, file system corruption.