Project

General

Profile

recurring failure on raspi4

Added by matoq about 1 month ago

I run lighttpd on the lastest raspberry pi os on a pi4.

systemctl status lighttpd

outputs

● lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since XXXXXXXXXXXXXXXXXXXXX ago
  Process: 1026 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
  Process: 1031 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)
 Main PID: 1031 (code=exited, status=255/EXCEPTION)

systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
systemd[1]: Stopped Lighttpd Daemon.
systemd[1]: lighttpd.service: Start request repeated too quickly.
systemd[1]: lighttpd.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Lighttpd Daemon.

I can make lighttpd start and run fine by:

sudo mkdir /var/run/lighttpd
sudo chown -R pi:pi /var/run/lighttpd
sudo service lighttpd restart

It'll perform as intended until a reboot. After which the issue/procedure starts anew.

How can I make this apparently temporary fix permanent?


Replies (2)

RE: recurring failure on raspi4 - Added by gstrauss about 1 month ago

This is probably a better question for raspberry pi forums.

Is /lib/systemd/system/lighttpd.service using /var/run or /run? Modern versions of lighttpd should use /run

Does your system have a symlink from /var/run to /run? Most modern linux systems do.

A solution is probably to create /run/lighttpd with appropriate permissions as part of /lib/systemd/system/lighttpd.service, but you should check how raspberry pi package for lighttpd handles this, as that should be handled by the raspberry pi package of lighttpd unless you have made breaking custom changes yourself.

RE: recurring failure on raspi4 - Added by matoq about 1 month ago

well, I gave the raspberry pi forum a four day head start https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=317565&p=1900781#p1900781

thanks for the pointer, I'll look into that!

    (1-2/2)