Upgraded Raspbian & Pihole - Now pihole will not work

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

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

I have a standard install of Pihole updated to the latest version
Earlier today, I updated my RPi to bullseye following the instructions at Raspberry Pi Documentation - Raspberry Pi OS

I noted a few errors when attempting to update GCC 8 and libGCC 8 but was able to resolve those issues by manually updating those libraries. A few other prompts on retaining existing versions of lighttpd.conf and another conf that I don't remember the name of right now.

Post the OS upgrade, I rebooted the RPi and then upgraded Pihole to the latest version using pihole -up command

Ever since, Pihole has stopped working. I'm consistently receiving the message FTL was not started and the DNSresolver is not listening. I've run pihole -r and attempting both repair and reconfiguration steps but neither seems to have resolved the issue.

Expected Behaviour:

Pihole should be running fine without any issues

Actual Behaviour:

Pihole has stopped working.

In the admin interface, I see this:

I noticed a bunch of notifications as well which have the following:

Exploring more on this, I came across the following threads:

and

The first does not apply directly to me and the 2nd looks like it. But even in the Raspbian forums, I was unable to find any way to fix the blocking of port 53 by connmand.

How do I fix this? I'd prefer not to perform a reset of the RPi OS and Pihole.

Debug Token:

Your debug token is: https://tricorder.pi-hole.net/BEDSzvvk/

Running the following commande:
sudo netstat -tulpn

Output:


Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      5536/connmand
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      528/sshd: /usr/sbin
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      487/cupsd
tcp        0      0 127.0.0.1:8088          0.0.0.0:*               LISTEN      977/influxd
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN      519/vncserver-x11-c
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1030/lighttpd
tcp6       0      0 ::1:53                  :::*                    LISTEN      5536/connmand
tcp6       0      0 :::8086                 :::*                    LISTEN      977/influxd
tcp6       0      0 :::22                   :::*                    LISTEN      528/sshd: /usr/sbin
tcp6       0      0 ::1:631                 :::*                    LISTEN      487/cupsd
tcp6       0      0 :::3000                 :::*                    LISTEN      968/grafana-server
tcp6       0      0 :::5900                 :::*                    LISTEN      519/vncserver-x11-c
tcp6       0      0 :::80                   :::*                    LISTEN      1030/lighttpd
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           365/avahi-daemon: r
udp        0      0 0.0.0.0:52742           0.0.0.0:*                           365/avahi-daemon: r
udp        0      0 127.0.0.1:53            0.0.0.0:*                           5536/connmand
udp        0      0 0.0.0.0:68              0.0.0.0:*                           443/dhcpcd
udp        0      0 0.0.0.0:631             0.0.0.0:*                           569/cups-browsed
udp6       0      0 :::5353                 :::*                                365/avahi-daemon: r
udp6       0      0 ::1:53                  :::*                                5536/connmand
udp6       0      0 :::36452                :::*                                365/avahi-daemon: r
*** [ DIAGNOSING ]: Ports in use
[53] is in use by connmand (https://docs.pi-hole.net/main/prerequisites/#ports)
[53] is in use by connmand (https://docs.pi-hole.net/main/prerequisites/#ports)

Port 53 is in use by connmand but required by Pi-hole.

Yes. How do I fix this? I'm not familiar with this service and I've not installed or enabled it. This appears to have happened automatically as a result of upgrading the OS

What device are your running Pi-hole on? I'm not sure if raspbian installs connman by default...

Try

sudo systemctl disable connman.service

I'm running it on a Raspberry Pi 4B.

I tried this and then starting the FTL service:

pi@raspberrypi:~ $ sudo systemctl disable connman.service
Synchronizing state of connman.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable connman
Removed /etc/systemd/system/multi-user.target.wants/connman.service.
pi@raspberrypi:~ $ sudo service pihole-FTL start
pi@raspberrypi:~ $ sudo service pihole-FTL status
â—Ź pihole-FTL.service - LSB: pihole-FTL daemon
     Loaded: loaded (/etc/init.d/pihole-FTL; generated)
     Active: active (exited) since Sun 2021-10-24 16:48:59 IST; 30min ago
       Docs: man:systemd-sysv-generator(8)
      Tasks: 0 (limit: 4915)
        CPU: 0
     CGroup: /system.slice/pihole-FTL.service

Oct 24 16:48:29 raspberrypi systemd[1]: Starting LSB: pihole-FTL daemon...
Oct 24 16:48:29 raspberrypi pihole-FTL[1680]: Not running
Oct 24 16:48:30 raspberrypi su[1692]: (to pihole) root on none
Oct 24 16:48:30 raspberrypi su[1692]: pam_unix(su:session): session opened for user pihole(uid=999) by (uid=0)
Oct 24 16:48:59 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.
pi@raspberrypi:~ $

It appears connmand service wasn't stopped:


pi@raspberrypi:~ $  sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      369/connmand
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      531/sshd: /usr/sbin
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      498/cupsd
tcp        0      0 127.0.0.1:8088          0.0.0.0:*               LISTEN      956/influxd
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN      523/vncserver-x11-c
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1031/lighttpd
tcp6       0      0 ::1:53                  :::*                    LISTEN      369/connmand
tcp6       0      0 :::8086                 :::*                    LISTEN      956/influxd
tcp6       0      0 :::22                   :::*                    LISTEN      531/sshd: /usr/sbin
tcp6       0      0 ::1:631                 :::*                    LISTEN      498/cupsd
tcp6       0      0 :::3000                 :::*                    LISTEN      945/grafana-server
tcp6       0      0 :::5900                 :::*                    LISTEN      523/vncserver-x11-c
tcp6       0      0 :::80                   :::*                    LISTEN      1031/lighttpd
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           366/avahi-daemon: r
udp        0      0 127.0.0.1:53            0.0.0.0:*                           369/connmand
udp        0      0 0.0.0.0:68              0.0.0.0:*                           944/dhcpcd
udp        0      0 0.0.0.0:631             0.0.0.0:*                           571/cups-browsed
udp        0      0 0.0.0.0:39555           0.0.0.0:*                           366/avahi-daemon: r
udp6       0      0 :::5353                 :::*                                366/avahi-daemon: r
udp6       0      0 :::49095                :::*                                366/avahi-daemon: r
udp6       0      0 ::1:53                  :::*                                369/connmand

Is there anything else I can try to fix this?

sudo systemctl stop connman.service

Running this command killed all the network connections (specifically, also the ethernet connection which is the only connection channel to the Pi). I don't think this is usable as is

Clearly this is not an option.

To quote from the thread you linked above

Having connmand installed/running is likely a non-default configuration. You need to figure out why/when it was installed and remove it.

if you google "connman dns" you get:

If you are running a local DNS server, it will likely have problems binding to port 53 (TCP and/or UDP) after installing Connman. This is because Connman includes its own DNS proxy which also tries to bind to those ports. If you see log messages from BIND or dnsmasq like

named[529]: could not listen on UDP socket: address in use

this could be the problem. To verify which application is listening on the ports, you can execute ss -tulpn as root.

To fix this connmand can be started with the options -r or --nodnsproxy by overriding the systemd service file. Create the folder /etc/systemd/system/connman.service.d/ and add the file disable_dns_proxy.conf :

/etc/systemd/system/connman.service.d/disable_dns_proxy.conf

[Service] ExecStart= ExecStart=/usr/bin/connmand -n --nodnsproxy

2 Likes

Thank you. I'll try this out
(I'm also considering wiping the SD card and reinstalling the OS)

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