openHABian - Mosquitto MQTT failed to start

Update openHABian (restart openhabian-config) and see if it works to reinstall mosquitto now before you do.

Hi, I just did a fresh install of OH3 (openhabian-pi-raspios32-v1.6.2.img.xz) and I have the same problem.
When it started it was working fine and I did add a user
After the first reboot Mosquitto was not longer running
I followed the steps suggested above and it restarts but my user is no longer valid


hi markus,

this works alsow for me !
thankx a lot !

try post 41 from this topic

for everybody else, who has this reboot problem too!

Thanks, had the same problem with a fresh openhabian installation (1.6.2) - these instructions did the trick :slight_smile:

Just installed 3.0 from scratch and had the same problem. Also solved by these instructions.

Which openHAB install method / instruction did you follow?
Did/does /etc/systemd/system/mosquitto.service.d/override.conf exist ?

For me it worked with:

sudo nano /etc/systemd/system/mosquitto.service.d

Afterwards it created a overwrite.conf file.

For sure not as you cannot text-edit a directory

And please answer my questions.

I reposted your instructions. I only edited with the nano editor, because there was no overwrite.conf.

So far I can only tell that it worked and now I have this .conf file what you posted

in my case I followed the instructions at post#41.
/etc/systemd/system/mosquitto.service.d/override.conf did not exist.


My question was incomplete so you misunderstood.
The question was and still is how you installed openHAB.

Sorry, now i understand :smiley: .
I installed a fresh Openhabian 1.6.1 and afterwards the Mosquitto server with openhabian-config.
It worked at first with no problems but then i had to reboot, because i installed something else.

Workinggggg - thank you
Thank you Markus

do you? :wink:
My question was HOW you installed it ? Image ? HW ? OS ? Point me at the install instructions you used please.

  1. I used etcher (latest image for openhabian), waited 30mins until Openhab was ready,
  2. I installed mosquitto with openhabian-config.
  3. It worked until I restarted

my hardware: Raspi 4, 4GB


I have to report the same issue here.

  • OH installed through Openhabian 1.6.2 (openhabian-pi-raspios32-v1.6.2.img.xz)
  • Mosquitto installed via openhabian-config

Mosquitto still fails to run

 * mosquitto.service - Mosquitto MQTT v3.1/v3.1.1 Broker
    Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
   Drop-In: /etc/systemd/system/mosquitto.service.d
   Active: failed (Result: exit-code) since Sun 2020-12-27 17:11:58 CET; 48s ago
   Docs: man:mosquitto.conf(5)
   Process: 974 ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf (code=exited, status=1/FAILURE)
   Main PID: 974 (code=exited, status=1/FAILURE)

Dec 27 17:11:58 openhabHost systemd[1]: mosquitto.service: Service RestartSec=100ms expired, scheduling restart.
Dec 27 17:11:58 openhabHost systemd[1]: mosquitto.service: Scheduled restart job, restart counter is at 5.
Dec 27 17:11:58 openhabHost systemd[1]: Stopped Mosquitto MQTT v3.1/v3.1.1 Broker.
Dec 27 17:11:58 openhabHost systemd[1]: mosquitto.service: Start request repeated too quickly.
Dec 27 17:11:58 openhabHost systemd[1]: mosquitto.service: Failed with result 'exit-code'.
Dec 27 17:11:58 openhabHost systemd[1]: Failed to start Mosquitto MQTT v3.1/v3.1.1 Broker.

Let me know if I have to upload more logs - I followed the standard procedure w/o any customization yet.


@mstormi In my case the override.conf file exists and contained the needed entries as you posted above

[Unit] zram-config.service zram-config.service

But creating the directories as instructed

mkdir -p /var/log/mosquitto /opt/zram/log.bind/mosquitto
chown mosquitto /var/log/mosquitto /opt/zram/log.bind/mosquitto

does the trick. Anything missing in the mosquitto installation script perhaps?

Let me know how/if I can help (same Linux knowledge avail here).


Hi Max,
I used exactly the same installation method as you and get the same results eg works correctly until a reboot then errors after start up due to the log folder missing.
As you found, creating the folder and applying permissions allows the service to start.
However, after a reboot, the log folder is gone again???

1 Like