Pihole/UDM-boot.service error (exit code 123?) on UDM Pro-SE #388
Replies: 5 comments
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks for that. My Registries.conf file had a misspelling-changed it and
reran the initial scripts. I am close- UDM_Boot is running, Pihole
container is created, but ran into these errors after running the Pihole
update script:
Successfully tagged docker.io/pihole/pihole:latest
ed1021036cf368149574c24702517b407aad4d622a9cb6b76955d6f75db091ea
pihole
67d3b2e3cf15165282c64bb01fea7f62e499d487541cddb2b38b1827547e4986
ERRO[0011] error loading cached network config: network "dns" not found in
CNI cache
WARN[0011] falling back to loading from existing plugins on disk
Error: error configuring network namespace for container
f340fc4b8ce5eee3fdb2d93fbeb96c8940bbb4d74c5044babd8174bd94fcdb57: error
adding pod pihole_pihole to CNI network "dns": invalid IP address:
10.0.0.1/24
***@***.***:~# exit
All of the pihole ips match in 10-dns, 20-dns, and dns conflist files, of
the form 10.0.0.10
All of the pihole Gateway ips match in 10-dns, 20-dns, and dns
conflist files, of the form 10.0.0.1/24
Could that be the reason for "invalid ip address"? I wonder because there are
published examples of 10-dns.conflist here that have those two forms
reversed. by the way I can ping the gateway 10.0.0.1 but not the pihole 10.0.0.10.
…On Tue, Jul 12, 2022 at 6:34 AM John Dorman ***@***.***> wrote:
Jul 07 14:24:52 UDM-SE bash[18370]: udm-boot.service: running /mnt/data/on_boot.d/custom_pihole_dote.sh
Jul 07 14:24:52 UDM-SE bash[18370]: Error: short-name "pihole/pihole:latest" did not resolve to an alias and no containers-registries.conf(5) was found
Jul 07 14:24:52 UDM-SE bash[18370]: udm-boot.service: running /mnt/data/on_boot.d/pi_hole_update.sh
Jul 07 14:24:52 UDM-SE bash[18370]: Error: invalid reference format
Jul 07 14:24:52 UDM-SE bash[18370]: /mnt/data/on_boot.d/pi_hole_update.sh: line 4: --network: command not found```
I think those are pretty telling.
—
Reply to this email directly, view it on GitHub
<#388 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALNGZBBWFNJJ376HMFCXHCDVTVC4JANCNFSM526XXRHA>
.
You are receiving this because you authored the thread.Message ID:
<unifi-utilities/unifios-utilities/repo-discussions/388/comments/3128233@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
So the reason the dns network is missing is because you dont have the dns config file and the dns common.sh that links it in the correct directory https://github.com/unifi-utilities/unifios-utilities/blob/main/cni-plugins/20-dns.conflist unifios-utilities/cni-plugins/05-install-cni-plugins.sh Lines 21 to 29 in c7e5194 |
Beta Was this translation helpful? Give feedback.
-
If you have done the above there is a good chance your json is invalid, run it through a json linter to be sure |
Beta Was this translation helpful? Give feedback.
-
I finally got everything up and running and thanks for the help
troubleshooting. The problem I was having relates to the "pihole ip" and
"gateway address" as needed in four files: 10-dns.conflist,
20-dns.conflist, dns-conflist, and update_pihole.sh. I had presumed the
sample ip given in 10-dns was a typo since it is of the same form as
gateway address for the other files. My installation failed until I made
10-dns precisely as it is here (i.e., 10.0.5.3 and NOT 10.0.5.3/24). I hope
this is useful for others..
10-dns.conflist
IPV4_IP="10.0.5.3"
IPV4_GW="10.0.5.1/24"
20-dns.conflist
"address": "10.0.5.3/24",
"gateway": "10.0.5.1"
dns-conflist
"address": "10.0.5.3/24",
"gateway": "10.0.5.1"
update_pihole.sh
ServerIP="10.0.5.3"
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
…On Thu, Jul 14, 2022 at 11:38 AM John Dorman ***@***.***> wrote:
If you have done the above there is a good chance your json is invalid,
run it through a json linter to be sure
—
Reply to this email directly, view it on GitHub
<#388 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALNGZBEF3FSH5LIVW5ISG3TVUAX6BANCNFSM526XXRHA>
.
You are receiving this because you authored the thread.Message ID:
<unifi-utilities/unifios-utilities/repo-discussions/388/comments/3148230@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Thanks to all for creating and helping others with these utilities. I am aiming to get Pihole up and running but am encountering these errors. I have tried to troubleshoot this to death but do not have the programming skills to move forward from here. Please have a look and suggest some steps I might take. The end goal is to run pihole for dns, but the process appears to get hung up with the boot.service step, giving an exit code 123. What could be causing this?
UDM Pro SE
Firmware 2.4.12
I performed the remote install of on_boot script, modified 10-dns and 20-dns for my ip and vlan settings, and get the output below. I am using Custom_pihole_dote as per the instructions (file pasted at bottom), but the same output results when moving the custom file out and having just pi_hole_update.sh in the /mnt/data/on_boot.d directory.
root@UDM-SE:~# systemctl status udm-boot
udm-boot.service - Run On Startup UDM
Loaded: loaded (/etc/systemd/system/udm-boot.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2022-07-07 14:24:52 EDT; 1h 20min ago
Process: 18370 ExecStart=/bin/bash -c mkdir -p /mnt/data/on_boot.d && find -L /mnt/data/on_boot.d -mindepth 1 -maxdepth 1 -type f -print0 | sort -z | xarg
CPU: 2.041s
Jul 07 14:24:52 UDM-SE bash[18370]: logger: unknown priority name: ERROR Container pihole not found, make sure you set the proper name, you can ignore this
Jul 07 14:24:52 UDM-SE bash[18370]: udm-boot.service: running /mnt/data/on_boot.d/custom_pihole_dote.sh
Jul 07 14:24:52 UDM-SE bash[18370]: Error: short-name "pihole/pihole:latest" did not resolve to an alias and no containers-registries.conf(5) was found
Jul 07 14:24:52 UDM-SE bash[18370]: udm-boot.service: running /mnt/data/on_boot.d/pi_hole_update.sh
Jul 07 14:24:52 UDM-SE bash[18370]: Error: invalid reference format
Jul 07 14:24:52 UDM-SE bash[18370]: /mnt/data/on_boot.d/pi_hole_update.sh: line 4: --network: command not found
Jul 07 14:24:52 UDM-SE systemd[1]: udm-boot.service: Control process exited, code=exited, status=123/n/a
Jul 07 14:24:52 UDM-SE systemd[1]: udm-boot.service: Failed with result 'exit-code'
Jul 07 14:24:52 UDM-SE systemd[1]: Failed to start Run On Startup UDM
Jul 07 14:24:52 UDM-SE systemd[1]: udm-boot.service: Consumed 2.041s CPU time.
Here is the Custom file /mnt/data/on_boot.d/custom_pihole_dote.sh
#!/bin/bash
set -e
tmpdir="$(mktemp -d)"
curl -sSLo "${tmpdir}/dote" https://github.com/chrisstaite/DoTe/releases/latest/download/dote_arm64
cat > "${tmpdir}/Dockerfile" <<EOF
FROM pihole/pihole:latest
ENV DOTE_OPTS="-s 127.0.0.1:5053"
COPY dote /opt/dote
RUN chmod +x /opt/dote && echo -e "#!/bin/sh\n/opt/dote \$DOTE_OPTS -d\n" > /etc/cont-init.d/10-dote.sh
EOF
podman pull pihole/pihole:latest
podman build -t pihole:latest --format docker -f "${tmpdir}/Dockerfile" "${tmpdir}"
rm -rf "${tmpdir}"
set +e
podman stop pihole
podman rm pihole
podman run -d --network dns --restart always
--name pihole
-e TZ="America/New York"
-v "/mnt/data/etc-pihole/:/etc/pihole/"
-v "/mnt/data/pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/"
--dns=127.0.0.1
--dns=1.1.1.1
--dns=9.9.9.9
--hostname pi.hole
-e DOTE_OPTS="-s 127.0.0.1:5053 -m 10"
-e VIRTUAL_HOST="pi.hole"
-e PROXY_LOCATION="pi.hole"
-e PIHOLE_DNS_="127.0.0.1#5053"
-e ServerIP="10.0.0.10"
-e IPv6="False"
pihole:latest
Beta Was this translation helpful? Give feedback.
All reactions