Installation aborts at lighttpd restart

I was trying to install it on a ubuntu server I have for other internet based activities. It's hanging while trying to restart lighttpd

micca2@micca2:~$ sudo bash basic-install.sh
[sudo] password for micca2:

  [โœ“] Root user check

        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. ','.
                .',,,,,,'.
              .',,,,,,,,,,.
            .',,,,,,,,,,,,....
          ....''',,,,,,,'.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'......
            ....',,,,,,,,,,,,.
               .',,,,,,,,,'.
                .',,,,,,'.
                  ..'''.

  [i] Existing PHP installation detected : PHP version 7.2.19-0ubuntu0.18.04.1
  [i] Update option selected
  [i] Update option selected
  [โœ“] Disk space check
  [โœ“] Update local cache of available packages

  [โœ“] Checking apt-get for upgraded packages... 24 updates available
  [i] It is recommended to update your OS after installing the Pi-hole!

  [i] Installer Dependency checks...
  [โœ“] Checking for apt-utils
  [โœ“] Checking for dialog
  [โœ“] Checking for debconf
  [โœ“] Checking for dhcpcd5
  [โœ“] Checking for git
  [โœ“] Checking for iproute2
  [โœ“] Checking for whiptail

  [โœ“] Check for existing repository in /etc/.pihole
  [โœ“] Update repo in /etc/.pihole

  [โœ“] Check for existing repository in /var/www/html/admin
  [โœ“] Update repo in /var/www/html/admin

  [i] Main Dependency checks...
  [โœ“] Checking for cron
  [โœ“] Checking for curl
  [โœ“] Checking for dnsutils
  [โœ“] Checking for iputils-ping
  [โœ“] Checking for lsof
  [โœ“] Checking for netcat
  [โœ“] Checking for psmisc
  [โœ“] Checking for sudo
  [โœ“] Checking for unzip
  [โœ“] Checking for wget
  [โœ“] Checking for idn2
  [โœ“] Checking for sqlite3
  [โœ“] Checking for libcap2-bin
  [โœ“] Checking for dns-root-data
  [โœ“] Checking for resolvconf
  [โœ“] Checking for libcap2
  [โœ“] Checking for lighttpd
  [โœ“] Checking for php7.2-common
  [โœ“] Checking for php7.2-cgi
  [โœ“] Checking for php7.2-sqlite3

  [โœ“] Enabling lighttpd service to start on reboot...

  [i] FTL Checks...

  [โœ“] Detected x86_64 architecture
  [i] Checking for existing FTL binary...
  [i] Latest FTL Binary already installed (v4.3.1). Confirming Checksum...
  [i] Checksum correct. No need to download!
  [โœ“] Checking for user 'pihole'
  [โœ“] Installing scripts from /etc/.pihole

  [i] Installing configs from /etc/.pihole...
  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
  [โœ“] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf

  [i] Installing blocking page...
  [โœ“] Creating directory for blocking page, and copying files
  [โœ—] Backing up index.lighttpd.html
      No default index.lighttpd.html file found... not backing up

  [โœ“] Installing sudoer file

  [โœ“] Installing latest Cron script

  [โœ“] Installing latest logrotate script
  [i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old
  [โœ“] man pages installed and database updated
  [i] Testing if systemd-resolved is enabled
  [i] Systemd-resolved does not need to be restarted
  [i] Restarting lighttpd service...micca2@micca2:~$

What does the output from sudo systemctl status --full --no-pager lighttpd.service show? And can you start the service directly? sudo systemctl start lighttpd.service.

1 Like
micca2@micca2:~$ systemctl status --full --no-pager lighttpd.service
โ— lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-07-26 22:29:12 EDT; 1min 1s ago
  Process: 16615 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=127)

Jul 26 22:29:12 micca2 systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Jul 26 22:29:12 micca2 systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Jul 26 22:29:12 micca2 systemd[1]: Stopped Lighttpd Daemon.
Jul 26 22:29:12 micca2 systemd[1]: lighttpd.service: Start request repeated too quickly.
Jul 26 22:29:12 micca2 systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Jul 26 22:29:12 micca2 systemd[1]: Failed to start Lighttpd Daemon.
micca2@micca2:~$ sudo systemctl start 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.
micca2@micca2:~$ 

Give sudo /usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf a try and see what errors it displays.

micca2@micca2:~$ sudo /usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf
/usr/sbin/lighttpd: Symbol `FamErrlist' has different size in shared object, consider re-linking
/usr/sbin/lighttpd: symbol lookup error: /usr/sbin/lighttpd: undefined symbol: FAMNoExists

What release of Ubuntu and what kind of server (bare metal, virtualized, cloud...)? That appears to be an error with either the OS or with lighttpd itself.

https://bugs.launchpad.net/ubuntu/+source/lighttpd/+bug/1453463 looks similar to what you are experiencing. Installing the gamin package is the suggested resolution.

Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-54-generic x86_64)

Bare metal server.

Update Complete! 

  Current Pi-hole version is v4.3.1
  Current AdminLTE version is v4.3
  Current FTL version is v4.3.1

that worked! thanks!

Getting a 403 Forbidden error while trying to access the web interface.

Run pihole -d and post the token for us.

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

Check /var/log/lighttpd/access.log and /var/log/lighttpd/error.log to see what is being logged.

access.log

1564196234|192.168.200.125|GET / HTTP/1.1|403|345
1564196234|192.168.200.125|GET /favicon.ico HTTP/1.1|404|345
1564196282|192.168.200.125|GET /admin HTTP/1.1|301|0
1564196282|192.168.200.125|GET /admin/ HTTP/1.1|403|345
1564196299|192.168.200.125|GET /admin/ HTTP/1.1|403|345
1564196318|192.168.200.125|GET /admin HTTP/1.1|301|0
1564196318|192.168.200.125|GET /admin/ HTTP/1.1|403|345
1564196318|192.168.200.125|GET /favicon.ico HTTP/1.1|404|345
1564196320|192.168.200.125|GET /admin/ HTTP/1.1|403|345
1564196416|192.168.200.125|GET /admin/ HTTP/1.1|403|345
1564196675|pi.hole|GET /admin HTTP/1.1|301|0
1564196675|pi.hole|GET /admin/ HTTP/1.1|403|345
1564196675|pi.hole|GET /favicon.ico HTTP/1.1|404|345
1564196680|pi.hole|HEAD / HTTP/1.1|403|0
1564196687|pi.hole|GET / HTTP/1.1|403|345
1564196747|pi.hole|GET / HTTP/1.1|403|345
1564196826|localhost|HEAD / HTTP/1.1|403|0
1564196826|localhost|HEAD /admin/ HTTP/1.1|403|0
1564196826|localhost|HEAD / HTTP/1.1|403|0
1564196826|localhost|HEAD /admin/ HTTP/1.1|403|0
1564196857|127.0.0.1|GET /admin HTTP/1.1|301|0
1564196858|127.0.0.1|GET /admin/ HTTP/1.1|403|345

error.log

2019-07-26 22:56:01: (log.c.217) server started

Okay, check the permissions on the admin directory. sudo ls -la /var/www/html/admin/

micca2@micca2:~$ sudo ls -la /var/www/html/admin/
total 276
drwxr-xr-x 7 root     root      4096 Jul 26 22:45 .
drwxrwxr-x 4 www-data www-data  4096 Jul 26 22:45 ..
-rw-r--r-- 1 root     root     11342 Jul 26 22:45 api_db.php
-rw-r--r-- 1 root     root      8760 Jul 26 22:45 api_FTL.php
-rw-r--r-- 1 root     root      3609 Jul 26 22:45 api.php
-rw-r--r-- 1 root     root      2795 Jul 26 22:45 auditlog.php
-rw-r--r-- 1 root     root      2339 Jul 26 22:45 CONTRIBUTING.md
-rw-r--r-- 1 root     root      2244 Jul 26 22:45 db_graph.php
-rw-r--r-- 1 root     root      4273 Jul 26 22:45 db_lists.php
-rw-r--r-- 1 root     root      5910 Jul 26 22:45 db_queries.php
-rw-r--r-- 1 root     root       948 Jul 26 22:45 debug.php
drwxr-xr-x 8 root     root      4096 Jul 26 23:10 .git
drwxr-xr-x 2 root     root      4096 Jul 26 22:45 .github
-rw-r--r-- 1 root     root       153 Jul 26 22:45 .gitignore
-rw-r--r-- 1 root     root      1229 Jul 26 22:45 gravity.php
-rw-r--r-- 1 root     root      9398 Jul 26 22:45 help.php
drwxr-xr-x 2 root     root      4096 Jul 26 22:45 img
-rw-r--r-- 1 root     root     10811 Jul 26 22:45 index.php
-rw-r--r-- 1 root     root     14164 Jul 26 22:45 LICENSE
-rw-r--r-- 1 root     root      3300 Jul 26 22:45 list.php
-rw-r--r-- 1 root     root      2843 Jul 26 22:45 network.php
-rw-r--r-- 1 root     root       652 Jul 26 22:45 .pullapprove.yml
-rw-r--r-- 1 root     root      5475 Jul 26 22:45 queries.php
-rw-r--r-- 1 root     root      1110 Jul 26 22:45 queryads.php
-rw-r--r-- 1 root     root      9422 Jul 26 22:45 README.md
drwxr-xr-x 4 root     root      4096 Jul 26 22:45 scripts
-rw-r--r-- 1 root     root     93198 Jul 26 22:45 settings.php
drwxr-xr-x 3 root     root      4096 Jul 26 22:45 style
-rw-r--r-- 1 root     root       939 Jul 26 22:45 taillog-FTL.php
-rw-r--r-- 1 root     root       931 Jul 26 22:45 taillog.php
-rw-r--r-- 1 root     root        45 Jul 26 22:45 .user.php.ini

The initial partial install may have caused some of the files to not copy correctly. It looks similar to Fix uninstall causing 403 errors and not removing packages by AzureMarker ยท Pull Request #2808 ยท pi-hole/pi-hole ยท GitHub resolution.

Try sudo apt purge lighttpd and then pihole -r to make sure all configuration files are in the right place.

works now! Thanks so much for your help! what's your favorite site to test it on?

Glad it's working. I personally don't have a site to test with, if a site is bad enough that I need to block parts of the site then the whole site ends up on my wildcard blacklist.

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