"Connecting to Asterisk Manager..." but never connects

I am setting up a node for a friend 52352 and thought I would be slick and just copy my image to his (same hardware)- I adjusted everything and the node is working but Allmon never connects to the AMI(sp?)
I have checked manager.conf and the allmon2 cfg file many times and they match. I can log into the web interface too. Suggestions? Not sure what I am missing.
Clifford

OMG now my original node is doing the same thing- not sure what happened- file permissions? Ugh- so strange not changed anything on orig node. 48654

1 Like

anybody? suggestions? thx

1 Like

backup, backup, backup! All you need is to copy everything in /etc/asterisk/. We (ASL) even supply a backup service; https://wiki.allstarlink.org/wiki/Backup

When bringup a new node install app_rpt as you would from scratch, rename the asterisk directory, make a new one and copy the backup files to it. Easy and quick.

end lecture

Have you checked manager.conf for the correct bindaddr and permissions? Use the search tool on this site (or google) for settings. If all else fails post you manger.conf (sans password) so we can take a look.

1 Like

I cloned the drive. I do backup both locally and to ASL servers. Cloning was fast. Thx for outlining another way to do it. I have checked allmon.ini and manager.conf many many times I see nothing out of place. bindaddr is fine at 127.0.0.1:5038 and user/pass matches in manager and allmon cfg files.
I can log on to allmon but only displays ā€œWaitingā€ for a split sec then ā€œConnecting to Asterisk Managerā€¦ā€

Manager-

bindaddr = 127.0.0.1 ; Local interface only! $
displayconnects = yes
;
; Add a Unix epoch timestamp to events (not action responses)
;
;timestampevents = yes

[admin]
secret = ******** $
read = all,system,call,log,verbose,command,agent,user,config
write = all,system,call,log,verbose,command,agent,user,config

Allmon-

<?php
[Off-site Link]
url=http://google.com
[48654]
host=127.0.0.1:5038
user=admin
passwd=********
nomenu=no
hideNodeURL=yes
;[501]
;system=System1
;host=127.0.0.1:5038
;user=admin
;passwd=********
;nomenu=yes
;hideNodeURL=yes
;[502]
;system=System1
;host=127.0.0.1:5038
;user=admin
;passwd=password2
;nomenu=yes
;hideNodeURL=yes
;[2000]
;system=System2
;host=127.0.0.1:5037
;user=admin
;passwd=password2
;[2000 RTCM]
;system=System2
;rtcmnode=2000
;[Grouped Nodes]
;nodes=500,501,2000
;[2 RTCMs]
;system=System2
;rtcmnode=2000,2001
?>

I donā€™t think the port is supposed to be specified on the bindaddr.

[general]                                                                       
displaysystemname = yes                                                         
enabled = yes                                                                   
;webenabled = yes                                                               
port = 5038                                                                     
                                                                                
;httptimeout = 60                                                               
; a) httptimeout sets the Max-Age of the http cookie                            
; b) httptimeout is the amount of time the webserver waits                      
;    on a action=waitevent request (actually its httptimeout-10)                
; c) httptimeout is also the amount of time the webserver keeps                 
;    a http session alive after completing a successful action                  
                                                                                
bindaddr = 127.0.0.1   ; Local interface only!                                                           
;displayconnects = yes                                                          
;                                                                               
; Add a Unix epoch timestamp to events (not action responses)                   
;                                                                               
;timestampevents = yes                                                          
                                                                                
[admin]                                                                         
secret = <secret>                                                                  
read = all,system,call,log,verbose,command,agent,user,config                    
write = all,system,call,log,verbose,command,agent,user,config     

It is not. My cfg are as you suggest I posted them right there. The port is defined that way in the allmon cfg by default. Thx.

I canā€™t read your allmon.ini.php. Please post it by putting 3 backticks (```) on a line by them self. Then, on the next line, paste your config. Then finish it off with 3 more backticks on the line following your config.

done- thx - Clifford

1 Like

See if AMI is alive. Test with telnetā€¦

http://www.jcgonzalez.com/test-asterisk-ami-telnet

1 Like

Neither asterisk CLI nor the root user recognize the command suggested- ā€œtelnet localhost 5038ā€

root@ASL_PI_48654:/etc/asterisk# telnet localhost 5038
bash: telnet: command not found
root@ASL_PI_48654:/etc/asterisk#

1 Like

sudo apt-get install telnet

1 Like

Thanks!

root@ASL_PI_48654:/home/repeater# telnet localhost 5038
Trying ::1ā€¦
Trying 127.0.0.1ā€¦
Connected to localhost.
Escape character is ā€˜^]ā€™.
Asterisk Call Manager/1.0

Both nodes are good in this department!
I am able to login successfully on both nodes:

Action: Login
ActionID: 1
Username: admin
Secret: ********

Response: Success
ActionID: 1
Message: Authentication accepted

Also- I have tried to understand what actually requests the login and how the info is generated like ā€œConnecting to Asterisk Managerā€¦ā€ but I have not figured it out. I have looked at page source and try to understand but js is not my forteā€™.

Try setting a simple password, only letters and numbers. I had a report a while back (post is on here somewhere) that some special character caused AMI login to fail.

My passwords are only letters and numbers. I changed it anyway to no effect. Strange!

Does anyone know what script on the Allmon page requests access to ASM and then what produces the text output? (ā€œConnecting to Asterisk Managerā€¦ā€)
If I understood what was actually taking place behind the scenes maybe I could solve this problem. I have tried reverse engineering it- but cannot locate the code on the web page or the ASM executable etc.

@kk6qms, Sounds like youā€™re getting desperate. If you didnā€™t know Iā€™m the developer of Allmon. Would you like to do a TeamViewer session? Iā€™ll be glad to take a look at your setup.

I just want to solve the problem and give my 77yo friend his node so he can start enjoying it. Ya a TV session would be great as my ISP is dragging their feet getting me in bridge mode so I can get all my port forwarding set up for SSH etc. Sending you my TV info privately- thanks!

Thanks for the help Tim. That was a strange one! Reinstall of Allmon went smoothly.

1 Like

Hi- Iā€™m back- same node/hardware but now ā€œcould not connectā€¦ā€
Maybe due to last update/upgrade cycle. I think I pushed some kernel and kernel repository upgrades through. I can log in to Allmon2 no prob. Telnet does not connect
"
root@ASL_PI_52352:/home/repeater# telnet localhost 5038
Trying ::1ā€¦
Trying 127.0.0.1ā€¦
telnet: Unable to connect to remote host: Connection refused
"

I donā€™t recall what you did last time- any suggestions appreciated.

Rebuilt DAHDI, have created asterisk.ctl over and over in var/run but after reboot the file is gone. Restored backup from April. Nothing has worked. I think I installed things that were held back forgetting it could screw up ASL. Wish that were not the case- lesson learned.