SocketIO channel gets disconnected with docker compose file

Hi, I am trying to run my server through docker, but while connecting with client SocketIO I get the below error. I dont know what am doing mistake.

I am connecting the socket with url http://localhost:5005 from client.

    019-05-24 10:20:22 INFO     engineio.server  - 8dfedd4261904250815bb8c175424436: Sending packet MESSAGE data 0
    2019-05-24 10:20:29 INFO     engineio.server  - d1f921e0f124406cb94bf38ca5a84c9e: Sending packet OPEN data {'sid': 'd1f921e0f124406cb94bf38ca5a84c9e', 'upgrades': ['websocket'], 'pingTimeout': 60000, 'pingInterval': 25000}
    2019-05-24 10:20:29 DEBUG    rasa.core.channels.socketio  - User d1f921e0f124406cb94bf38ca5a84c9e connected to socketIO endpoint.
    2019-05-24 10:20:29 INFO     engineio.server  - d1f921e0f124406cb94bf38ca5a84c9e: Sending packet MESSAGE data 0
    2019-05-24 10:20:36 INFO     engineio.server  - 64c2273e5ade4cf3a2cae5b0df226534: Sending packet OPEN data {'sid': '64c2273e5ade4cf3a2cae5b0df226534', 'upgrades': ['websocket'], 'pingTimeout': 60000, 'pingInterval': 25000}
    2019-05-24 10:20:36 DEBUG    rasa.core.channels.socketio  - User 64c2273e5ade4cf3a2cae5b0df226534 connected to socketIO endpoint.
    2019-05-24 10:20:36 INFO     engineio.server  - 64c2273e5ade4cf3a2cae5b0df226534: Sending packet MESSAGE data 0
    2019-05-24 10:20:43 INFO     engineio.server  - 958f3dd22e174136b5742c1293c964f9: Sending packet OPEN data {'sid': '958f3dd22e174136b5742c1293c964f9', 'upgrades': ['websocket'], 'pingTimeout': 60000, 'pingInterval': 25000}
    2019-05-24 10:20:43 DEBUG    rasa.core.channels.socketio  - User 958f3dd22e174136b5742c1293c964f9 connected to socketIO endpoint.
    2019-05-24 10:20:43 INFO     engineio.server  - 958f3dd22e174136b5742c1293c964f9: Sending packet MESSAGE data 0

I am running the service via docker and the command is below

ejbot:
image: rasa/rasa:latest
volumes:
  - ./:/app
ports:
  - 5005:5005
depends_on:
  - mongo
command: run --port 5005 --cors "*" --enable-api --debug --log-file log/out.log

Please let me know what i am doing wrong. Thanks

I have set to transports to websocket in code then it worked.

this.socket = io.connect('http://localhost:5005/', { transports: ['websocket'] });
1 Like