Lighthttp failed to start

#1

Expected Behaviour:

[lighttpd should start and web interface should be reachable]

Actual Behaviour:

[pi.hole/admin give ERR_CONNECTION_REFUSED and found lighttpd failed to start (Process: 5303 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255))]

Debug Token:

[ https://tricorder.pi-hole.net/mpi5uc7kda!]

#2

What is the output from sudo systemctl status --full --no-pager lighttpd

#3

here it is:
sudo systemctl status --full --no-pager lighttpd

  • lighttpd.service - Lighttpd Daemon
    Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Mon 2019-05-13 16:15:23 CEST; 5h 15min ago
    Process: 5303 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)
    Process: 5293 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
    Main PID: 5303 (code=exited, status=255)

May 13 16:15:22 orangepilite systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
May 13 16:15:23 orangepilite systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
May 13 16:15:23 orangepilite systemd[1]: Stopped Lighttpd Daemon.
May 13 16:15:23 orangepilite systemd[1]: lighttpd.service: Start request repeated too quickly.
May 13 16:15:23 orangepilite systemd[1]: Failed to start Lighttpd Daemon.
May 13 16:15:23 orangepilite systemd[1]: lighttpd.service: Unit entered failed state.
May 13 16:15:23 orangepilite systemd[1]: lighttpd.service: Failed with result ‘exit-code’.

#4

Try starting lighttpd manually to see what errors are produced.

sudo /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf

#5

root@orangepilite:~# sudo /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
2019-05-14 02:17:52: (log.c.171) opening errorlog ‘/var/log/lighttpd/error.log’ failed: No such file or directory

#6

You’ll have to resolve that error in order for things to operate. That directory is not one that we control with Pi-hole so we’ll be unable to assist you with it.

#7

I’ve created the forlder for the errorlog now it give this:

root@orangepilite:~# sudo systemctl status --full --no-pager lighttpd
 lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: activating (start-pre) since Tue 2019-05-14 21:35:40 CEST; 113ms ago
  Process: 5428 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)
 Main PID: 5428 (code=exited, status=255); Control PID: 5438 (lighttpd)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/lighttpd.service
           -control
             |-5438 /usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf
             |-5443 /bin/sh -c /usr/share/lighttpd/create-mime.assign.pl
             -5444 /usr/bin/perl -w /usr/share/lighttpd/create-mime.assign.pl

May 14 21:35:40 orangepilite systemd[1]: Starting Lighttpd Daemon...
root@orangepilite:~# sudo systemctl status --full --no-pager lighttpd
 lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-05-14 21:35:41 CEST; 8s ago
  Process: 5450 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)
  Process: 5438 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 5450 (code=exited, status=255)

May 14 21:35:41 orangepilite systemd[1]: lighttpd.service: Failed with result 'exit-code'.
May 14 21:35:41 orangepilite systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
May 14 21:35:41 orangepilite systemd[1]: Stopped Lighttpd Daemon.
May 14 21:35:41 orangepilite systemd[1]: lighttpd.service: Start request repeated too quickly.
May 14 21:35:41 orangepilite systemd[1]: Failed to start Lighttpd Daemon.
May 14 21:35:41 orangepilite systemd[1]: lighttpd.service: Unit entered failed state.
May 14 21:35:41 orangepilite systemd[1]: lighttpd.service: Failed with result 'exit-code'.

I’ve also changed permission to 755 and www-data:www-data as other with same error fixed in this way but still nothing

#8

Run that command again to see where the new problem exists.

#9

error.log say server stopped by UID = 0 PID = 0 maybe it’s due to root user? btw i’ve messed a few things i’ll later try a full fresh install of armbian

#10

Yes, UID/PID 0 is root user.

#11

Oooook actually lighttpd don’t like to run under root user, made new user, made it sudoers and now works like a charm but i don’t know why it’s not uploading the debug

#12

Make sure your device has internet access and can resolve domains. That is required for uploading the debug log.

#13

yup, i’ve sad it’s all working, Router DHCP server gives all client the orangepilite(where pihole is installed) ip as dns, then pihole use google dns. Orangepilite it’s connected to internet and can resolve domains, i’ve also setted back to the default router dns but stil there’s an error while uploading the debug log
here is the debug log if you wanna check, https://pastebin.com/WQbXhsGk

#14

What is the output of this command?

curl --upload-file /var/log/pihole_debug.log https://tricorder.pi-hole.net:9998