Cannot open port 1883

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/.

port rule

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?

Jesus

Posted 2019-07-09T11:59:53.813

Reputation: 11

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

Answers

0

  1. Have you modified your MQTT listening port?
  2. If your firewall is blocking incoming connections then also your MQTT connection gets refused. To unblock your incoming connections from the firewall. please follow the following steps up to step 5.

Source: Firewall block incoming connections

  1. Two computer or systems have considered here For better understanding of Blocking all the incoming connections. Here we will block all the incoming connections of computer whose IP address is 192.168.1.65. As the incoming connections of IP address 192.168.1.65 is not blocked, so when you try to connect 192.168.1.65 IP address, you will get easily connected . when incoming connections of particular system is not blocked and if you ping to that particular system you will get ping reply from that particular system which is shown in below image.

enter image description here

  1. To block all the incoming connections, please Press Windows+R of your computer.

  2. Type firewall.cpl in Open field and Click OK.

enter image description here

  1. Click on Turn Windows Defender Firewall on or off

enter image description here

  1. If you tick Block all incoming connections of Private and Public network then others computer can’t connect to your system. If you don’t tick Block all incoming connections of Private and Public network then others computer can connect to your system.

enter image description here

Sagar k

Posted 2019-07-09T11:59:53.813

Reputation: 1

Thank you, but this guide is for blocking ports rather than unblocking them, isn´t it? – Jesus – 2019-07-12T08:03:24.010