Search code examples
dockerrabbitmqwindowmqttiot

Cannot connect to local MQTT server (running on Windows 10) from docker instance


RabbitMQ server is running locally on Windows 10 and docker is running on it also. I'm running a device simulator on docker and it has to talk to local RabbitMQ server through MQTT. It had been working but one day it stopped. Here is device logging -

mqtt-client.cpp:322 | Failed to connect to broker at 'xxx@xxx.xxxxxx.com/:1883': code=15, message='Lookup error.'

Keep in mind that from docker(latest version) calls have been made to local web server which has exact domain name -

https-commissioning-channel.cpp:81 | [HttpsCommissioningChannel] using token to contact bootstrap service at 'https://xxx.xxxxxx.com/apibst/alo/v1/bootstrap/device-info'

So you can see domain name has been resolved. For firewall configuration port is open on 1883 (consider it had been working). RabbitMQ is running.

What might be the issue and what should I do to make the call go through?


Solution

  • As per the comments xxx@xxx.xxxxxx.com/:1883 should not contain a slash (xxx@xxx.xxxxxx.com:1883) - see the URI Scheme.