SOLVED: Can Not Connect to Asterisk after upgrade from 13 to 14

SOLVED: (Phew!!)
Based on another post I changed the secret= in /etc/asterisk/manager.conf to match Settings->Advanced->Asterisk Manager Password
It did not match originally.

Note that the red “Can Not Connect To Asterisk” label comes up and stays for a few minutes. I Guess asterisk is taking longer to start.

Upgrade process had a problem with kvstore.sipsettings
Ran this and solved it :
fwconsole ma downloadinstall sipsettings --tag 13.0.27.8
fwconsole ma upgrade sipsettings

then ran
./post_upgrade

The kvstore.sipsettings error disappeared, but “Asterisk not Running” came up twice.
service asterisk start
says:
Starting asterisk (via systemctl): [ OK ]

Stopped asterisk and Ran:
[root@localhost ~]# fwconsole start


Running FreePBX startup…
Taking too long? Customize the chown command, See Sangoma Documentation
Setting Permissions…
Setting base permissions…Done
Setting specific permissions…
51708 [============================]
Finished setting permissions
Running Asterisk pre from Dahdiconfig module
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
DAHDi: Already started
Running Asterisk pre from Firewall module
Running Asterisk pre from Sysadmin module
Running Sysadmin Hooks
Restarting fail2ban
fail2ban Restarted
Checking Vpn server
Starting Asterisk…
[--------------->------------] 2 mins
In Start.class.php line 187:
Unable to connect to Asterisk. Did it start?
start [–pre] [–post] [–skipchown] [–] []…


When I started asterisk manually and ran fwconsole start:
[root@localhost ~]# service asterisk start
Starting asterisk (via systemctl): [ OK ]
[root@localhost ~]# ^C
[root@localhost ~]# fwconsole start
Asterisk already running

Seemed ok, but the Freepbx GUI still says “can not connect to asterisk”

Based on another thread:

[root@localhost ~]# ps aux | grep asterisk
asterisk 924 0.0 0.0 113176 1484 ? S 16:08 0:00 /bin/bash /opt/isymphony3/server//startup.sh – iSymphonyServer
asterisk 938 0.0 0.0 113180 1576 ? S 16:08 0:00 /bin/bash iSymphonyServer.sh start
asterisk 1259 0.2 0.4 731452 28156 ? S 16:08 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1260 0.0 0.1 624676 11288 ? S 16:08 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1261 0.0 0.1 624676 11212 ? S 16:08 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1262 0.3 0.4 734304 26856 ? S 16:08 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1263 0.0 0.1 624676 11112 ? S 16:08 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1284 29.3 6.1 4186412 360928 ? Sl 16:08 0:38 /usr/lib/jvm/jre-openjdk//bin/java -Xms256m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=50 -XX:-OmitStackTraceInFastThrow -Dcom.xmlnamespace.panel.freepbx.auth.port=80 -classpath /opt/isymphony3/server/modules/chat/shared/:/opt/isymphony3/server/modules/contact/shared/:/opt/isymphony3/server/modules/xmpp/shared/:/opt/isymphony3/server/modules/lang-en-us/shared/:/opt/isymphony3/server/modules/desktop/shared/:/opt/isymphony3/server/modules/framework/shared/:/opt/isymphony3/server/modules/pbx/shared/:/opt/isymphony3/server/modules/asterisk/shared/::./lib/*:iSymphonyServer.jar com.xmlnamespace.panel.server.Server
asterisk 1314 0.0 0.1 197980 8576 ? Ss 16:08 0:00 /usr/bin/python /usr/local/bin/pnp_server
asterisk 1544 0.0 0.1 624676 11100 ? S 16:08 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1563 0.8 0.9 739044 54756 ? S 16:08 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1564 0.0 0.3 729148 20756 ? S 16:08 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1565 0.0 0.3 729732 21600 ? S 16:08 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1566 0.1 0.4 733508 28680 ? S 16:08 0:00 /usr/sbin/httpd -DFOREGROUND
root 2060 0.0 0.0 115300 808 ? S 16:09 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
asterisk 2064 1.6 0.8 2114696 49652 ? Sl 16:09 0:01 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c
asterisk 2227 0.0 0.1 624544 9980 ? S 16:09 0:00 /usr/sbin/httpd -DFOREGROUND
root 2631 0.0 0.0 112712 988 pts/0 S+ 16:10 0:00 grep --color=auto asterisk
[root@localhost ~]#

You know there is almost no occasion where starting asterisk with a service start is correct, right? My guess is that you are messing with the file permissions and ownerships by starting the Asterisk process as ‘root’ and then stopping and restarting it with “fwconsole” (which starts it as the ‘asterisk’ user).

I’d start with not using the “service start”. Stick with the ‘fwconsole’ commands (start, stop, restart, etc.) and I think a lot of your problems will self-solve.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.