Re: [DNG] Mosquitto cannot be started, because no /var/mosquitto directory (Devuan stable)

2021-12-15 Thread Steffen Dettmer via Dng
Hi,

Thank you so much for your exhaustive answer! The links helped me to
solve my next issue as well, that's great! I thought Debian would
focus on systemd, I better have looked for myself first.

In case someone else faces a similar issue and reads this, I like to
add a detail.

The patch provided by Sergio attached to #993048 is simple and very
elegant, but did not work for me, because mosquitto.conf contains a
pid_file option, too. By this, the directory still is needed.
Additionally, I had to change this option to use a different filename,
otherwise mosquitto tried to overwrite the file created by
start-stop-deamon (user=root) and got EPERM (because user=mosquitto).
Maybe the pid_file option could be removed from the configuration, or
-u mosquitto added to start-stop-deamon, but I did not test this.

Steffen



On Tue, Dec 14, 2021 at 1:59 AM Ludovic Bellière via Dng
 wrote:
>
> Hello Steffen,
>
> The systemd service file does create the necessary directories (see:
> https://github.com/eclipse/mosquitto/blob/master/service/systemd/mosquitto.service.simple).
>
> /run/mosquitto not being created is most likely an issue with debian itself.
> Creating the folder from the init file, as per your workaround, is valid. To
> resolve the installation issue would require to file a bug against mosquitto 
> on
> debian BTS. Apparently somebody did just that, and provided a patch to boot:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993048
>
> See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983429
>
> Cheers,
>  Ludovic
>
> On Mon, 13 Dec 2021, Steffen Dettmer via Dng wrote:
>
> >Hi,
> >
> >mosquitto does not start, because there is no /var/mosquitto directory
> >for its PID file. Actually it cannot even be installed, because dpkg
> >script already wants it.
> >Also creating directory does not solve the problem, because /run is
> >tmpfs, so manually created directory won't be there on next reboot.
> >
> >As workaround, I simply added
> >
> >  mkdir -p /run/mosquitto/ ; chown mosquitto /run/mosquitto
> >
> >to /etc/init.d/mosquitto script. I guess this in Debian is done by
> >some systemd magic, which could be needed to be "emulated" in Devuan,
> >so I write here.
> >
> >What should I do?
> >
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Mosquitto cannot be started, because no /var/mosquitto directory (Devuan stable)

2021-12-13 Thread Ludovic Bellière via Dng

Hello Steffen,

The systemd service file does create the necessary directories (see:
https://github.com/eclipse/mosquitto/blob/master/service/systemd/mosquitto.service.simple).

/run/mosquitto not being created is most likely an issue with debian itself.
Creating the folder from the init file, as per your workaround, is valid. To
resolve the installation issue would require to file a bug against mosquitto on
debian BTS. Apparently somebody did just that, and provided a patch to boot:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993048

See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983429

Cheers,
Ludovic

On Mon, 13 Dec 2021, Steffen Dettmer via Dng wrote:


Hi,

mosquitto does not start, because there is no /var/mosquitto directory
for its PID file. Actually it cannot even be installed, because dpkg
script already wants it.
Also creating directory does not solve the problem, because /run is
tmpfs, so manually created directory won't be there on next reboot.

As workaround, I simply added

 mkdir -p /run/mosquitto/ ; chown mosquitto /run/mosquitto

to /etc/init.d/mosquitto script. I guess this in Debian is done by
some systemd magic, which could be needed to be "emulated" in Devuan,
so I write here.

What should I do?



signature.asc
Description: PGP signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Mosquitto cannot be started, because no /var/mosquitto directory (Devuan stable)

2021-12-13 Thread Steffen Dettmer via Dng
Hi,

mosquitto does not start, because there is no /var/mosquitto directory
for its PID file. Actually it cannot even be installed, because dpkg
script already wants it.
Also creating directory does not solve the problem, because /run is
tmpfs, so manually created directory won't be there on next reboot.

As workaround, I simply added

  mkdir -p /run/mosquitto/ ; chown mosquitto /run/mosquitto

to /etc/init.d/mosquitto script. I guess this in Debian is done by
some systemd magic, which could be needed to be "emulated" in Devuan,
so I write here.

What should I do?

Steffen

Devuan GNU/Linux 4 (chimaera)
mosquitto  2.0.11-1
Linux RefVm5 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30)
x86_64 GNU/Linux
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng