Can't connect to a MQTT broker on a remote desktop

36 views
Skip to first unread message

Minh Hiền Bùi

unread,
May 5, 2022, 7:47:07 AMMay 5
to MQTT
I have a error "No connection could be made because the target machine actively refused it" on this code running on a remote desktop but it was running fine on my local machine, where I connect to that remote desktop.

```
MqttClient client = new MqttClient("rata-mqtt.digitraffic.fi",
                                                               1883,
                                                               false,
                                                               MqttSslProtocols.None,
                                                               null,
                                                               null);
client.MqttMsgPublishReceived += client_MqttMsgPublishReceived;

string clientID = "myclientid_" + RandomDigits(4);
client.Connect(clientID, null, null);
```

I tried to disable the firewall but some how it still doesn't managed to connect to the broker. I am kinda confused about this because I am also new to the websocket and security things

Reply all
Reply to author
Forward
0 new messages