Registered FOP2 Failes to connect

Good Afternoon,

I purchased FOP2 White label license and had everything up and running fine until about 11am this morning, when I attempted to connect to the fop2 and the login page was presented. I entered my credentials and clicked login, but then the page was unable to connect to the server and counted to 16 then presented an error saying server was unavailable. I have since restarted the entire freepbx server as well as stopped and started both the fop2 service then the asterisk & fop2 service. Both to no avail.

When running a test I get the following:
Flash Operator Panel 2 - White Label Version.
Flash Operator Panel 2 - White Label License (7)
Connection to manager OK!

It's weird because it was just working three hours ago and it stopped.

Please help!

Best Regards,
Jeremy

Comments

  • Is fop2 server running?
    pgrep fop2
    

    Is it binding to port tcp 4445?
    netstat -lnp | grep 444
    

    Best regards,
  • $ sudo pgrep fop2
    10856

    $ sudo netstat -lnp | grep 444
    tcp 0 0 0.0.0.0:4445 0.0.0.0:* LISTEN 10856/fop2_server
  • Most probably port tcp/4445 is not open/redirected at your router/firewall.
  • I have a similar situation with one brand new Windows 7 Pro 64-Bit Machine. the other slightly older machines on that network are fine, no issues logging in.
    On this machine I have tried ever IE, Firefox & Chrome, tested JavaScript and installed Flash.
    After putting in credentials on this machine it attempts to connect over and over again
  • I have a similar situation with one brand new Windows 7 Pro 64-Bit Machine. the other slightly older machines on that network are fine, no issues logging in.
    On this machine I have tried ever IE, Firefox & Chrome, tested JavaScript and installed Flash.
    After putting in credentials on this machine it attempts to connect over and over again

    Check if you have a local firewall enabled, and enable traffic on port tcp/4445.
  • I don't have access to Group Policy for that machine but if FOP is able to run wouldn't that preclude blocking 4445?
  • I don't have access to Group Policy for that machine but if FOP is able to run wouldn't that preclude blocking 4445?

    No, becuase the fop2 application is served via http (port 80 or 443). Then the javascript application runs, and it will use websockets or flash to create A NEW AND DIFFERENT CONNECTION on port tcp/4445. Not with http but a custom protocol.

    So, you can very well have a firewall enabling access to port 80/443, you will see the fop2 page, but then, when it really tries to connect, if there is something blocking that 4445 connection, it will fail the same way it is described in this post.

    If you have a firewall, any kind, then allow port tcp/4445, that is all you need to do.
  • The PBX and all the PCs are within the same LAN and all run W7 Pro; all the other PCs can run FOP2 no problem.
    The only difference between this PC & the others is that it is only been deployed for a month while the others have been in place for about 6 months. Could it be some Windows update has broken FOP2 on this machine because it is newer and possibly the other PCs have not had that Patch installed? Where should I be looking?
  • You should be looking at some kind of firewall.antivirus blocking access to port tcp/4445. Or you might want to try with a different browser. Did you try with google chrome?
  • I tried Chrome, IE & Firefox. The anti-virus is the same on all machines MS Security Essentials
  • open the javascript console in chrome and look at the output, it will help you see what is going on.
  • Here below are the results:
    wav false VM50:1
    set session context VM50:1
    general VM50:1
    formato wav VM50:1
    Client has HTML5 web sockets! VM50:1
    setLang VM50:1
    set menu VM50:1
    set menu queue VM50:1
    Client has HTML5 web sockets! VM50:1
    set session extension VM50:1
    GET http://192.168.16.22/fop2/fop2-variablesGENERAL.txt 404 (Not Found) prototype.js:1530
    Second Init after loading variables VM50:1
    Attempt to connect to port 4445 VM50:1
    intento conectar web socket en [url=ws://192.168.16.22:4445]ws://192.168.16.22:4445[/url] VM50:1
    WebSocket connection to 'ws://192.168.16.22:4445/' failed: Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing
    WebSocket Error VM50:1
    event.returnValue is deprecated. Please use the standard event.preventDefault() instead. VM51:988
    Event {clipboardData: undefined, cancelBubble: false, returnValue: true, srcElement: WebSocket, defaultPrevented: false…}
    VM50:1
    ws close event 0 VM50:1
    close event 0 VM50:1
    on close reseteo a cero VM50:1
    intento conectar web socket en [url=ws://192.168.16.22:4445]ws://192.168.16.22:4445[/url] VM50:1
    WebSocket connection to 'ws://192.168.16.22:4445/' failed: Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing
    WebSocket Error VM50:1
    Event {clipboardData: undefined, cancelBubble: false, returnValue: true, srcElement: WebSocket, defaultPrevented: false…}
    VM50:1
    ws close event 0 VM50:1
    close event 0 VM50:1
  • Same as the previous user:
    Used to work.
    Stopped working.
    No network issues (telnet connects fine).

    IE 7 seems to work
    IE 8 Connecting 1 and never moves
    Firefox (windows and linux): Connecting 1 2 3 4 5....
    Chrome Linux: SNAP! (no idea if this worked before)

    Here's a dump from the console in firefox

    [13:25:20.775] POST http://10.1.1.61/fop2/setvar.php [HTTP/1.1 200 OK 9ms]
    [13:25:20.779] GET http://10.1.1.61/fop2/fop2-variablesGENERAL.txt [HTTP/1.1 404 Not Found 1ms]
    [13:25:20.631] "Second Init after loading variables"
    [13:25:20.632] "Attempt to connect to port 4445"
    [13:25:21.653] GET http://10.1.1.61:4445/
    [13:25:21.587] "intento conectar web socket en [url=ws://10.1.1.61:4445]ws://10.1.1.61:4445[/url]"
    --
    [13:25:41.592] "WebSocket Error"
    [13:25:41.593] [object Event]
    [13:25:41.594] "ws close event 0"
    [13:25:41.595] "close event 0"
    [13:25:41.604] "on close reseteo a cero"
    [13:25:41.615] "intento conectar web socket en [url=ws://10.1.1.61:4445]ws://10.1.1.61:4445[/url]"
    --
    [13:26:41.656] GET http://10.1.1.61:4445/
    [13:26:41.758] "intento conectar web socket en [url=ws://10.1.1.61:4445]ws://10.1.1.61:4445[/url]"
    --
    [13:27:01.594] "WebSocket Error"
    [13:27:01.595] [object Event]
    [13:27:01.595] "ws close event 0"
    [13:27:01.596] "close event 0"
    [13:27:01.604] "on close reseteo a cero"
  • Maybe you are not experiencing the same as other users, it might seems so, but it most probably not the same as IE7 worked for you. If that is the case, then adobe flash is not having issues, and your problems might be related to websockets. There is an article in www.fop2.com/blog talking about issues with firefox and *secure* websockets (that are not supported in fop 2.26, but are in 2.27). So, most probably disabling websockets in /var/www/html/fop2/js/presence.js will fix your issue with firefox and chrome. Upgrading to the latest fop2 version, and enabling the server secure certificates if you access fop2 via https will make it work with websockets on both browsers (but be advised that configuring those certs is not that easy, and making the browsers accept a self signed *websocket* certificate is difficult as they do not work transparently as when simply accessing a secure website).

    AstLinux developers put together a nice summary page on making fop2/ssl work:

    http://doc.astlinux.org/userdoc:tt_asterisk-fop2-ssl

    Best regards,
  • it most probably not the same as IE7 worked for you
    Actually, IE10 is not working with FOP2; no browsers on this PC allow me to connect. Other PCs at that location are logged into FOP2 without issues.
  • it most probably not the same as IE7 worked for you
    Actually, IE10 is not working with FOP2; no browsers on this PC allow me to connect. Other PCs at that location are logged into FOP2 without issues.

    If you want to use latest browser versions, you must use latest fop2 versions. Or you can disable websockets in fop2 in /var/www/html/fop2/js/presence.js
  • Sorry for the late reply.

    Ok, disabled the websockets.
    Now I'm stuck on "trying to connect: 1"

    Tracing network communication I can see replies coming in (Follow TCP stream in Wireshark):
    <msg data="GENERAL|contexto|1|" />.{ 'btn': '0', 'cmd': 'key', 'data': '****************', 'slot': '' }.{ 'btn': '0@GENERAL', 'cmd': 'version', 'data': '2.11', 'slot': '' }.<msg data="1|ping||" />.{ 'btn': '0', 'cmd': 'pong', 'data': '0', 'slot': '' }.<msg data="1|ping||" />.{ 'btn': '0', 'cmd': 'pong', 'data': '0', 'slot': '' }.

    Server in debug mode says it sends them:

    10.1.60.6 <= <msg data="GENERAL|contexto|1|" />
    10.1.60.6 => { 'btn': '0', 'cmd': 'key', 'data': '*****************', 'slot': '' }
    10.1.60.6 => { 'btn': '0@GENERAL', 'cmd': 'version', 'data': '2.11', 'slot': '' }

    10.1.60.6 <= <msg data="1|ping||" />
    10.1.60.6 => { 'btn': '0', 'cmd': 'pong', 'data': '0', 'slot': '' }
    10.1.60.6 <= <msg data="1|ping||" />
    10.1.60.6 => { 'btn': '0', 'cmd': 'pong', 'data': '0', 'slot': '' }

    JS console says it does not get any "pong" replies:
    --
    [09:42:27.870] "intento conectar flash xml en puerto 4445"
    [09:42:27.918] "Connection successful general"
    [09:42:27.920] "go"
    [09:42:27.925] "flash send <msg data="GENERAL|contexto|1|" />"
    --
    [09:42:57.946] "flash send <msg data="1|ping||" />"
    [09:42:57.953] "envio ping 2"
    --
    [09:43:28.058] "flash send <msg data="1|ping||" />"
    [09:43:28.065] "envio ping 3"
    --
    [09:43:58.167] "flash send <msg data="1|ping||" />"
    [09:43:58.173] "envio ping 4"
    [09:43:58.174] "lost connection, lack of pong reply"
    [09:43:58.174] "close event 1"
    [09:43:58.186] "on close reseteo a cero"
    --
    [09:44:08.236] "intento conectar flash xml en puerto 4445"
    [09:44:08.334] "Connection successful general"
    [09:44:08.335] "go"
    [09:44:08.340] "flash send <msg data="GENERAL|contexto|1|" />"
  • Sorry for the late reply.

    Ok, disabled the websockets.
    Now I'm stuck on "trying to connect: 1"

    Tracing network communication I can see replies coming in (Follow TCP stream in Wireshark):
    <msg data="GENERAL|contexto|1|" />.{ 'btn': '0', 'cmd': 'key', 'data': '****************', 'slot': '' }.{ 'btn': '0@GENERAL', 'cmd': 'version', 'data': '2.11', 'slot': '' }.<msg data="1|ping||" />.{ 'btn': '0', 'cmd': 'pong', 'data': '0', 'slot': '' }.<msg data="1|ping||" />.{ 'btn': '0', 'cmd': 'pong', 'data': '0', 'slot': '' }.

    Are you using FOP 2.11? You should upgrade if you want to use modern/recent OS and Browsers. In version 2.11 websockets cannot be disabled on the fop2 server side, for example, etc.

    Question: where did you run wireshark? on the desktop machine? on the server? somewhere in between?

    Question: Can you connect from other machines? This thread was hijacked with many people thinking they have the same problem but it is not the same problem. For example, using FOP 2.11 with the latest chrome is a recipe for problems, you *MUST* upgrade fop2 as well as you upgraded your browser.

    And finally, if the connection is established, as it seems it is, but then the application is tuck on "Connection to server X", it most probably means you have some non ASCII characters in your button labels, and the button config file or mysql for autoconfiguration is not sending the data encoded in UTF8. Again, this is NOT RELATED at all with the original post on this thread.
  • Are you using FOP 2.11? You should upgrade if you want to use modern/recent OS and Browsers. In version 2.11 websockets cannot be disabled on the fop2 server side, for example, etc.
    Somehow I managed to get a mix of 2.11 and 2.26 in place :oops: My apologies
    Getting everything to 2.26 solved the issue.
    Question: where did you run wireshark? on the desktop machine? on the server? somewhere in between?
    On the desktop machine.
    Question: Can you connect from other machines? This thread was hijacked with many people thinking they have the same problem but it is not the same problem. For example, using FOP 2.11 with the latest chrome is a recipe for problems, you *MUST* upgrade fop2 as well as you upgraded your browser.
    The same effects occured everywhere as it was server related. However, Chromium on a Linux desktop still goes "Snap!" immediately (can't even log in). This is not an issue for me (Chromium is not used at my customer's site).

    And finally, if the connection is established, as it seems it is, but then the application is tuck on "Connection to server X", it most probably means you have some non ASCII characters in your button labels, and the button config file or mysql for autoconfiguration is not sending the data encoded in UTF8. Again, this is NOT RELATED at all with the original post on this thread.
    This was not an issue, there are no non ASCII characters (or all is UTF8 as I don't ever accept any other encoding wherever I see it, UTF8 rulez).
Sign In or Register to comment.