Lighttpd stopped working

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Lelo
Posts: 17
Joined: Wed Oct 11, 2017 10:50 pm

Lighttpd stopped working

Post by Lelo »

Hello.

I´m facing the problem that my webserver suddenly stopped working. Using a portscanner I found out that only
the port 22 is working. I rebooted the system, I have checked for updates, but I can´t start the webserver.

DietPi v6.28.0 on a RasPi 3
[*] 82 LLMP: lighttpd | mariadb | php
[*] 114 Nextcloud: File sync, sharing and collaboration platform

I searched with Google and I think the problem is a not starting Lighttpd:

Code: Select all

###
How can I fix this problem?


Cheers,
Lelo
Last edited by Lelo on Mon May 04, 2020 7:19 am, edited 1 time in total.
User avatar
Joulinar
Posts: 2021
Joined: Sat Nov 16, 2019 12:49 am

Re: Lighttpd stopped working

Post by Joulinar »

Hi,

many thanks for your report.

Usually there is no need to use a port scanner to check what ports are in use on your system. As well if you would know the open port, you still would not know which application is using the port ;)

A better view you will get on the system themselves. There are multiple ways to check ports in LISTEN status. The follwoing 2 commands could help on this.

Code: Select all

lsof -i -P -n | grep LISTEN 
ss -alnp | grep LISTEN
It could happen that lsof tool is not available, but can be installed quite easy

Code: Select all

apt update
apt install lsof
Back to your issue: yep lighttpd is failing to start, therefore your web server is not working. Pls can you restart web server and check error log as follow

Code: Select all

systemctl restart lighttpd.service
cat /var/log/lighttpd/error.log
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Lelo
Posts: 17
Joined: Wed Oct 11, 2017 10:50 pm

Re: Lighttpd stopped working

Post by Lelo »

Hi Joulinar, this is the result:

Code: Select all

root@DietPi-Raspi3:~# systemctl restart lighttpd.service
Job for lighttpd.service failed because the control process exited with error code.
See "systemctl status lighttpd.service" and "journalctl -xe" for details.
root@DietPi-Raspi3:~# cat /var/log/lighttpd/error.log
root@DietPi-Raspi3:~#
The filesize of /var/log/lighttpd/error.log is "0":

Code: Select all

root@DietPi-Raspi3:~# ls -l /var/log/lighttpd/error.log
-rw-r--r-- 1 www-data www-data 0 Mär  3 22:26 /var/log/lighttpd/error.log
User avatar
Joulinar
Posts: 2021
Joined: Sat Nov 16, 2019 12:49 am

Re: Lighttpd stopped working

Post by Joulinar »

can you check

Code: Select all

journalctl -u lighttpd
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Lelo
Posts: 17
Joined: Wed Oct 11, 2017 10:50 pm

Re: Lighttpd stopped working

Post by Lelo »

That is the (repeating) result:

Code: Select all

###
Last edited by Lelo on Mon May 04, 2020 7:19 am, edited 2 times in total.
User avatar
Joulinar
Posts: 2021
Joined: Sat Nov 16, 2019 12:49 am

Re: Lighttpd stopped working

Post by Joulinar »

first I updated your post because it contains your DDNS entry.

than it seems you have SSL configured and Lighttpd is not able to read the certificate anymore. Basically you would have 2 options. ensure the certificate file is still there could be access by Lighttpd or you remove SSL configuration from Lighttpd config file.

Code: Select all

SSL: couldn't read X509 certificate from '/etc/letsencrypt/live/<yourDDNS>/combined.pem'
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply