Pi-hole Web Interface unavailable, Error 503 Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
kaptain_zero
Posts: 39
Joined: Tue Apr 12, 2016 2:51 am

Re: Pi-hole Web Interface unavailable, Error 503

Post by kaptain_zero »

I ran across this topic when I initially had a problem with accessing the webgui after an update. To this date, I have yet to regain access to the webui for pihole. None of the fixes/workarounds in this thread have helped. I'm using Dietpi on an Odroid C2.

Is this a problem unique to me, or is it widespread?

Regards

Christian
User avatar
MichaIng
Site Admin
Posts: 2507
Joined: Sat Nov 18, 2017 6:21 pm

Re: Pi-hole Web Interface unavailable, Error 503

Post by MichaIng »

@kaptain_zero
Which webserver do you use? Assuming Lighttpd (default), could you paste:

Code: Select all

journalctl -u lighttpd
journalctl -u php7.3-fpm
User avatar
kaptain_zero
Posts: 39
Joined: Tue Apr 12, 2016 2:51 am

Re: Pi-hole Web Interface unavailable, Error 503

Post by kaptain_zero »

@MichaIng
journalctl -u lighttpd identified the issue.... the Daemon was not running, nor would it start.

I uninstalled and re-installed LLSP and all is back to normal. Thank you for the help!

Regards

Christian
JohnDoeFR
Posts: 34
Joined: Tue Sep 22, 2020 6:04 pm

Re: Pi-hole Web Interface unavailable, Error 503

Post by JohnDoeFR »

Hi,

I've done the same (Uninstall/Install LLSP) since I can't access my admin interface anymore BUT, I still have the problem and this error :

Code: Select all

Nov 27 11:21:00 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Nov 27 11:21:00 DietPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Nov 27 11:21:00 DietPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 1.
Nov 27 11:21:00 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 27 11:21:00 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 27 11:21:00 DietPi lighttpd[5948]: 2020-11-27 11:21:00: (configfile.c.1328) opening configfile  /etc/lighttpd/lighttpd.conf failed: No such file or directory
Nov 27 11:21:00 DietPi systemd[1]: lighttpd.service: Control process exited, code=exited, status=255/EXCEPTION
Nov 27 11:21:00 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 27 11:21:00 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Nov 27 11:21:01 DietPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Nov 27 11:21:01 DietPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 2.
Nov 27 11:21:01 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 27 11:21:01 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 27 11:21:01 DietPi lighttpd[5949]: 2020-11-27 11:21:01: (configfile.c.1328) opening configfile  /etc/lighttpd/lighttpd.conf failed: No such file or directory
Nov 27 11:21:01 DietPi systemd[1]: lighttpd.service: Control process exited, code=exited, status=255/EXCEPTION
Nov 27 11:21:01 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Someone has an other idea ?

Thanks !
User avatar
Joulinar
Posts: 3284
Joined: Sat Nov 16, 2019 12:49 am

Re: Pi-hole Web Interface unavailable, Error 503

Post by Joulinar »

Hi,

your web server is not starting anymore as you are missing lighttpd configuration file /etc/lighttpd/lighttpd.conf

Code: Select all

opening configfile  /etc/lighttpd/lighttpd.conf failed: No such file or directory
pls can you post ls -la /etc/lighttpd/
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
JohnDoeFR
Posts: 34
Joined: Tue Sep 22, 2020 6:04 pm

Re: Pi-hole Web Interface unavailable, Error 503

Post by JohnDoeFR »

Hi,

Thanks for your help
there it is :

Code: Select all

total 20
drwxr-xr-x  4 root root 4096 Nov  2 07:10 .
drwxr-xr-x 81 root root 4096 Nov 27 11:34 ..
drwxr-xr-x  2 root root 4096 Oct  9 08:07 conf-available
drwxr-xr-x  2 root root 4096 Oct  9 08:07 conf-enabled
-rw-r--r--  1 root root 2057 Sep 19 20:59 lighttpd.conf.bak
User avatar
Joulinar
Posts: 3284
Joined: Sat Nov 16, 2019 12:49 am

Re: Pi-hole Web Interface unavailable, Error 503

Post by Joulinar »

create a new config file

Code: Select all

nano /etc/lighttpd/lighttpd.conf
and insert whole content as follow

Code: Select all

server.modules = (
        "mod_indexfile",
        "mod_setenv",
        "mod_access",
        "mod_alias",
        "mod_redirect",
        "mod_accesslog",
)

server.document-root        = "/var/www"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"
server.port                 = 80
accesslog.filename          = "/var/log/lighttpd/access.log"

# strict parsing and normalization of URL for consistency and security
# https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_http-parseoptsDetails
# (might need to explicitly set "url-path-2f-decode" = "disable"
#  if a specific application is encoding URLs inside url-path)
server.http-parseopts = (
  "header-strict"           => "enable",# default
  "host-strict"             => "enable",# default
  "host-normalize"          => "enable",# default
  "url-normalize-unreserved"=> "enable",# recommended highly
  "url-normalize-required"  => "enable",# recommended
  "url-ctrls-reject"        => "enable",# recommended
  "url-path-2f-decode"      => "enable",# recommended highly (unless breaks app)
 #"url-path-2f-reject"      => "enable",
  "url-path-dotseg-remove"  => "enable",# recommended highly (unless breaks app)
 #"url-path-dotseg-reject"  => "enable",
 #"url-query-20-plus"       => "enable",# consistency in query string
)

index-file.names            = ( "index.php", "index.html" )
url.access-deny             = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )

# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.conf.pl"
include "/etc/lighttpd/conf-enabled/*.conf"

#server.compat-module-load   = "disable"
server.modules += (
        "mod_compress",
        "mod_dirlisting",
        "mod_staticfile",
)
restart web server

Code: Select all

systemctl restart lighttpd.service
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
JohnDoeFR
Posts: 34
Joined: Tue Sep 22, 2020 6:04 pm

Re: Pi-hole Web Interface unavailable, Error 503

Post by JohnDoeFR »

Done

Know I can have

Code: Select all

503 Service Not Available
When i try to connect from the webbrowser
User avatar
Joulinar
Posts: 3284
Joined: Sat Nov 16, 2019 12:49 am

Re: Pi-hole Web Interface unavailable, Error 503

Post by Joulinar »

what URL you are trying to connect? Pls provide following

Code: Select all

systemctl restart lighttpd
systemctl status lighttpd
cat /var/log/lighttpd/error.log
journalctl -u lighttpd
journalctl -u php7.3-fpm
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
JohnDoeFR
Posts: 34
Joined: Tue Sep 22, 2020 6:04 pm

Re: Pi-hole Web Interface unavailable, Error 503

Post by JohnDoeFR »

Thanks for the help

So for : systemctl status lighttpd

Code: Select all

root@DietPi:~# systemctl status lighttpd
● lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-11-27 21:05:51 GMT; 7s ago
  Process: 11600 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 11606 (lighttpd)
    Tasks: 1 (limit: 4442)
   CGroup: /system.slice/lighttpd.service
           └─11606 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf

Nov 27 21:05:51 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 27 21:05:51 DietPi systemd[1]: Started Lighttpd Daemon.
cat /var/log/lighttpd/error.log

Code: Select all

root@DietPi:~# cat /var/log/lighttpd/error.log
2020-11-27 20:42:18: (server.c.1464) server started (lighttpd/1.4.53) 
2020-11-27 20:42:38: (gw_backend.c.240) establishing connection failed: No such file or directory socket: unix:/run/php/php7.3-fpm.sock 
2020-11-27 20:42:38: (gw_backend.c.956) all handlers for /admin/index.php? on .php are down. 
2020-11-27 20:42:40: (gw_backend.c.319) gw-server re-enabled: unix:/run/php/php7.3-fpm.sock  0 /run/php/php7.3-fpm.sock 
2020-11-27 20:42:41: (gw_backend.c.240) establishing connection failed: No such file or directory socket: unix:/run/php/php7.3-fpm.sock 
2020-11-27 20:42:41: (gw_backend.c.956) all handlers for /admin/index.php? on .php are down. 
2020-11-27 20:42:43: (gw_backend.c.319) gw-server re-enabled: unix:/run/php/php7.3-fpm.sock  0 /run/php/php7.3-fpm.sock 
2020-11-27 20:42:55: (gw_backend.c.240) establishing connection failed: No such file or directory socket: unix:/run/php/php7.3-fpm.sock 
2020-11-27 20:42:55: (gw_backend.c.956) all handlers for /admin/index.php? on .php are down. 
2020-11-27 20:42:57: (gw_backend.c.319) gw-server re-enabled: unix:/run/php/php7.3-fpm.sock  0 /run/php/php7.3-fpm.sock 
2020-11-27 20:43:31: (gw_backend.c.240) establishing connection failed: No such file or directory socket: unix:/run/php/php7.3-fpm.sock 
2020-11-27 20:43:31: (gw_backend.c.956) all handlers for /pihole/index.php? on .php are down. 
2020-11-27 20:43:33: (gw_backend.c.319) gw-server re-enabled: unix:/run/php/php7.3-fpm.sock  0 /run/php/php7.3-fpm.sock 
2020-11-27 20:43:39: (gw_backend.c.240) establishing connection failed: No such file or directory socket: unix:/run/php/php7.3-fpm.sock 
2020-11-27 20:43:39: (gw_backend.c.956) all handlers for /admin/index.php? on .php are down. 
2020-11-27 20:43:41: (gw_backend.c.319) gw-server re-enabled: unix:/run/php/php7.3-fpm.sock  0 /run/php/php7.3-fpm.sock 
2020-11-27 20:44:26: (gw_backend.c.240) establishing connection failed: No such file or directory socket: unix:/run/php/php7.3-fpm.sock 
2020-11-27 20:44:26: (gw_backend.c.956) all handlers for /admin/index.php? on .php are down. 
2020-11-27 20:44:28: (gw_backend.c.319) gw-server re-enabled: unix:/run/php/php7.3-fpm.sock  0 /run/php/php7.3-fpm.sock 
2020-11-27 20:50:14: (gw_backend.c.240) establishing connection failed: No such file or directory socket: unix:/run/php/php7.3-fpm.sock 
2020-11-27 20:50:14: (gw_backend.c.956) all handlers for /admin/index.php? on .php are down. 
2020-11-27 20:50:16: (gw_backend.c.319) gw-server re-enabled: unix:/run/php/php7.3-fpm.sock  0 /run/php/php7.3-fpm.sock 
2020-11-27 20:51:50: (gw_backend.c.240) establishing connection failed: No such file or directory socket: unix:/run/php/php7.3-fpm.sock 
2020-11-27 20:51:50: (gw_backend.c.956) all handlers for /admin/index.php? on .php are down. 
2020-11-27 20:51:52: (gw_backend.c.319) gw-server re-enabled: unix:/run/php/php7.3-fpm.sock  0 /run/php/php7.3-fpm.sock 
2020-11-27 20:55:32: (gw_backend.c.240) establishing connection failed: No such file or directory socket: unix:/run/php/php7.3-fpm.sock 
2020-11-27 20:55:32: (gw_backend.c.956) all handlers for /nextcloud/index.php? on .php are down. 
2020-11-27 20:55:34: (gw_backend.c.319) gw-server re-enabled: unix:/run/php/php7.3-fpm.sock  0 /run/php/php7.3-fpm.sock 
2020-11-27 20:56:01: (mod_openssl.c.1746) SSL: 1 error:1408F10B:SSL routines:ssl3_get_record:wrong version number 
2020-11-27 20:56:01: (mod_openssl.c.1746) SSL: 1 error:1408F10B:SSL routines:ssl3_get_record:wrong version number 
2020-11-27 20:56:01: (mod_openssl.c.1746) SSL: 1 error:1408F10B:SSL routines:ssl3_get_record:wrong version number 
2020-11-27 21:03:47: (gw_backend.c.240) establishing connection failed: No such file or directory socket: unix:/run/php/php7.3-fpm.sock 
2020-11-27 21:03:47: (gw_backend.c.956) all handlers for /nextcloud/index.php? on .php are down. 
2020-11-27 21:03:49: (gw_backend.c.319) gw-server re-enabled: unix:/run/php/php7.3-fpm.sock  0 /run/php/php7.3-fpm.sock 
2020-11-27 21:04:36: (gw_backend.c.240) establishing connection failed: No such file or directory socket: unix:/run/php/php7.3-fpm.sock 
2020-11-27 21:04:36: (gw_backend.c.956) all handlers for /nextcloud/index.php? on .php are down. 
2020-11-27 21:04:38: (gw_backend.c.319) gw-server re-enabled: unix:/run/php/php7.3-fpm.sock  0 /run/php/php7.3-fpm.sock 
2020-11-27 21:04:49: (gw_backend.c.240) establishing connection failed: No such file or directory socket: unix:/run/php/php7.3-fpm.sock 
2020-11-27 21:04:49: (gw_backend.c.956) all handlers for /nextcloud/index.php? on .php are down. 
2020-11-27 21:04:51: (gw_backend.c.319) gw-server re-enabled: unix:/run/php/php7.3-fpm.sock  0 /run/php/php7.3-fpm.sock 
2020-11-27 21:05:50: (server.c.2059) server stopped by UID = 0 PID = 1 
2020-11-27 21:05:51: (server.c.1464) server started (lighttpd/1.4.53) 
root@DietPi:~#
journalctl -u lighttpd :

Code: Select all

root@DietPi:~# journalctl -u lighttpd
-- Logs begin at Fri 2020-11-27 10:46:22 GMT, end at Fri 2020-11-27 21:05:51 GMT. --
Nov 27 10:47:10 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 27 10:47:10 DietPi lighttpd[753]: 2020-11-27 10:47:10: (configfile.c.1328) opening configfile  /etc/lighttpd/lighttpd.conf failed
: No such file or directory
Nov 27 10:47:10 DietPi systemd[1]: lighttpd.service: Control process exited, code=exited, status=255/EXCEPTIO
N
Nov 27 10:47:10 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 27 10:47:10 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Nov 27 10:47:10 DietPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Nov 27 10:47:10 DietPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 1.
Nov 27 10:47:10 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 27 10:47:10 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 27 10:47:10 DietPi lighttpd[789]: 2020-11-27 10:47:10: (configfile.c.1328) opening configfile  /etc/lighttpd/lighttpd.conf failed
: No such file or directory
Nov 27 10:47:10 DietPi systemd[1]: lighttpd.service: Control process exited, code=exited, status=255/EXCEPTIO
N
Nov 27 10:47:10 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 27 10:47:10 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Nov 27 10:47:11 DietPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Nov 27 10:47:11 DietPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 2.
Nov 27 10:47:11 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 27 10:47:11 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 27 10:47:11 DietPi lighttpd[790]: 2020-11-27 10:47:11: (configfile.c.1328) opening configfile  /etc/lighttpd/lighttpd.conf failed
: No such file or directory
Nov 27 10:47:11 DietPi systemd[1]: lighttpd.service: Control process exited, code=exited, status=255/EXCEPTIO
N
Nov 27 10:47:11 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 27 10:47:11 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Nov 27 10:47:11 DietPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Nov 27 10:47:11 DietPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 3.
Nov 27 10:47:11 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 27 10:47:11 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 27 10:47:11 DietPi lighttpd[791]: 2020-11-27 10:47:11: (configfile.c.1328) opening configfile  /etc/lighttpd/lighttpd.conf failed
: No such file or directory
Nov 27 10:47:11 DietPi systemd[1]: lighttpd.service: Control process exited, code=exited, status=255/EXCEPTIO
N
Nov 27 10:47:11 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 27 10:47:11 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Nov 27 10:47:11 DietPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Nov 27 10:47:11 DietPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 4.
Nov 27 10:47:11 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 27 10:47:11 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 27 10:47:11 DietPi lighttpd[792]: 2020-11-27 10:47:11: (configfile.c.1328) opening configfile  /etc/lighttpd/lighttpd.conf failed
: No such file or directory
Nov 27 10:47:11 DietPi systemd[1]: lighttpd.service: Control process exited, code=exited, status=255/EXCEPTIO
N
Nov 27 10:47:11 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 27 10:47:11 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Nov 27 10:47:12 DietPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Nov 27 10:47:12 DietPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Nov 27 10:47:12 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 27 10:47:12 DietPi systemd[1]: lighttpd.service: Start request repeated too quickly.
Nov 27 10:47:12 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 27 10:47:12 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Nov 27 11:21:00 DietPi systemd[1]: Starting Lighttpd Daemon...
Nov 27 11:21:00 DietPi lighttpd[5946]: 2020-11-27 11:21:00: (configfile.c.1328) opening configfile  /etc/lighttpd/lighttpd.conf faile
d: No such file or directory
Nov 27 11:21:00 DietPi systemd[1]: lighttpd.service: Control process exited, code=exited, status=255/EXCEPTIO
N
Nov 27 11:21:00 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 27 11:21:00 DietPi systemd[1]: Failed to start Lighttpd Daemon.
Nov 27 11:21:00 DietPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Nov 27 11:21:00 DietPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 1.
Nov 27 11:21:00 DietPi systemd[1]: Stopped Lighttpd Daemon.
--More--
journalctl -u php7.3-fpm :

Code: Select all

root@DietPi:~# journalctl -u php7.3-fpm
-- Logs begin at Fri 2020-11-27 10:46:22 GMT, end at Fri 2020-11-27 21:05:51 GMT. --
Nov 27 10:47:09 DietPi systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
Nov 27 10:47:10 DietPi systemd[1]: Started The PHP 7.3 FastCGI Process Manager.
Nov 27 11:29:04 DietPi systemd[1]: Stopping The PHP 7.3 FastCGI Process Manager...
Nov 27 11:29:04 DietPi systemd[1]: php7.3-fpm.service: Succeeded.
Nov 27 11:29:04 DietPi systemd[1]: Stopped The PHP 7.3 FastCGI Process Manager.
Nov 27 11:29:23 DietPi systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
Nov 27 11:29:23 DietPi systemd[1]: Started The PHP 7.3 FastCGI Process Manager.
Nov 27 11:30:29 DietPi systemd[1]: Stopping The PHP 7.3 FastCGI Process Manager...
Nov 27 11:30:29 DietPi systemd[1]: php7.3-fpm.service: Succeeded.
Nov 27 11:30:29 DietPi systemd[1]: Stopped The PHP 7.3 FastCGI Process Manager.
root@DietPi:~# 
There it is, I've noticed that when i Try to acess my Nextcloud via the web interface it shows me the same message
Post Reply