Mosquitto issue

kris@openhab2:~$ netstat | grep 1883
tcp 0 0 oh2.ddns.net:1883 192.168.0.234:26499 ESTABLISHED
tcp 0 0 oh2.ddns.net:1883 192.168.0.239:30966 ESTABLISHED
tcp 0 0 localhost.localdom:1883 localhost.localdo:46708 ESTABLISHED
tcp 0 0 oh2.ddns.net:1883 192.168.0.240:23088 ESTABLISHED
tcp 0 0 oh2.ddns.net:1883 192.168.0.237:22058 ESTABLISHED
tcp 0 0 oh2.ddns.net:1883 192.168.0.235:31686 ESTABLISHED
tcp6 0 0 localhost.localdo:46708 localhost.localdom:1883 ESTABLISHED
kris@openhab2:~$

so, you started it from the command line and it works fine?

try to comment out the listener line and restart the mosquitto service.

I don’t know what is the root-cause… just trying out stuff :slight_smile:

This is showing exited though?


kris@openhab2:~$ systemctl status mosquitto
● mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
   Loaded: loaded (/etc/init.d/mosquitto; generated)
   Active: active (exited) since Wed 2018-10-31 03:15:04 AEDT; 5h 19min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 22734 ExecStop=/etc/init.d/mosquitto stop (code=exited, status=0/SUCCESS)
  Process: 22740 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCCESS)

Oct 31 03:15:04 openhab2 systemd[1]: Starting LSB: mosquitto MQTT v3.1 message broker...
Oct 31 03:15:04 openhab2 mosquitto[22740]:  * Starting network daemon: mosquitto
Oct 31 03:15:04 openhab2 mosquitto[22740]:    ...done.
Oct 31 03:15:04 openhab2 systemd[1]: Started LSB: mosquitto MQTT v3.1 message broker.
kris@openhab2:~$

yeah… exited = dead :frowning:

But its still running?


1540935325: Sending PINGRESP to DVES_2D2E43
1540935330: Received PUBLISH from DVES_800C19 (d0, q0, r0, m0, 'tele/atticcomms/STATE', ... (147 bytes))
1540935330: Received PUBLISH from DVES_800C19 (d0, q0, r0, m0, 'tele/atticcomms/SENSOR', ... (154 bytes))
1540935330: Sending PUBLISH to openhab (d0, q0, r0, m0, 'tele/atticcomms/SENSOR', ... (154 bytes))
1540935333: Received PINGREQ from gardenlights
1540935333: Sending PINGRESP to gardenlights
1540935333: Received PINGREQ from DVES_EA4695
1540935333: Sending PINGRESP to DVES_EA4695
1540935334: Received PINGREQ from DVES_800C19
1540935334: Sending PINGRESP to DVES_800C19
1540935334: Received PINGREQ from DVES_462E34
1540935334: Sending PINGRESP to DVES_462E34
1540935340: Received PINGREQ from DVES_2D2E43
1540935340: Sending PINGRESP to DVES_2D2E43
1540935344: Received PINGREQ from DVES_462E34
1540935344: Sending PINGRESP to DVES_462E34
1540935348: Received PINGREQ from gardenlights
1540935348: Sending PINGRESP to gardenlights
1540935348: Received PINGREQ from DVES_EA4695
1540935348: Sending PINGRESP to DVES_EA4695
1540935349: Received PINGREQ from DVES_800C19
1540935349: Sending PINGRESP to DVES_800C19
1540935354: Received PINGREQ from DVES_462E34
1540935354: Sending PINGRESP to DVES_462E34
1540935355: Received PINGREQ from DVES_2D2E43
1540935355: Sending PINGRESP to DVES_2D2E43


the service is dead

when you issued mosquitto -v it started a new instance. this one is alive

1 Like

kris@openhab2:~$ systemctl restart mosquitto
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'mosquitto.service'.
Authenticating as: kris
Password:
==== AUTHENTICATION COMPLETE ===
kris@openhab2:~$ systemctl status mosquitto
● mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
   Loaded: loaded (/etc/init.d/mosquitto; generated)
   Active: active (running) since Wed 2018-10-31 08:37:49 AEDT; 1s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 16787 ExecStop=/etc/init.d/mosquitto stop (code=exited, status=0/SUCCESS)
  Process: 16807 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCCESS)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/mosquitto.service
           └─16825 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

Oct 31 08:37:49 openhab2 systemd[1]: Starting LSB: mosquitto MQTT v3.1 message broker...
Oct 31 08:37:49 openhab2 mosquitto[16807]:  * Starting network daemon: mosquitto
Oct 31 08:37:49 openhab2 mosquitto[16807]:    ...done.
Oct 31 08:37:49 openhab2 systemd[1]: Started LSB: mosquitto MQTT v3.1 message broker.
kris@openhab2:~$

and it dies by itself after some (4) hours? strange…

I started it around 4pm yesterday, it died around 3am.

Its now 8.39am

no clue what could be wrong… i checked https://github.com/eclipse/mosquitto/issues but I didn’t find anything relevant… :frowning:

very odd :frowning: damn!!!

Looks like it keeps happening around the same time

odd

saw this in the log:

2018-11-01 03:15:05.048 [WARN ] [t.mqtt.internal.MqttBrokerConnection] - MQTT connection to 'broker' was lost: Connection lost : ReasonCode 32109 : Cause : null
2018-11-01 03:15:05.058 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting connection helper to periodically try restoring connection to broker 'broker'


kris@openhab2:/etc/openhab2/rules$ sudo systemctl status mosquitto
● mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
   Loaded: loaded (/etc/init.d/mosquitto; generated)
   Active: active (exited) since Thu 2018-11-01 03:15:05 AEDT; 3h 53min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 12811 ExecStop=/etc/init.d/mosquitto stop (code=exited, status=0/SUCCESS)
  Process: 12817 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCCESS)

Nov 01 03:15:04 openhab2 systemd[1]: Starting LSB: mosquitto MQTT v3.1 message broker...
Nov 01 03:15:05 openhab2 mosquitto[12817]:  * Starting network daemon: mosquitto
Nov 01 03:15:05 openhab2 mosquitto[12817]:    ...done.
Nov 01 03:15:05 openhab2 systemd[1]: Started LSB: mosquitto MQTT v3.1 message broker.
kris@openhab2:/etc/openhab2/rules$

Same again, same time.


kris@openhab2:~$ systemctl status mosquitto
● mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
   Loaded: loaded (/etc/init.d/mosquitto; generated)
   Active: active (exited) since Fri 2018-11-02 03:15:06 AEDT; 4h 9min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 7663 ExecStop=/etc/init.d/mosquitto stop (code=exited, status=0/SUCCESS)
  Process: 7669 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCCESS)

Nov 02 03:15:06 openhab2 systemd[1]: Starting LSB: mosquitto MQTT v3.1 message broker...
Nov 02 03:15:06 openhab2 mosquitto[7669]:  * Starting network daemon: mosquitto
Nov 02 03:15:06 openhab2 mosquitto[7669]:    ...done.
Nov 02 03:15:06 openhab2 systemd[1]: Started LSB: mosquitto MQTT v3.1 message broker.
kris@openhab2:~$

Can anyone help diagnose whats occuring at that time?

could it be logrotate firing at 03:15 am causing the service to hang?
I don’t know… check your journalctl for messages around that time

Also… it could be due to the Halloween ! Ghosts are known to appear around 3 am ! (just joking :slight_smile:)

hahah! Actually I think it was certbot restarting it!

Anyway, ive made some changes so ill see tomorrow if its stil working :wink:

1 Like

Indeed it was certbot.

There was a restart command in there, wtf

1 Like

Hi,

Picking up this issue has I have also troubles with Mosquitto since yesterday after apt-get update && upgrade.
Since then I can’t get Mosquitto up again.
This is what I get:

Blockquote
1560710587: Loading config file /etc/mosquitto/conf.d/mosquitto.conf
1560710587: mosquitto version 1.6.2 starting
1560710587: Config loaded from /etc/mosquitto/mosquitto.conf.
1560710587: Opening ipv4 listen socket on port 1883.
1560710587: Opening ipv6 listen socket on port 1883.
1560710587: Opening ipv4 listen socket on port 8883.
1560710587: Opening ipv6 listen socket on port 8883.
1560710587: Error: Unsupported tls_version “tlsv1”.

That’s it then. The service doesn’t come up.
Any help would be appreciated!!

Thanks
Matthias