Lighttpd fails to start after reboot

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

Expected Behaviour:

to be able to access 192.168.0.200/admin

Actual Behaviour:

lighttpd fails to restart after a rpi reboot, unable to access web UI and having to run pihole -r (repair) to go through the long processes to get the UI back

When manually trying to run lighttpd i get this error:

pi@KylePi:~ $ systemctl status lighttpd
* lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-02-21 18:41:32 GMT; 13s ago
  Process: 1009 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
  Process: 1016 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)
 Main PID: 1016 (code=exited, status=255/EXCEPTION)

Debug Token:

5g0ow0i001

From your debug log

2021-02-21 18:41:30: (gw_backend.c.507) bind failed for: unix:/var/run/lighttpd/php.socket-0 No such file or directory 
   2021-02-21 18:41:30: (gw_backend.c.1510) [ERROR]: spawning gw failed. 
   2021-02-21 18:41:30: (server.c.1472) Configuration of plugins failed. Going down. 
   2021-02-21 18:41:31: (server.c.1464) server started (lighttpd/1.4.53) 
   2021-02-21 18:41:31: (gw_backend.c.507) bind failed for: unix:/var/run/lighttpd/php.socket-0 No such file or directory 
   2021-02-21 18:41:31: (gw_backend.c.1510) [ERROR]: spawning gw failed. 
   2021-02-21 18:41:31: (server.c.1472) Configuration of plugins failed. Going down. 
   2021-02-21 18:41:31: (server.c.1464) server started (lighttpd/1.4.53) 

This might help

Ill check it out :slight_smile:

No luck unfortunately,

Ran commands as followed in https://serverfault.com/a/836505

then ran systemctl start lighttpd and checked status

Error:

* lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-02-21 18:58:43 GMT; 1s ago
  Process: 5710 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
  Process: 5717 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)
 Main PID: 5717 (code=exited, status=255/EXCEPTION)

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

Check /var/log/lighttpd/error.log for the actual error.

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

Run that and see what it says.

So I ran it and it didn't print anything so im guessing you meant the status for that which is this

* lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-02-21 18:58:43 GMT; 5min ago
  Process: 5710 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
  Process: 5717 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)
 Main PID: 5717 (code=exited, status=255/EXCEPTION)

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

if this isnt what you meant let me know

it is quite long so I do appologise:

2021-02-21 14:50:35: (server.c.1464) server started (lighttpd/1.4.53)
2021-02-21 14:51:31: (server.c.2059) server stopped by UID = 0 PID = 1
2021-02-21 14:51:32: (server.c.1464) server started (lighttpd/1.4.53)
2021-02-21 14:51:32: (server.c.1493) WARNING: unknown config-key: alias.url (ignored)
2021-02-21 14:53:02: (mod_fastcgi.c.421) FastCGI-stderr: PHP Notice:  Undefined variable: viewPort in /var/www/html/pihole/index.php on line 73
2021-02-21 14:53:02: (mod_fastcgi.c.421) FastCGI-stderr: PHP Notice:  Undefined variable: serverName in /var/www/html/pihole/index.php on line 74
2021-02-21 14:53:20: (server.c.2059) server stopped by UID = 0 PID = 1
2021-02-21 14:49:46: (server.c.1464) server started (lighttpd/1.4.53)
2021-02-21 14:49:46: (gw_backend.c.507) bind failed for: unix:/var/run/lighttpd/php.socket-0 No such file or directory
2021-02-21 14:49:46: (gw_backend.c.1510) [ERROR]: spawning gw failed.
2021-02-21 14:49:46: (server.c.1472) Configuration of plugins failed. Going down.
2021-02-21 14:49:46: (server.c.1464) server started (lighttpd/1.4.53)
2021-02-21 14:49:46: (gw_backend.c.507) bind failed for: unix:/var/run/lighttpd/php.socket-0 No such file or directory
2021-02-21 14:49:46: (gw_backend.c.1510) [ERROR]: spawning gw failed.
2021-02-21 14:49:46: (server.c.1472) Configuration of plugins failed. Going down.
2021-02-21 14:49:47: (server.c.1464) server started (lighttpd/1.4.53)
2021-02-21 14:49:47: (gw_backend.c.507) bind failed for: unix:/var/run/lighttpd/php.socket-0 No such file or directory
2021-02-21 14:49:47: (gw_backend.c.1510) [ERROR]: spawning gw failed.
2021-02-21 14:49:47: (server.c.1472) Configuration of plugins failed. Going down.
2021-02-21 14:49:47: (server.c.1464) server started (lighttpd/1.4.53)

Why is the time not in order?

1 Like

No, that's not what I asked.

Are you saying that sudo /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf printed absolutely nothing to the terminal? Not even a start up message?

No idea I simply copied what it said

Indeed you can see a print screen here https://ss.kyle8973.tk/a45b

Then you have some serious issues with your system.

Best option is to nuke it and start over.

nuke it? you mean reinstall pihole all together or not?

I think yes in this case. Export all your Pi-hole settings using the teleporter function (Admin GUI > Settings > Teleporter) so you can restore them after you reinstall.

So I managed to get it to print something after removing pihole, this is the lighttpd error that occurs when I run the code you provided above

https://ss.kyle8973.tk/8vVz or in text embed

pi@KylePi:~ $ sudo /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
2021-02-22 08:56:25: (configfile.c.1468) command "cat external.conf 2>/dev/null" exited non-zero: 1
2021-02-22 08:56:25: (configfile.c.1296) source: /etc/lighttpd/lighttpd.conf line: 116 pos: 1 parser failed somehow near here: (EOL)
pi@KylePi:~ $

Okay, what does that output?

sudo cat /etc/lighttpd/external.conf

Nothing at all,

pi@KylePi:~ $ sudo cat /etc/lighttpd/external.conf
pi@KylePi:~ $

I'm starting to give up and thinking about closing this and just resulting to running pihole -r every single time I reboot as this has been an issue from day one and is becoming increasingly annoying

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