Broker does not start

The Broker on my raspberry Pi does not start, i get the message:

● mosquitto.service - Mosquitto MQTT Broker
Loaded: loaded (/etc/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2023-02-10 09:23:35 GMT; 2s ago
Docs: man:mosquitto(8)
Process: 1371 ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf (code=exited, status=1/FAILURE)
Main PID: 1371 (code=exited, status=1/FAILURE)
CPU: 58ms

what can i do ?

Hi,

It’s a bit difficult to say anything from that, unfortunately. Could you try running sudo /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf - that should show you some error messages to help see the cause.

Cheers,

Roger

Hi Roger
I get this:

1676040702: Error: Unable to write pid file.

But i changed in the mosquitto.conf file the line

pid_file  /run/mosquitto/mosquitto.pid

to

pid_file /var/run/mosquitto/mosquitto.pid

and it is working again :slight_smile:

thx for finding the problem :heartpulse:

Cheers,

Simon