1
I am trying to connect to a MQTT Mosquitto server by using a laptop with a wireless connection. However, I am getting timeout messages all the time. After doing some research I have come to think that this issue is related to having port 1883 (uncyphred MQTT comms) closed. I have also found a web to test connectivity with a MQTT broker that makes use of HiveMQ (http://www.hivemq.com/demos/websocket-client/) that works in other pieces of equipment whenever I enter a user and a password.
Thus, I have opened an inbound rule in the Windows Defender firewall, as explained in https://www.youtube.com/watch?v=xMGPyZtdP00 or in http://www.bytesofgigabytes.com/networking/how-to-open-port-in-windows/.
Unfortunately, the port is still not open and whenever I set a user and a password in the mqtt web side i get a "Connect failed: AMQJSC0001E Connect timed out." message. I have Windows 10 as the operating system and a HP ProBook 440 as the laptop. Running netstat -a also shows that the port 1883 is not open.
TCP 0.0.0.0:135 DESKTOP-XXXXXXXXXX LISTENING
TCP 0.0.0.0:445 DESKTOP-XXXXXXXXX LISTENING
TCP 0.0.0.0:902 DESKTOP-XXXXXXXXX LISTENING
TCP 0.0.0.0:912 DESKTOP-XXXXXXXXX LISTENING
TCP 0.0.0.0:5040 DESKTOP-XXXXXXXXX LISTENING
TCP 0.0.0.0:49664 DESKTOP-XXXXXXXXX LISTENING
TCP 0.0.0.0:49665 DESKTOP-XXXXXXXXX LISTENING
TCP 0.0.0.0:49666 DESKTOP-XXXXXXXXX LISTENING
TCP 0.0.0.0:49667 DESKTOP-XXXXXXXXX LISTENING
TCP 0.0.0.0:49668 DESKTOP-XXXXXXXXX LISTENING
TCP 0.0.0.0:49669 DESKTOP-XXXXXXXXX LISTENING
Do you have any idea of what may be happenning?
Are you connecting to this computer, or from this computer? – user1686 – 2019-07-09T12:02:34.087
from this computer – Jesus – 2019-07-09T12:03:29.043
Then note that pretty much everything in this post – both the firewall inbound rule, and the netstat output – only relate to incoming connections, i.e. connecting to this computer. They are completely irrelevant for outgoing connections. – user1686 – 2019-07-09T12:08:34.647
I see. Then I will create an outbound rule – Jesus – 2019-07-09T12:14:34.413
UPDATE: I created the rule outbond. It still does not work. I have even deactivated the firewall, but it will not budge. – Jesus – 2019-07-09T12:20:25.183
1You must investigate the server side: the client doesn't open port 1883, but the first one that's unused. Also, some wi-fi router forbid the client-to-client communication. – AndrewQ – 2019-07-09T15:06:55.410