eclipse-paho / paho.mqtt.javascript

paho.mqtt.javascript
Other
1.16k stars 466 forks source link

Ws disconnection when running inside docker network #253

Open alexmc1510 opened 1 year ago

alexmc1510 commented 1 year ago

Dear community,

I am experiencing an issue with the library. Below mi config:

Both are connected at the same time to an internal docker network. I am able to ping each container from the other by its name.

Problem: If I connect to the broker using ws://localhost:9001/mqtt works perfectly. If I connect to the broker using ws://mqtt-broler:9001/mqtt I get a disconnection message. It never connects.

Just for curiosity I tried with mqtt instead of ws and worked perfectly.

Could someone help me with that?

Regards