now it’s running and you can test the sub & pub commands.
It seems to me that something is wrong with your /var/lib/mosquitto/ directory. The Broker could not write (and read?) from the persistence file /var/lib/mosquitto/mosquitto.db
It may be that your SD Card is not very happy and needs a change
You can progress to the next steps
Also, your sonoff should be connecting now to the MQTT Broker… check that also
I would worry about the SD Card if I was you
Maybe it’s better to get a new one and start with a clean openHABian deployment
Also, make sure that you have a good quality USB Power Supply feeding the Raspberry Pi (I use an “official” PSU)
A proper power feed makes a big difference and keeps your rPi stable and your SD Card happy.
Corruption can occur due to power loss or fluctuation (while rPi is writing data)
Something was not working with your /var/lib/mosquitto directory…
Did you check permissions and if any file was created in there?
If yes: the file-system could be corrupted (it happens).
I finally got my mosquitto to cooperate with openHAB and get messages forwarded from OwnTracks.
But Mosquitto doesn’t seem to run stable over a longer period.
I run version 1.4.14.
And after a couple of days there is no log-file anymore in /var/log/mosquitto - Although I just checked with
systemctl status mosquito
and get the status “active (running)”. And nothing gets sent anymore. When I restart the service everything is back to normal again (for a couple of days).
Any hints what I can check to see what happens?