2

I have an AWS EC2, Ubuntu-16.04 instance where Mosquitto is installed. I noticed that, the mosquitto process dies out and nothing apparent seems to be appear in the log /var/log/mosquitto/mosquitto.log.

When I run this command, the service won't start! sudo service mosquitto start

I don't know where to look for to understand what went wrong. Currently, I am managing with sudo -u mosquitto /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf &

Any suggestions where to look for service start-up issues?

systemctl status mosquitto.service output

ubuntu@ip-172-xx-xx-xx:~$ systemctl status mosquitto.service
* mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
   Loaded: loaded (/etc/init.d/mosquitto; bad; vendor preset: enabled)
   Active: inactive (dead) since Thu 2018-07-12 07:56:54 IST; 5h 35min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6552 ExecStop=/etc/init.d/mosquitto stop (code=exited, status=0/SUCCESS)
  Process: 16941 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCCESS)

Jul 12 07:23:27 ip-172-xx-xx-xx systemd[1]: Started LSB: mosquitto MQTT v3.1 message broker.
Jul 12 07:56:53 ip-172-xx-xx-xx systemd[1]: Stopping LSB: mosquitto MQTT v3.1 message broker...
Jul 12 07:56:54 ip-172-xx-xx-xx mosquitto[6552]:  * Stopping network daemon: mosquitto
Jul 12 07:56:54 ip-172-xx-xx-xx mosquitto[6552]:    ...done.
Jul 12 07:56:54 ip-172-xx-xx-xx systemd[1]: Stopped LSB: mosquitto MQTT v3.1 message broker.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
  • Just because it's not apparent to you doesn't mean it won't help the rest of us. Edit the question to include the log and the output from sudo service mosquitto start (and the output of systemctl status mosquitto.service) – hardillb Jul 12 '18 at 6:54
  • 1
    Is the output from sudo service mosquitto start located at /var/log/mosquitto/mosquitto.log? I am pasting the output of systemctl status mosquitto.service above. – cogitoergosum Jul 12 '18 at 8:07
  • The systemctl output implies that mosquitto shut down cleanly. Run it again immediately after you've tried to start it (after killing your manually started version as well) – hardillb Jul 12 '18 at 10:41
  • Also this is basic Linux Service management and not really a IoT question. Should really be asked on askubuntu or SuperUser – hardillb Jul 12 '18 at 10:42
  • The restart - using sudo service mosquitto start - never happened. Hence, this question. Also, yes, I agree this is basic Linux Service management. But, I was wondering if there was a mosquitto specific parameter to be checked. – cogitoergosum Jul 12 '18 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.