I have just set up a Raspberry Pi with EmonCMS (mostly) following the instructions on building the SD card and I ran into some troubles with Mosquitto not starting (even though the service status was running…). It took a bit of hear pulling but turned out to be that I needed to create /var/log/mosquitto and set the owner as with the other services (in rc.local)
So my question is why doe the emonSD image not need this change, or to phrase it another way, what step did i miss ;-)?
FYI the version of mosquitto I installed is;
1474024728: mosquitto version 1.4.10 (build date Thu, 25 Aug 2016 10:12:09 +0100) starting
and the version on the Emon SD image is
1474024926: mosquitto version 1.4.8 (build date Sun, 14 Feb 2016 15:06:55 +0000) starting
and I had to make the following changes to ‘fix’ the issue;
diff --git a/rc.local_jessieminimal b/rc.local_jessieminimal
index 187f78f..611ce43 100755
--- a/rc.local_jessieminimal
+++ b/rc.local_jessieminimal
@@ -8,7 +8,7 @@
 # Will only run if /var/log is mounted in tmpfs
 if ( mount | grep "on /var/log "| grep -q "^tmpfs " )
 then
-  for i in "redis" "apache2" "mysql" "openhab" "logrotate"; do mkdir /var/log/"$i"; done
+  for i in "redis" "apache2" "mysql" "openhab" "logrotate" "mosquitto"; do mkdir /var/log/"$i"; done
   for i in "emoncms.log" "mysql.log" "mqtt_input.log" "redis/redis-server.log" "service-runner.log" "mysql/error.log" "apache2/error.log" ; do touch /var/log/"$i"; done
   for i in "emoncms.log" "mysql.log" "mqtt_input.log" "redis/redis-server.log" "service-runner.log" "mysql/error.log" "apache2/error.log" ; do ""chmod 666"" /var/log/"$i"; done
   chown -R root:adm /var/log/apache2
@@ -16,14 +16,16 @@ then
   chown -R mysql:adm /var/log/mysql
   chown -R openhab:openhab /var/log/openhab
   chown -R pi:pi /var/log/logrotate
+  chown -R mosquitto:mosquitto /var/log/mosquitto
   # Restart Apache & Redis, now the directories are defined
   service apache2 restart
   service redis-server restart
+  service mosquitto restart
 fi
 # Run emonPi Update of first factory boot (~/data/emonpiupdate.log does not exist)
-/home/pi/emonpi/./firstbootupdate
+#/home/pi/emonpi/./firstbootupdate
 sleep 20
 service mqtt_input restart

 Did you look at if anything needs doing with logrotate?
 Did you look at if anything needs doing with logrotate?