Can't connect NodeMCU with MQTT
-
It looks like
mosquitto
is trying to register bothIPv4
andIPv6
on the same port.If
IPv6
is not required for the application your use case, try changing themosquitto.conf
file as below for limiting it toipv4
:# Set to `ipv4` to force the listener to only use IPv4, or set to `ipv6` to # force the listener to only use IPv6. If you want support for both IPv4 and # IPv6, then do not use the socket_domain option. socket_domain ipv4
Please please make sure the default
port 1883
is not already in use by any other programs. If yes, you can either kill those programs (not recommended) or change the port inmosquitto.conf
file: -
@swalahamani @salmanfaris
I changed my conf file and specified ipv4
And this is the status of the port (from resource monitor):Image: mosquitto.exe PID: 3732 Address: IPv6 loopback Protocol: TCP Port: 1883 Firewall Status: Allowed, not restricted
It is listening to mosquito..
-
Is it working now?
-
@swalahamani No
-
@sivanath
Did you follow the steps which I mentioned previously? -
@swalahamani Yeah!!
-
Oh okay.
Please bring your device if you're coming for the upcoming MakerChat 0x13 tomorrow (IST). Either I and @salmanfaris or both of us will be there.
Or else we can set up a call sometime this weekend or the next week and sort it out.
Let me know.
-
@swalahamani I may not be able to come tomorrow. I think we could set up a call. How can I contact you personally?
-
@sivanath From your last message looks like the MQTT broker already running on your computer. Could you please try to do a test with nodeRED and see it's working or not.
-
@salmanfaris Actually, I can't connect my NodeMCU device with the localhost server. I can establish a connection using the test.mosquitto.org server.
This is my required case: YouTube link