FOP2 not working after upgrade to FreePBX 13

Just upgraded to FreePBX 13 and now fop2 isn't running anymore. I can do:

service fop2 start
Starting Flash Operator Panel 2: [ OK ]
[root@freepbx-a fop2]#

But fop2 manager says it is not running and I can't login.

[root@freepbx-a ~]# /usr/local/fop2/fop2_server --test -i em1
Flash Operator Panel 2 - White Label Version
Flash Operator Panel 2 - Valid License
Flash Operator Panel 2 - Featureset: Voicemail Explorer & IM Chat
Flash Operator Panel 2 - Allowed Tenants: 5
Flash Operator Panel 2 - Licensed Plugin: speeddial
Flash Operator Panel 2 - Licensed Plugin: queuelogin
Flash Operator Panel 2 - Licensed Plugin: followme

Connection to manager OK!

Comments

  • What happens if you run

    /usr/locl/fop2/fop2_server -i em1 -X 15

    And let it run.. do you see events going and things going well? Or it just dies with an error? If the later, the error will let you know what is the problem.

    Hint: it is not related to your FreePBX version.. fop2 server running or not is not dependant on FreePBx at all, much less on a particular version.
  • edited February 2016
    I see events going. Quite a few are like that:
    127.0.0.1 <- Response: Error
    127.0.0.1 <- ActionID: 290
    127.0.0.1 <- Message: Database entry not found

    On Manager:
    FOP2 Server is not responding. Be sure the service is running!

    service fop2 start works.
  • Those AMI errors are correct.

    The FOP2 Manager might be unable to connect to the FOP2 server even if the service is running, if you have selinux enabled or firewall rules blocking access to port TCP/4445. That does not mean that FOP2 is not working, just that the port is being blocked.


    service fop2 status

    If after starting FOP2 , asking for status say it is running, then you have firewall blocking access or selinux blocking socket connections from other applications:

    In the other hand, if status says that service is not running or dead, then you have another process that is not letting the fop2 server to start normally.
  • [root@freepbx-a ~]# service fop2 status

    fop2_server dead but subsys locked

  • Do you have -i em1 in /etc/sysconfig/fop2 file, inside the OPTIONS parameters?
  • edited February 2016
    less /etc/sysconfig/fop2

    OPTIONS="-d -i em1 -c /etc/asterisk/fop2 -a /var/log/fop2_audit.log"

    I upgraded FreePBX Distro yesterday, which also contained a CentOS upgrade from 6.5 to 6.6 and other things.
  • If fop2 dies after starting, it will log something about it. So you might want to add login options to the startup script so you can inspect that log

    OPTIONS="-d -i em1 -c /etc/asterisk/fop2 -a /var/log/fop2_audit.log -X 15 -l /var/log"

    Then restart fop2, after a while check status, if it says dead / subsytem locked, then look at the end of /var/log/fop2_debug.log and you will see the error that causes fop2 to stop/crash.
  • Flash Operator Panel 2 - White Label Version
    Can't exec "/etc/asterisk/fop2/autoconfig-users.sh": Permission denied at script/fop2_server.pl line 13475, <$CONFIG> line 294.
    getsockopt() on closed socket $fh at /usr/local/fop2/temp/par-root/cache-9c770b8752233c17a09a2b2e7cc86e5fa344c401/inc/lib/AnyEvent/Handle.pm line 589, <$CONFIG> line 294.
  • The upgrade changed all permissions in /etc/asterisk/fop2.

    I did chmod 754 autoconfig-users.sh autoconfig-users-freepbx.sh autoconfig-buttons.sh autoconfig-buttons-freepbx.sh

    Now it's working again.
  • The FreePBX upgrade script is not a good neighbour then. Changing permissions or anything for files that are not part of the package being upgraded is not a nice thing to do.

    Best regards,
Sign In or Register to comment.