Lighttpd wont start error 255

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

browsing to http://ipaddress/admin should open the GUI for pihole

Actual Behaviour:

Page fails ot load

Debug Token:

https://tricorder.pi-hole.net/ihIHs3FE/

My problem is very similar to:

except
I've been trying to install LetsEncrpyt using certbot to make the webpage HTTPS compliant.

For some reason lighttpd now fails to start, obviously I've screwed something up along the way :roll_eyes:

root@pi-hole:/# systemctl status lighttpd
ā— lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2022-06-13 07:19:49 BST; 7min ago
  Process: 25199 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)

Jun 13 07:19:49 pi-hole systemd[1]: lighttpd.service: Unit entered failed state.
Jun 13 07:19:49 pi-hole systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Jun 13 07:19:49 pi-hole systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Jun 13 07:19:49 pi-hole systemd[1]: Stopped Lighttpd Daemon.
Jun 13 07:19:49 pi-hole systemd[1]: lighttpd.service: Start request repeated too quickly.
Jun 13 07:19:49 pi-hole systemd[1]: Failed to start Lighttpd Daemon.
Jun 13 07:19:49 pi-hole systemd[1]: lighttpd.service: Unit entered failed state.
Jun 13 07:19:49 pi-hole systemd[1]: lighttpd.service: Failed with result 'exit-code'.

root@pi-hole:/# ls -al /etc/lighttpd/
total 36
drwxr-xr-x   4 root root  4096 Jun 13 07:22 .
drwxr-xr-x 121 root root 12288 Jun 10 09:46 ..
drwxr-xr-x   2 root root  4096 Sep 17  2018 conf-available
drwxr-xr-x   2 root root  4096 Sep 17  2018 conf-enabled
-rw-r--r--   1 root root   730 Jun 10 15:01 external.conf
-rw-r--r--   1 root root  3894 Jun 11 14:55 lighttpd.conf
-rw-r--r--   1 root root  3664 Nov  3  2021 lighttpd.conf.orig

root@pi-hole:/# ls -al /var/log/lighttpd
total 2220
drwxr-x--- 2 www-data www-data    4096 Jun 12 06:25 .
drwxr-xr-x 8 root     root        4096 Jun 13 07:25 ..
-rwxr-xr-x 1 www-data www-data       0 Jun 12 06:25 access.log
-rw-r--r-- 1 www-data www-data 2100978 Jun 11 14:53 access.log.1
-rw-r--r-- 1 www-data www-data    1190 Apr 11 06:25 access.log.10.gz
-rw-r--r-- 1 www-data www-data     435 Apr  3 06:25 access.log.11.gz
-rw-r--r-- 1 www-data www-data    1227 Mar 27 13:00 access.log.12.gz
-rw-r--r-- 1 www-data www-data    8358 Jun  6 03:28 access.log.2.gz
-rw-r--r-- 1 www-data www-data    1098 May 29 06:25 access.log.3.gz
-rw-r--r-- 1 www-data www-data     918 May 23 01:02 access.log.4.gz
-rw-r--r-- 1 www-data www-data     496 May 14 21:43 access.log.5.gz
-rw-r--r-- 1 www-data www-data    1398 May  9 06:25 access.log.6.gz
-rw-r--r-- 1 www-data www-data     547 May  1 01:55 access.log.7.gz
-rw-r--r-- 1 www-data www-data    1275 Apr 25 03:20 access.log.8.gz
-rw-r--r-- 1 www-data www-data    1213 Apr 17 06:25 access.log.9.gz
-rw-r--r-- 1 www-data www-data       0 Jun 12 06:25 error.log
-rw-r--r-- 1 www-data www-data   53464 Jun 11 14:53 error.log.1
-rw-r--r-- 1 www-data www-data     635 Apr  9 23:56 error.log.10.gz
-rw-r--r-- 1 www-data www-data     262 Mar 28 09:42 error.log.11.gz
-rw-r--r-- 1 www-data www-data     430 Mar 21 13:02 error.log.12.gz
-rw-r--r-- 1 www-data www-data     588 Jun  5 06:10 error.log.2.gz
-rw-r--r-- 1 www-data www-data     445 May 28 20:44 error.log.3.gz
-rw-r--r-- 1 www-data www-data     314 May 17 21:43 error.log.4.gz
-rw-r--r-- 1 www-data www-data      90 May  9 06:25 error.log.5.gz
-rw-r--r-- 1 www-data www-data     437 May  7 18:16 error.log.6.gz
-rw-r--r-- 1 www-data www-data     262 Apr 25 12:23 error.log.7.gz
-rw-r--r-- 1 www-data www-data     404 Apr 23 12:34 error.log.8.gz
-rw-r--r-- 1 www-data www-data     481 Apr 14 12:04 error.log.9.gz

My linux knowledge is very basic :confused:

So, I've got lighttpd to start again by renaming the external.conf file.

I'm guessing I need help with getting lets encrypt and certbot to install properly.

This has no ties to DNS in general nor Pi-hole specifically.

That's not saying one of our community members may not be able to help you with similar experiences, but you may want to also consider other forums specialising in HTTPS-Encryption.

I'm recategorising this as Community Help. :wink:

Sorry for the mistake.

I have now got lighttpd service to start. I needed to create the combined.pem file and put the correct entries into external.conf.

My issue now is that I cant load the webpage via https.

http://pihole.knobheads.xyz redirets to https://pihole.knobheads.xyz but the page fails to load
So I guess the re-write is working.
If I just put pihole.knobheads.xyz into my browser then it goes to www.pihole.knobheads.xyz and that works.

Whenever you see an exit status code other than zero returned, 255 in above case, it means that part failed.
Try run that bit of code next time your experiencing issues, it will give you some more details to look for:

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

pi@ph5b:~ $ man lighttpd
[..]
       -f  configfile
               Load configuration file configfile.
[..]
       -tt     Test  the  configuration file for syntax errors, load and
               initialize modules, and exit.

EDIT:

pi@ph5b:~ $ sudo /usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf; echo $?
0
1 Like

Can I update my lighttpd without breaking pi-hole?

What do you mean by "update"?
Do you mean an apt upgrade ?
If so, yes you can run that one without breaking lighttpd or Pi-hole.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.