Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] MQTT „The connection was lost.“ inside same subnet

Hi @ all,

I need mqtt-function on a raspberry pi for my home-automation system. It worked at home with a broker-installation I made a few months ago. Since I am away from home for 3 weeks I took the raspi with me.

I use my laptop (internat network-addr 192.168.131.5) as router to the internet and made a new install of mosquitto (0.15-2+deb7u3ubuntu0.1 on LinuxMint 17.3 - it says „ MQTT v3.1 broker“ when I try mosquitto -v). mosquitto_sub and mosquitto_pub (0.15-2+deb7u3ubuntu0.1) work, when used on the laptop. I also did a test with „ test.mosquitto.org“ and it worked. I have only enabled logging at debug-level in the config-file, nothing else changed.

When I try mosquitto_sub -h 192.168.131.5 -t „#“ on the RasPi (192.168.131.192) nothing happens when I publish something from the laptop. mosquitto_sub is version is 1.6.4. Tcpdump and wireshark (on the laptop) show a MQTT-connect packet, but no MQTT-ack for it. Nothing is shown in syslog on the laptop. It looks like the packet did never reach the server-process. Of course I tried to disable the firewall on the laptop. On the laptop netstat shows port 1883 listening.

Trying mosquitto_pub on the RasPi brings up „Error: The connection was lost.“ Nothing in syslog on the laptop too. I also tried another client-id, but noting different.

pi@GSM-testRasPi:~ $ mosquitto_pub -i "raspi" -h 192.168.131.5 -p 1883 -t "info/room107" -m "test from raspi"

Error: The connection was lost.

I also tried the test with „ test.mosquitto.org“ on the RasPi and it worked.

So, to me, the server seems to be OK and the client too, but they don't work together. Why?

Any help appreciated, Karl.


Mit freundlichen Grüßen

i.A. Ing. Karl SCHUH
Büro Bernstein
Hauptstrasse 23a
A-7434 Bernstein
+43(664)3806107

SCHUH-TV Filmproduktion
Inhaber: Ing. Rene SCHUH
FN: 160498b;       Firmenbuchgericht: Handelsgericht Wien
Wiedner Hauptstrasse 135/33
A-1050 Wien
+43(664)3363108
http://www.schuh-tv.at
E-mail office@xxxxxxxxxxx

Back to the top