ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 5 replies, has 5 voices, and was last updated by michael1 michael1 3 months, 2 weeks ago.

  • Creator
    Topic
  • #3369
    alanstorm
    alanstorm
    Participant

    After installing and running an OroCRM system for a few days/weeks, I eventually start seeing the following errors in my javascript terminal

    > WebSocket connection to ‘ws://127.0.0.1:8080/’ failed: Error during WebSocket handshake: Unexpected response code: 200
    > autobahn.js:364

    It appears that OroCRM is trying to connect to a local web socket for — some reason?

    Three questions:

    1. Why does this error show up, and how can I get it to stop

    2. Should I be running a web-server process on port `8080` for some reason? If so, what?

    3. What is this web socket connection doing?

    • This topic was modified 1 month, 1 week ago by  rrivera.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #3384

    Benoit
    Oro Core

    Hello Alan,

    From what I understood, it’s used to warn user when the application will go to maintenance mode. So a browser websocket is supposed to connect to this port, allowing the application to push notifications to users.

    To manage that a Ratchet server should be started by using the clank command (php app/console clank:server). FYI, this Ratchet server uses PHP Reactor, which uses PHP Libevent extension, allowing to have the same event loop than nodeJs for example, but in PHP.

    In conclusion, and as we do not use these feature in Akeneo, I usually change the websocket_port in parameters.yml to 9090, which is less likely to collide with other program than 8080 (used by Skype for example).

    #3385
    Dima Soroka
    Dima Soroka
    Oro Core

    Hi guys

    Let me provide more information on this topic and answer the questions above.

    The OroPlatform OroSyncBundle implements support of websocket connections from a browser to server. This bundle extends functionality of jdare/clank-bundle and allows easily to establish persistent connection with JavaScript. This feature is very useful for push notifications and improves user experience in a few areas as for now:

    • Record data updates when one user has open form and another user change the record
    • Maintenance mode notifications
    • Calendar event flush message reminders (added to upcoming release)
    • Parallel data editing (planed)
    • Chat (planed), and many other

    As for questions above:

    1. Error shows up as client can’t connect to the websocket server. We’ll improve reconnect logic in order to stop reconnection after several attempts.

    2. Websocket port is configurable and defaulted to 8080. You can start websocket server with running a command mentioned by @Benoit

    3. The purpose of websocket connection explained above

    Please let me know if you have any other questions.

    #3399
    alanstorm
    alanstorm
    Participant

    Thanks Dima, that’s the overview I was looking for.

    #4982

    Gilles Doge
    Participant

    Hello,

    I understand the nice addition and UI improvement that a WebSocket server can add to the product but is there a way to disable the websocket things ?

    I’m currently testing OroCRM but can’t (for the moment) open other port than 80.

    Regards,

    #24988
    michael1
    michael1
    Participant

    Is the setup of the Clank server part of the installation process?

    I followed the installation steps and still get this error.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.