Pi 5 Bookworm Pihole Problems

Hello everyone,

I got a PI5, which I basically use to manage my PV system. To do this, I installed the Solan display image in the latest version of Bookworm. Now I also wanted to install PIhole on the PI5, but unfortunately it gave me an error after the installation:

DNS service not running

DNSMASQ_CONFIG FTL failed to start due to failed to create listening socket for port 53: The address is already in use

Unfortunately I don't know what to do next. So far, no one has been able to help me in the Solar Display Forum either. My guess would be the network manager, as this was newly released by Bookworm.

Previously on my PI3 with Bullseye both worked together without any problems.

I am grateful for your support.

Greetings

If the port is in use you can start by running "sudo ss -upln" This will list active and listening UDP ports. Look for what process is running on port 53.

pi@solaranzeige:~ $ sudo ss -upln
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
UNCONN 0 0 0.0.0.0:5353 0.0.0.0:* users:(("avahi-daemon",pid=712,fd=12))
UNCONN 0 0 127.0.0.1:53 0.0.0.0:* users:(("connmand",pid=869,fd=11))
UNCONN 0 0 0.0.0.0:41055 0.0.0.0:* users:(("connmand",pid=869,fd=21))
UNCONN 0 0 169.254.255.255:137 0.0.0.0:* users:(("nmbd",pid=1730,fd=20))
UNCONN 0 0 169.254.247.149:137 0.0.0.0:* users:(("nmbd",pid=1730,fd=19))
UNCONN 0 0 192.168.178.255:137 0.0.0.0:* users:(("nmbd",pid=1730,fd=16))
UNCONN 0 0 192.168.178.38:137 0.0.0.0:* users:(("nmbd",pid=1730,fd=15))
UNCONN 0 0 0.0.0.0:137 0.0.0.0:* users:(("nmbd",pid=1730,fd=13))
UNCONN 0 0 169.254.255.255:138 0.0.0.0:* users:(("nmbd",pid=1730,fd=22))
UNCONN 0 0 169.254.247.149:138 0.0.0.0:* users:(("nmbd",pid=1730,fd=21))
UNCONN 0 0 192.168.178.255:138 0.0.0.0:* users:(("nmbd",pid=1730,fd=18))
UNCONN 0 0 192.168.178.38:138 0.0.0.0:* users:(("nmbd",pid=1730,fd=17))
UNCONN 0 0 0.0.0.0:138 0.0.0.0:* users:(("nmbd",pid=1730,fd=14))
UNCONN 0 0 0.0.0.0:41402 0.0.0.0:* users:(("avahi-daemon",pid=712,fd=14))
UNCONN 0 0 0.0.0.0:631 0.0.0.0:* users:(("cups-browsed",pid=1589,fd=7))
UNCONN 0 0 *:5353 : users:(("avahi-daemon",pid=712,fd=13))
UNCONN 0 0 *:35220 : users:(("avahi-daemon",pid=712,fd=15))
UNCONN 0 0 [::1]:53 : users:(("connmand",pid=869,fd=12))
UNCONN 0 0 *:546 : users:(("connmand",pid=869,fd=18))
UNCONN 13056 0 [fe80::fe2c:1b6f:fadd:53fd]:546 : users:(("NetworkManager",pid=866,fd=24))
pi@solaranzeige:~ $

"UNCONN 0 0 127.0.0.1:53 0.0.0.0:* users:(("connmand",pid=869,fd=11))"

connmand is a connection manager. That is currently using the port.

Hello, what can I do about it? Unfortunately, I don't know much about it.

Generally I would suggest making sure you have a static IP set on the PI and disable the connection manager through systemctl or uninstall it.

I'm guessing your running a gui on your Pi5? Do you need the connection manager?

Hi, first of all, thank you very much for the help :slight_smile:
I set a fixed IP for the Fritzbox. Do I have to set something else on the Pi?
I use the solar display Image, Grafana is running because of my PV system.
Unfortunately I can't say whether the image needs the manager, but I would try deleting it and see if it works.
How exactly can I delete it?

I tested the removal on a test build and it caused me connection issues even after setting a static IP so deleting it isn't the answer. The daemon will need to be shut down.

You can try these two commands from the terminal. The 1st will stop the service and the 2nd will disable the service so it won't start on reboot.

I would suggest running the 1st command and stopping the service then rerun

sudo ss -upln
or
sudo ss -upln |grep connmand

look for anything running on port 53 as before . Grepping for conmand should hopefully return nothing.

If that looks good you can run the 2nd command to disable network manager and then reboot. Hopefully that fixes it for you.

sudo systemctl stop NetworkManager.service 
sudo systemctl disable NetworkManager.service

If you have network issues afterward and you need to restart the services you can reverse it using the following:

sudo systemctl enable NetworkManager.service
sudo systemctl start NetworkManager.service

Note: if this does work you can still use nmcli. nmcli is part of Network-Manager and allows you to modify, create, and activate connections but does not run as a daemon. It's what is used in a headless configuration and a command that is worth learning. It also comes with nmtui which is a ncurses wireless connection manager.

Hi, unfortunately it doesn't work either. I don't know if I'm doing something wrong.

State  Recv-Q Send-Q               Local Address:Port          Peer Address:PortProcess
UNCONN 0      0                          0.0.0.0:44457              0.0.0.0:*    users:(("connmand",pid=867,fd=21))
UNCONN 0      0                          0.0.0.0:57111              0.0.0.0:*    users:(("avahi-daemon",pid=709,fd=14))
UNCONN 0      0                        127.0.0.1:domain             0.0.0.0:*    users:(("connmand",pid=867,fd=11))
UNCONN 0      0                  169.254.255.255:netbios-ns         0.0.0.0:*    users:(("nmbd",pid=1703,fd=21))
UNCONN 0      0                  169.254.247.149:netbios-ns         0.0.0.0:*    users:(("nmbd",pid=1703,fd=20))
UNCONN 0      0                  192.168.178.255:netbios-ns         0.0.0.0:*    users:(("nmbd",pid=1703,fd=16))
UNCONN 0      0                   192.168.178.38:netbios-ns         0.0.0.0:*    users:(("nmbd",pid=1703,fd=15))
UNCONN 0      0                          0.0.0.0:netbios-ns         0.0.0.0:*    users:(("nmbd",pid=1703,fd=13))
UNCONN 0      0                  169.254.255.255:netbios-dgm        0.0.0.0:*    users:(("nmbd",pid=1703,fd=23))
UNCONN 0      0                  169.254.247.149:netbios-dgm        0.0.0.0:*    users:(("nmbd",pid=1703,fd=22))
UNCONN 0      0                  192.168.178.255:netbios-dgm        0.0.0.0:*    users:(("nmbd",pid=1703,fd=18))
UNCONN 0      0                   192.168.178.38:netbios-dgm        0.0.0.0:*    users:(("nmbd",pid=1703,fd=17))
UNCONN 0      0                          0.0.0.0:netbios-dgm        0.0.0.0:*    users:(("nmbd",pid=1703,fd=14))
UNCONN 0      0                          0.0.0.0:631                0.0.0.0:*    users:(("cups-browsed",pid=1555,fd=7))
UNCONN 0      0                          0.0.0.0:mdns               0.0.0.0:*    users:(("avahi-daemon",pid=709,fd=12))
UNCONN 0      0                            [::1]:domain                   *:*    users:(("connmand",pid=867,fd=12))
UNCONN 0      0                                *:dhcpv6-client            *:*    users:(("connmand",pid=867,fd=18))
UNCONN 23936  0      [fe80::fe2c:1b6f:fadd:53fd]:dhcpv6-client            *:*    users:(("NetworkManager",pid=863,fd=24))
UNCONN 0      0                                *:46193                    *:*    users:(("avahi-daemon",pid=709,fd=15))
UNCONN 0      0                                *:mdns                     *:*    users:(("avahi-daemon",pid=709,fd=13))
pi@solaranzeige:~ $ sudo ss -upln |grep connmand
UNCONN 0      0                          0.0.0.0:44457      0.0.0.0:*    users:(("connmand",pid=867,fd=21))
UNCONN 0      0                        127.0.0.1:53         0.0.0.0:*    users:(("connmand",pid=867,fd=11))
UNCONN 0      0                            [::1]:53               *:*    users:(("connmand",pid=867,fd=12))
UNCONN 0      0                                *:546              *:*    users:(("connmand",pid=867,fd=18))
pi@solaranzeige:~ $ sudo systemctl stop NetworkManager.service
pi@solaranzeige:~ $ sudo systemctl disable NetworkManager.service
Removed "/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service".
Removed "/etc/systemd/system/multi-user.target.wants/NetworkManager.service".
Removed "/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service".
pi@solaranzeige:~ $

From the pihole try this command instead. It will be a bit easier to read.

sudo lsof -nP -iUDP

    sudo lsof -nP -iUDP
COMMAND    PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
avahi-dae  709 avahi   12u  IPv4  16253      0t0  UDP *:5353
avahi-dae  709 avahi   13u  IPv6  16254      0t0  UDP *:5353
avahi-dae  709 avahi   14u  IPv4  16255      0t0  UDP *:35797
avahi-dae  709 avahi   15u  IPv6  16256      0t0  UDP *:60707
connmand   850  root   11u  IPv4  16971      0t0  UDP 127.0.0.1:53
connmand   850  root   12u  IPv6  16975      0t0  UDP [::1]:53
connmand   850  root   17u  IPv4  25666      0t0  UDP 127.0.0.1:39947->127.0.0.1                                                                                                                                                                                                                                                                                                                                                           :53
connmand   850  root   18u  IPv4  19681      0t0  UDP 192.168.178.38:48693->192.                                                                                                                                                                                                                                                                                                                                                           168.178.157:53
connmand   850  root   19u  IPv6  25667      0t0  UDP [::1]:47717->[::1]:53
connmand   850  root   20u  IPv4  19689      0t0  UDP 192.168.178.38:47067->192.                                                                                                                                                                                                                                                                                                                                                           168.178.157:53
connmand   850  root   21u  IPv4  19691      0t0  UDP *:42185
firefox   1111    pi   95u  IPv4  30087      0t0  UDP *:53236
firefox   1111    pi   98u  IPv4  30089      0t0  UDP *:39672
cups-brow 1492  root    7u  IPv4  19729      0t0  UDP *:631
nmbd      1640  root   13u  IPv4  20839      0t0  UDP *:137
nmbd      1640  root   14u  IPv4  20840      0t0  UDP *:138
nmbd      1640  root   15u  IPv4  20851      0t0  UDP 192.168.178.38:137
nmbd      1640  root   16u  IPv4  20852      0t0  UDP 192.168.178.255:137
nmbd      1640  root   17u  IPv4  20853      0t0  UDP 192.168.178.38:138
nmbd      1640  root   18u  IPv4  20854      0t0  UDP 192.168.178.255:138
pi@solaranzeige:~ $

So it is still active. And this was after doing the sudo systemctl stop NetworkManager.service command? Did the command return any errors?

nein es gab kein fehler .

Its hard to tell but it looks like you ran both the stop and disable as one long string.

Try to run this command again.

sudo systemctl stop NetworkManager.service

Once complete run this and post results

sudo systemctl status NetworkManager.service

pi@solaranzeige:~ $ sudo systemctl stop NetworkManager.service
sudo systemctl disable NetworkManager.service
pi@solaranzeige:~ $ sudo systemctl stop NetworkManager.service
pi@solaranzeige:~ $ sudo systemctl status NetworkManager.service
○ NetworkManager.service - Network Manager
     Loaded: loaded (/lib/systemd/system/NetworkManager.service; disabled; preset: enabled)
     Active: inactive (dead)
       Docs: man:NetworkManager(8)
pi@solaranzeige:~ $

Ok, that should be good. Run

sudo systemctl disable NetworkManager.service

And then reboot. See if its working.

leider nein:(

From the pi terminal run

sudo systemctl status NetworkManager.service

lets see if it started again.

hmm.

From the pi terminal rerun

sudo lsof -nP -iUDP

lets see whats using that port. Perhaps there is another process. Also did the connection manager disappear from the taskbar?