Please follow the below template, it will help us to help you!
Expected Behaviour:
Web UI is accessible on port 80
Actual Behaviour:
ERR_CONNECTION_REFUSED
Debug Token:
0sxcie1cv6
Web UI is accessible on port 80
ERR_CONNECTION_REFUSED
0sxcie1cv6
Your debug log shows that lighttpd is not running on port 80. Lighttpd serves up the web interface and the blocking page (if you use a blocking mode that provides a blocking page).
*** [ DIAGNOSING ]: Ports in use
*:22 dropbear (IPv4)
*:22 dropbear (IPv6)
*:53 pihole-FTL (IPv4)
*:53 pihole-FTL (IPv6)
127.0.0.1:4711 pihole-FTL (IPv4)
[::1]:4711 pihole-FTL (IPv6)
*** [ DIAGNOSING ]: Pi-hole processes
[✗] dnsmasq daemon is inactive
[✗] lighttpd daemon is failed
[✓] pihole-FTL daemon is active
Run this command from the Pi terminal:
sudo service lighttpd restart
Then what is the output of this command?
sudo service lighttpd status
lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-11-08 13:16:05 GMT; 18s ago
Process: 12484 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited,
status=255)
Process: 12474 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, stat
us=0/SUCCESS)
Main PID: 12484 (code=exited, status=255)
Nov 08 13:16:05 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 08 13:16:05 DietPi systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Nov 08 13:16:05 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 08 13:16:05 DietPi systemd[1]: lighttpd.service: Start request repeated too quickly.
Nov 08 13:16:05 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Nov 08 13:16:05 DietPi systemd[1]: lighttpd.service: Unit entered failed state.
Nov 08 13:16:05 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.`Preformatted text`
What is the output of this command? journalctl -l -u lighttpd
Nov 08 02:15:28 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 08 02:15:29 DietPi systemd[1]: Started Lighttpd Daemon.
Nov 08 02:15:29 DietPi lighttpd[629]: 2018-11-08 02:15:29: (log.c.171) opening errorlog '/var/log/lighttpd/error.log' failed: No such file or
directory
Nov 08 02:15:29 DietPi systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Nov 08 02:15:29 DietPi systemd[1]: lighttpd.service: Unit entered failed state.
Nov 08 02:15:29 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 08 02:15:29 DietPi systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Nov 08 02:15:29 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 08 02:15:29 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 08 02:15:30 DietPi systemd[1]: Started Lighttpd Daemon.
Nov 08 02:15:30 DietPi lighttpd[654]: 2018-11-08 02:15:30: (log.c.171) opening errorlog '/var/log/lighttpd/error.log' failed: No such file or
directory
Nov 08 02:15:30 DietPi systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Nov 08 02:15:30 DietPi systemd[1]: lighttpd.service: Unit entered failed state.
Nov 08 02:15:30 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 08 02:15:30 DietPi systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Nov 08 02:15:30 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 08 02:15:30 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 08 02:15:31 DietPi systemd[1]: Started Lighttpd Daemon.
Nov 08 02:15:31 DietPi lighttpd[677]: 2018-11-08 02:15:31: (log.c.171) opening errorlog '/var/log/lighttpd/error.log' failed: No such file or
directory
Nov 08 02:15:31 DietPi systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Nov 08 02:15:31 DietPi systemd[1]: lighttpd.service: Unit entered failed state.
Nov 08 02:15:31 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 08 02:15:31 DietPi systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Nov 08 02:15:31 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 08 02:15:31 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 08 02:15:31 DietPi systemd[1]: Started Lighttpd Daemon.
Nov 08 02:15:32 DietPi lighttpd[699]: 2018-11-08 02:15:32: (log.c.171) opening errorlog '/var/log/lighttpd/error.log' failed: No such file or
directory
Nov 08 02:15:32 DietPi systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Nov 08 02:15:32 DietPi systemd[1]: lighttpd.service: Unit entered failed state.
Nov 08 02:15:32 DietPi lighttpd[699]: 2018-11-08 02:15:32: (log.c.171) opening errorlog ‘/var/log/lighttpd/error.log’ failed: No such file or
directory
Nov 08 02:15:32 DietPi systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Nov 08 02:15:32 DietPi systemd[1]: lighttpd.service: Unit entered failed state.
Nov 08 02:15:32 DietPi systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
Nov 08 02:15:32 DietPi systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Nov 08 02:15:32 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 08 02:15:32 DietPi systemd[1]: Starting Lighttpd Daemon…
Nov 08 02:15:32 DietPi systemd[1]: Started Lighttpd Daemon.
Nov 08 02:15:33 DietPi lighttpd[723]: 2018-11-08 02:15:32: (log.c.171) opening errorlog ‘/var/log/lighttpd/error.log’ failed: No such file or
directory
Nov 08 02:15:33 DietPi systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Nov 08 02:15:33 DietPi systemd[1]: lighttpd.service: Unit entered failed state.
Nov 08 02:15:33 DietPi systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
Nov 08 02:15:33 DietPi systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Nov 08 02:15:33 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 08 02:15:33 DietPi systemd[1]: lighttpd.service: Start request repeated too quickly.
Nov 08 02:15:33 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Nov 08 02:15:33 DietPi systemd[1]: lighttpd.service: Unit entered failed state.
Nov 08 02:15:33 DietPi systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
Nov 08 02:15:37 DietPi systemd[1]: lighttpd.service: Start request repeated too quickly.
Nov 08 02:15:37 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Nov 08 02:15:37 DietPi systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
Nov 08 02:21:31 DietPi systemd[1]: Starting Lighttpd Daemon…
Nov 08 02:21:31 DietPi systemd[1]: Started Lighttpd Daemon.
Nov 08 02:21:31 DietPi lighttpd[2155]: 2018-11-08 02:21:31: (log.c.171) opening errorlog ‘/var/log/lighttpd/error.log’ failed: No such file o
r directory
Nov 08 02:21:32 DietPi systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Nov 08 02:21:32 DietPi systemd[1]: lighttpd.service: Unit entered failed state.
Nov 08 02:21:32 DietPi systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
What is the output of this command? ls -al /var/log/lighttpd/error.log
You probably need to fix the permissions so that the www-data
user can access that file.
There is no such file named error.log nor a directory named lighttpd.
Mcat wants to see output, try
cd /var/log/
and than post the output of
$ ls -al
cheers
dietpi@DietPi:/var/log$ ls -al
total 4320
drwxr-xr-x 8 root root 420 Nov 13 00:17 .
drwxr-xr-x 12 root root 4096 Oct 3 05:28 ..
drwxrwxr-x 2 root root 40 Sep 22 15:28 apache2
drwxrwxr-x 2 root root 100 Nov 8 01:50 apt
-rw-r--r-- 1 root root 0 Sep 9 07:24 boot.log
-rw-r--r-- 1 root root 0 Nov 8 02:17 boottime
-rw------- 1 root utmp 0 Aug 14 16:41 btmp
-rwxrwxr-x 1 root root 0 May 15 17:30 dietpi-boot.log
-rw-r--r-- 1 root root 0 Nov 8 01:51 dpkg.log
drwxrwxr-x 2 root root 40 Sep 22 15:28 fsck
-rw-r--r-- 1 root root 292292 Nov 13 12:32 lastlog
drwxrwxr-x 2 root root 40 Sep 22 15:28 news
-rw-r--r-- 1 root root 0 Aug 14 14:14 ntpd.log
drwxr-xr-x 2 pihole pihole 40 Oct 31 19:17 pihole
-rw-r--r-- 1 root pihole 0 Nov 8 03:17 pihole_debug.log
-rw-r--r-- 1 root root 0 Nov 8 03:17 pihole_debug-sanitized.log
-rw-r--r-- 1 pihole pihole 0 Nov 13 10:17 pihole-FTL.log
-rw-r--r-- 1 pihole pihole 4410685 Nov 13 12:33 pihole.log
-rw-r--r-- 1 root root 0 Nov 13 00:17 pihole.log.1
drwxrwxr-x 2 root root 40 Sep 22 15:28 samba
-rw-rw-r-- 1 root utmp 384 Nov 13 12:32 wtmp
dietpi@DietPi:/var/log$
Regularly the missing log file is being created automatically by lighttpd.
Try to manually create the lighttpd log files and make them writeable for the www-data
user with these commands:
mkdir /var/log/lighttpd
touch /var/log/lighttpd/access.log
touch /var/log/lighttpd/error.log
chown -R www-data:www-data /var/log/lighttpd
Does lighttpd start now?
If not, please check the output of the command journalctl -l -u lighttpd
and post it here again.
Another hint:
I see an apache2
log file from your ls -al /var/log
output. Maybe it's old and you have removed apache2 since – but if not: Running two web servers (lighttpd + apache2) on the same machine might cause issues if you don't know exactly what you're doing. If apache2 is not needed an that machine you might want to uninstall it.
Thank you rso42, making the directory with those log files solved the issue! I am back up and running. The next time my power goes out at my house, I will make sure to re-follow these commands.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.