0

I have installed mosquitto broker in a Ubuntu VM Instance of Google Cloud . I can also see the broker running on port 1883 of the VM . The external IP of the VM is 130.211.173.165 . Now when i try to create a client for this broker by the command

 client.connect_async("130.211.173.165",1883,60)

I get an error message saying that the connection was actively refused by the remote IP .

I have also added a network firewall rule stating the below but nothing seems to work.

  Source Ranges:
             0.0.0.0/0
  Allowed Protocols or Ports:
             tcp:1883

Can someone help here ?

  • Make sure you can use it locally, to ensure it's setup properly - if it is continue to poke around at your firewall. If you are going through a router ensure that your router is forwarding that port to the mosquitto server too. – Preston Jan 02 '15 at 07:39
  • Thanks Preston Let me try that – Arthi Arumugham Jan 05 '15 at 06:21

0 Answers0