-
-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mosquitto install: fails to start the service on boot #2243
Comments
@davidhq The service should be disabled by DietPi automatically (to leave control to
@Fourdee
Was the second device an RPi as well? Checked our install code. Wow, in case of Mosquitto it is really only |
Further checking of service status:
|
RPi test, install + reboot:
|
Not sure what these reports mean -)
Anyway have you reproduced the problem? Check that process is actually running even if systemctl reports it’s active.. actually it said Active (exited) and it wasn’t reachable (running) when I was trying..
I solved the issue in this strange way as described..
… On 16 Nov 2018, at 17:53, Dan ***@***.***> wrote:
RPi test:
🈯️
***@***.***:~# dpkg -l | grep syslog
***@***.***:~# systemctl status mosquitto.service -l
● mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
Loaded: loaded (/etc/init.d/mosquitto; generated; vendor preset: enabled)
Active: active (running) since Fri 2018-11-16 16:51:21 GMT; 52s ag
o
Docs: man:systemd-sysv-generator(8)
Process: 936 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCC
ESS)
CPU: 57ms
CGroup: /system.slice/mosquitto.service
└─942 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
Nov 16 16:51:21 DietPi systemd[1]: Starting LSB: mosquitto MQTT v3.1 message bro
ker...
Nov 16 16:51:21 DietPi mosquitto[936]: Starting network daemon:: mosquitto.
Nov 16 16:51:21 DietPi systemd[1]: Started LSB: mosquitto MQTT v3.1 message brok
er.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi David, Yep, the service and process are running (checked htop). The only thing I can suggest is we create a systemd service for Mosquitto, and, remove the init.d version. This should prevent any issues with dietpi-services disabling the service (which we are unable to replicate). Either way, systemd service is preferred. Notes
|
€: Lol double answer. @davidhq So not sure what happened on your case. Which other software have you installed besides mosquitto? |
- DietPi-Software | Mosquito: Service updated to systemd: https://github.com/Fourdee/DietPi/issues/2243
I’ll dedicate more time to this again soon, I’m not at thome, for now just:
- haven’t installed much other software , at least not something very related to mosquitto or anything that would interfere with systemd and such
- I intalled mosquitto via apt-get not dietpi-software— not sure if it matters but I think I forgot to mention this fact
- great if you simplified things now, this is a great step no matter what the real issue is.. so if init.d is out now, I think and hope this might resolve the problem.. but still please try one more time to reproduce with the old way, just try to install mosquitto manually.. and id ou can, pleas “enlighten me” whether in general there is any difference between two ways of installing
Thank you!
… On 16 Nov 2018, at 20:05, Dan ***@***.***> wrote:
@MichaIng @davidhq
I've updated the service to systemd regardless. init.d script was around 200 lines just to run $(which mosquitto) -c /etc/mosquitto/mosquitto.conf
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@davidhq |
@davidhq |
Ok, I agree... and as you said, you simplified something so I look forward to not having this issue with a new release :) If I do, I'll write here.. thank you so far! |
I had the same problem after installing the current mosquitto fresh via apt: "/etc/init.d/mosquitto status" showed server boot-up messages, but a portscan did not reveal any open ports. "mosquitto -d" made the service available, though not boot-safe. Unfortunately, I did both, the suggested
Now my mosquitto is finally reboot-safe. BTW: Keep up the good work on diet-pi. I love it over any other comparable Linux distro! Info: Hardware: RPi B (armv6l) Working version (vom dietpi_software): |
@g3ntleman With
I will verify if/how the APT install handles things. |
Still I'm facing the same issue, while installing mosquitto systemd[1]: /etc/systemd/system/mosquitto.service:17: Missing '='. |
@Arruls8 Could you paste the output of the following command:
Probably a drop-in config is the issue. |
Creating a bug report/issue:
Required Information:
cat /DietPi/dietpi/.version
#!/bin/bash
G_DIETPI_VERSION_CORE=6
G_DIETPI_VERSION_SUB=17
G_DIETPI_VERSION_RC=12
G_GITBRANCH=master
G_GITOWNER=Fourdee
Distro version |
echo $G_DISTRO_NAME
orcat /etc/debian_version
9.4
Kernel version |
uname -a
Linux lab 4.14.71-v7+ #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l GNU/Linux
echo $G_HW_MODEL_DESCRIPTION
or (EG: RPi3)RPi 3 Model B (armv7l)
Steps to reproduce:
sudo systemctl status mosquitto
Active: active (exited)
SOLUTION (strange!):
I tried everything, nothing helped, then by coincidence I issues:
rebooted, and everything works as expected!
mosquitto uses autogenerated service file, not sure where the confusion is and why systemctl disable actually fixes the problem instead of completely disabling the loading of service on boot...
I now have a functioning mqtt broker installation but this is weird... please check.. and I hope this report helps others in the meantime...
I tried this on two different devices, the problem is reproducible...
root@lab:~$ /usr/sbin/mosquitto -v
1542224183: mosquitto version 1.4.10 (build date Wed, 17 Oct 2018 19:03:03 +0200) starting
The text was updated successfully, but these errors were encountered: