No Manager login anymore

Hello,
Since last week I have been unable to use the FOP2 Manager. It has always previously worked for me, and no changes were made to our phone server or asterisk last week, so it is very bizarre that suddenly I no longer have access. Normally, when I have an active FreePBX connection I can automatically log into FOP2 Manager. Now it takes me to a login page and every user/pass combo gives me an 'Invalid Credentials' error. I did some research and I know it probably has to do with these two config files. My setup is:

/etc/asterisk/manager.conf
[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
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
writetimeout = 5000

[fop2]
secret = supersecret
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,originate
write = system,call,log,verbose,command,agent,user,originate

/usr/local/fop2/fop2.cfg
; AMI definitions
manager_host=localhost
manager_port=5038
manager_user=admin
manager_secret=amp111

This is the configuration that previously worked, but now it does not. I noticed that the fop2 secret in manager.conf and fop2.cfg were different, so I changed both of those to amp111. This did not work. I also tried changing manager_host in fop2.cfg to 127.0.0.1. Again, this did not work. I've tried some combination of these (both of those changes, only one of those changes), anything to get them the same or slightly different, and no combination has worked for me.

I also saw this thread and set use_freepbx_auth to false in /var/www/html/fop2/admin/config.php. When I used the login details in config.php, I was still unable to login, although strangely, I did not receive the message 'Invalid Credentials' either. It just refreshed the page and kept me on the same login page. To further add to the mystery, our normal FOP2 view is working just fine - it is only the manager we have lost access to.

My setup:
FOP2 - Version 2.26
FreePBX - Version 2.11.0.42
Asterisk - Version 11.12.0

Any help you can provide in clearing up this matter would be greatly appreciated! Thank you!

Comments

  • Hi,

    First of all, the manager is a separate application than FOP2 itself. As such, it does not share any configuration with it. So, your fop2.cfg or manager.conf file won't affect the manager behaviour in any way.

    The configuration file for the fop2 manager is the config.php file in its directory (usually /var/www/html/fop2/admin/config.php). As you found out, you have a way to 'share' the auth system with FreePBX or not. By default that shared auth is enabled, but it won't have any effect if FreePBX is not detected.

    In any case, as you turned that to false, and still cannot login having like a page refresh, the most probable cause is that your PHP sessions are broken, probably because of incorrect permissions on the session var directory. That usually happens when PHP is updated via yum update or similar, as FreePBX requires the apache process and php files to run under the "asterisk" user, while the default .rpm packages for apache itself or php use the "apache" user instead. This is not related at all with the FOP2 Manager, so no configuration changes on our software will fix that problem.

    Check your apache error_log file and see if you notice session errors, if you do, you most probably need to change ownership of the session directory, usually /var/lib/php/session
    chown asterisk.asterisk /var/lib/php/session
    

    Best regards,
  • Thank you so much!! That is precisely what the problem was. The owner and group were set to root:apache and I changed that to asterisk:asterisk. The manager is now running fine. I really appreciate the timely help!
Sign In or Register to comment.