But at the end of the last command to run it as a service "sudo systemctl start mosquitto.service" I receive an error:
root@DietPi:~# sudo systemctl start mosquitto.service
Job for mosquitto.service failed because the control process exited with error code.
See "systemctl status mosquitto.service" and "journalctl -xe" for details.
systemctl status mosquitto.service
May 05 01:37:06 DietPi systemd[1]: Failed to start Mosquitto MQTT v3.1/v3.1.1 Broker (DietPi).
May 05 01:37:06 DietPi systemd[1]: mosquitto.service: Unit entered failed state.
May 05 01:37:06 DietPi systemd[1]: mosquitto.service: Failed with result 'exit-code'.
May 05 01:37:06 DietPi systemd[1]: mosquitto.service: Service hold-off time over, scheduling restart.
May 05 01:37:06 DietPi systemd[1]: Stopped Mosquitto MQTT v3.1/v3.1.1 Broker (DietPi).
May 05 01:37:06 DietPi systemd[1]: mosquitto.service: Start request repeated too quickly.
May 05 01:37:06 DietPi systemd[1]: Failed to start Mosquitto MQTT v3.1/v3.1.1 Broker (DietPi).
May 05 01:37:06 DietPi systemd[1]: mosquitto.service: Unit entered failed state.
May 05 01:37:06 DietPi systemd[1]: mosquitto.service: Failed with result 'exit-code'.
When I run it as mosquitto it runs fine but in foreground which I don not want.
many thanks for your report. Why are you not using diepi-software to install Mosquitto ?? This would do all needed steps automatically, including setting up the service.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
many thanks for your report. Why are you not using diepi-software to install Mosquitto ?? This would do all needed steps automatically, including setting up the service.
I did that but Mosquitto did not work, after manual install it does work.
Joulinar wrote: ↑Wed May 06, 2020 10:33 am
what exactly was the issue once you installed Mosquitto using diepi-software
I'm fogotten to copy the fail.
But it was something about Mosquitto not starting, than I did an manual install which works but can not get it runnin as a service.
Wat is the best way to completely de-install Mosquitto, via the diepi-software or via command line ?
I have de-install Mosquitto via the dietpi-software menu.
Then I reinstall Mosquitto via the dietpi-software and reboot.
After the restart no Mosquitto is runnung !
Please advice me what to do to get it running as a service !
May 06 19:02:45 DietPi systemd[1]: Failed to start Mosquitto MQTT v3.1/v3.1.1 Broker (DietPi).
May 06 19:02:45 DietPi systemd[1]: mosquitto.service: Unit entered failed state.
May 06 19:02:45 DietPi systemd[1]: mosquitto.service: Failed with result 'exit-code'.
May 06 19:02:46 DietPi systemd[1]: mosquitto.service: Service hold-off time over, scheduling restart.
May 06 19:02:46 DietPi systemd[1]: Stopped Mosquitto MQTT v3.1/v3.1.1 Broker (DietPi).
May 06 19:02:46 DietPi systemd[1]: mosquitto.service: Start request repeated too quickly.
May 06 19:02:46 DietPi systemd[1]: Failed to start Mosquitto MQTT v3.1/v3.1.1 Broker (DietPi).
May 06 19:02:46 DietPi systemd[1]: mosquitto.service: Unit entered failed state.
May 06 19:02:46 DietPi systemd[1]: mosquitto.service: Failed with result 'exit-code'.