MQTT Broker not able to receive data from Windows to Ubuntu - mqtt

I have installed mosquitto on both Ubunto and Win machine, I'm using MQTT Explorer to connect each other to check the connectivity which is working fine.
When I publish message from Ubuntu, I'm able to see it on MQTT explorer in Windows. While the reverse is not happening.

Related

Plastic Client unable to see Plastic Server

Morning,
I am in the process of moving our plastic server to a new machine. All going well so far, users, configs good, databases still transferring (will take a while).
However, I've tripped at a basic hurdle. Clients on our network are unable to see the server and it appears to be linked to good ol' windows firewall - as on disabling windows firewall on the server the client is then able to see the server.
Info:
Server OS: Windows Server 2019 Standard v. 1809
Client OS: Windows 10 Pro, Windows 11 Pro
Port used: 8087
Old server has been disconnected from the network
Troubleshooting so far
Using Telnet in command line on client computer confirms the port is open on the server's IP
Firewall rule created opening TCP 8087 over Domain, Private, Public - inbound and outbound
Tried reverting to the default port 8084
Any help much appreciated

Mosquitto server hosted on Digital ocean not making remote connections with android and Eclipse Paho Javascript Clients

I hosted Mosquitto MQTT broker on Ubuntu in Digital Ocean Cloud droplet. It's domain name is instrux.live and IP of the domain is 192.34.63.138. I publish and subscribe messages from two terminal windows and it worked fine.
When I tried to connect it with the android using Paho MQTT android client it could not connect. I also checked its connection with the MyMQTT android application and it did not connect. After making sure the android code has not any error, I again checked its connection with the Eclipse Paho Javascript client on eclipse.org website and it did not connect. Now, I have realized there might be something missing or wrong in my broker configuration which is not allowing it to get connected with other clients remotely. I have also opened firewall for ports 1883 for Android client and 8083 for the Javascript client and still it is not connecting.Here is mosquitto configuration file:
allow_anonymous true
password_file /etc/mosquitto/passwd
listener 1883
protocol mqtt
listener 8083
protocol websockets
Since the error is "Connection Refused" rather than a timeout I suspect that you have not configured the firewall to allow inbound traffic on port 8083.
You may need to do this both on the machine it's self and in Digital Ocean's console.

Allow access for MQTT on Ubuntu Server running on Azure

I have a Ubuntu Server 14.04 running on an Azure machine. I have installed MQTT broker on this Ubuntu Server. Moreover, I have multiple ESP8266 devices that are assumed to subscribe and publish to different MQTT topics via this broker. Now my problem is that when I connect two devices to Broker, one for receiving data and other for publishing, they work fine but as I try to connect one more device to broker all devices stop working and my ESPs just display this message "trying to connect Broker" over and over again.
(In endpoints of my machine I've added 1883 for HTTP, 443 for HTTPS and 22 for SSH)
My question is how I can allow multiple devices to communicate with MQTT broker running on Azure broker?
All client devices needs to have unique client ids. The situation you have described sounds exactly like what happens if all your esp8266 devices have the same hardcoded client id
MQTT clients get clientID as parameter before connection to provide uniqueness. ESP8266's has unique ChipID. So use it to hit the issue.
Here the example for Arduino firmware :
WiFiClient wifiClient;
PubSubClient mqttClient(wifiClient);
mqttClient.setServer(MQTT_BROKER, MQTT_BROKER_PORT);
String clientId = "IoTDevice-" + String(ESP.getChipId());
mqttClient.connect(clientId.c_str(), MQTT_USERNAME, MQTT_KEY);
Here is NodeMCU firmware example :
mqtt_cli:connect(MQTT_BROKER, MQTT_BROKER_PORT, 0, CALLBACK_FN);
mqtt_cli = mqtt.Client("IoTDevice-"..node.chipid(), 120, MQTT_USERNAME, MQTT_KEY);

Jenkins on Windows Server - how to connect to VPN

I have a VPN on a Windows Server that I need to connect to via Jenkins that runs on this Windows Server 2012.
Should I use RasDial?
Should I use VPN Client Cmdlets in Windows PowerShell ? I cannot see how to connect via this page - there are various other commands.
Any advice please?

I can't connect my MQTT Broker

I'm working on IoT project and trying to use mqtt protocol. So I need a Mqtt broker as a server installed on my PC. My PC has static ip and special modem. So my local and general ip is lookin same.
I installed mosquitto firstly. Tested it with Mqttlens chrome app, it looks everything is fine when I test it on the same computer (which is the computer on which broker is installed). But when I try to publish a message from another device with different ip, I can't connect to broker.
I installed Hivemq and tried it for this broker too. And it is the same so I can connect broker when I open mqttlens in same computer, but I can't connect to my broker from other device.
And here is what I already tried and tested;
I downloaded My MQTT application to my android mobile phone.
And connected to hivemq broker with broker.hivemq.com url.
In the same time in different two pc's I connected to the broker with mqttlens app. I set up the tags. And everything is working, I can send messages and subscribing topics. Everything is working well. I tried it when that third device in the same lan and when using different networks. Both time, everything is fine.
But when I try the same thing by writing the my ip address to the mqtt lens and MyMQTT application. Other devices even can't connect to broker. There are no error messages or anything else. Just disconnected and can't connect.
I tried to change bind address with my ip address. But when I write 0.0.0.0 or my ip address, result is same I couldn't connect.
Any suggestions?

Resources