In my ongoing endeavors to get my Raspberry Pi to command my stuff I set up a Mosquitto MQTT broker. In the base settings everything went reasonably fine.
I could post test messages with the publish command and receive them with the subscribe command. Then I decided to up the log level and modified the mosquitto.conf file as follows. The version with essentially the whole log section commented out works. The other doesn't.
I narrowed it down to the line with the log file.
$ diff mosquitto.conf mosquitto.conf.old 408,410c408,410 < #log_dest file /var/log/mosquitto/mosquitto.log --- > log_dest file /var/log/mosquitto/mosquitto.log
The file exists and is owned by
mosquitto:mosquitto, the user which runs the service.
The very helpful message I do get when trying with the logging is the following:
mosquitto_pub -h localhost -t thisisme -m 5 Error: Connection refused
By now, I'm sure that the service dies a silent death.
$ sudo service mosquitto status ● mosquitto.service - LSB: mosquitto MQTT v3.1 message broker Loaded: loaded (/etc/init.d/mosquitto) Active: active (exited) since Fri 2017-01-06 11:16:38 CET; 4min 24s ago Process: 2222 ExecStop=/etc/init.d/mosquitto stop (code=exited, status=0/SUCCESS) Process: 2230 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCCESS) Jan 06 11:16:38 T-Pi mosquitto: Starting network daemon:: mosquitto. Jan 06 11:16:38 T-Pi systemd: Started LSB: mosquitto MQTT v3.1 message broker.
I'm running Raspbian GNU/Linux 8 (jessie) with the following mosquitto packages:
libmosquitto1/stable,now 1.3.4-2 armhf [installed,automatic] mosquitto/stable,now 1.3.4-2 armhf [installed] mosquitto-clients/stable,now 1.3.4-2 armhf [installed] python-mosquitto/stable,now 1.3.4-2 all [installed]
Further comment requested information:
ls -ld /var /var/log /var/log/mosquitto /var/log/mosquitto/mosquitto.log drwxr-xr-x 11 root root 4096 Sep 23 06:02 /var drwxr-xr-x 8 root root 4096 Jan 6 21:07 /var/log drwxr-xr-x 2 mosquitto mosquitto 4096 Jan 5 14:36 /var/log/mosquitto -rw-r--r-- 1 mosquitto mosquitto 14233 Jan 6 21:07 /var/log/mosquitto/mosquitto.log
The only log file in /var/log that gets modified is the auth.log from my sudo.
What did I break?