unbound install error?

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
naddel81
Posts: 62
Joined: Sun Jul 21, 2019 12:54 pm

Re: unbound install error?

Post by naddel81 »

Code: Select all

Logs begin at Mon 2021-01-11 23:26:05 GMT, end at Mon 2021-01-11 23:36:01 GMT
. --
Jan 11 23:32:38 DietPi systemd[1]: Starting Unbound DNS server...
Jan 11 23:32:38 DietPi package-helper[1458]: /var/lib/unbound/root.key does notexist, copying from /usr/share/dns/root.key
Jan 11 23:32:38 DietPi package-helper[1458]: /var/lib/unbound/root.key has content
Jan 11 23:32:38 DietPi package-helper[1458]: success: the anchor is ok
Jan 11 23:32:38 DietPi unbound[1463]: [1610407958] unbound[1463:0] error: can'tbind socket: Address already in use for ::1 port 53
Jan 11 23:32:38 DietPi unbound[1463]: [1610407958] unbound[1463:0] fatal error:could not open ports
Jan 11 23:32:38 DietPi systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
Jan 11 23:32:38 DietPi systemd[1]: unbound.service: Failed with result 'exit-code'.
Jan 11 23:32:38 DietPi systemd[1]: Failed to start Unbound DNS server.
Jan 11 23:32:38 DietPi systemd[1]: unbound.service: Service RestartSec=100ms expired, scheduling restart.
Jan 11 23:32:38 DietPi systemd[1]: unbound.service: Scheduled restart job, restart counter is at 1.
Jan 11 23:32:38 DietPi systemd[1]: Stopped Unbound DNS server.
--More--
User avatar
Joulinar
Posts: 3339
Joined: Sat Nov 16, 2019 12:49 am

Re: unbound install error?

Post by Joulinar »

unbound still trying to use the same port as Pihole leading to a port conflict. Usually configuration should be overwritten by dietpi-software

can you post following

Code: Select all

ls -la /etc/unbound/unbound.conf.d/
cat /etc/unbound/unbound.conf 
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
naddel81
Posts: 62
Joined: Sun Jul 21, 2019 12:54 pm

Re: unbound install error?

Post by naddel81 »

Code: Select all

root@DietPi:~# ls -la /etc/unbound/unbound.conf.d/
total 24
drwxr-xr-x 2 root root 4096 Jan 11 23:32 .
drwxr-xr-x 3 root root 4096 Jan 11 23:32 ..
-rw-r--r-- 1 root root   32 Jan 11 23:32 dietpi-pihole.conf
-rw-r--r-- 1 root root 1274 Jan 11 23:32 dietpi.conf
-rw-r--r-- 1 root root  302 May 25  2020 qname-minimisation.conf
-rw-r--r-- 1 root root  190 May 25  2020 root-auto-trust-anchor-file.conf
root@DietPi:~# cat /etc/unbound/unbound.conf root@DietPi:~# ls -la /etc/unbound/unbound.conf.d/
cat: invalid option -- 'l'
Try 'cat --help' for more information.
root@DietPi:~# total 24
-bash: total: command not found
root@DietPi:~# drwxr-xr-x 2 root root 4096 Jan 11 23:32 .
-bash: drwxr-xr-x: command not found
root@DietPi:~# drwxr-xr-x 3 root root 4096 Jan 11 23:32 ..
-bash: drwxr-xr-x: command not found
root@DietPi:~# -rw-r--r-- 1 root root   32 Jan 11 23:32 dietpi-pihole.conf
-bash: -rw-r--r--: command not found
root@DietPi:~# -rw-r--r-- 1 root root 1274 Jan 11 23:32 dietpi.conf
-bash: -rw-r--r--: command not found
root@DietPi:~# -rw-r--r-- 1 root root  302 May 25  2020 qname-minimisation.conf
-bash: -rw-r--r--: command not found
root@DietPi:~# -rw-r--r-- 1 root root  190 May 25  2020 root-auto-trust-anchor-file.conf
-bash: -rw-r--r--: command not found
root@DietPi:~# root@DietPi:~# cat /etc/unbound/unbound.conf
-bash: root@DietPi:~#: command not found
User avatar
Joulinar
Posts: 3339
Joined: Sat Nov 16, 2019 12:49 am

Re: unbound install error?

Post by Joulinar »

looks like some copy past error on the last command and you invoke some more statements ;)

Code: Select all

cat /etc/unbound/unbound.conf 
cat /etc/unbound/unbound.conf.d/dietpi.conf
cat /etc/unbound/unbound.conf.d/dietpi-pihole.conf
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
naddel81
Posts: 62
Joined: Sun Jul 21, 2019 12:54 pm

Re: unbound install error?

Post by naddel81 »

Code: Select all

root@DietPi:~# ls -la /etc/unbound/unbound.conf.d/
total 24
drwxr-xr-x 2 root root 4096 Jan 11 23:32 .
drwxr-xr-x 3 root root 4096 Jan 11 23:32 ..
-rw-r--r-- 1 root root   32 Jan 11 23:32 dietpi-pihole.conf
-rw-r--r-- 1 root root 1274 Jan 11 23:32 dietpi.conf
-rw-r--r-- 1 root root  302 May 25  2020 qname-minimisation.conf
-rw-r--r-- 1 root root  190 May 25  2020 root-auto-trust-anchor-file.conf
root@DietPi:~# cat /etc/unbound/unbound.conf
# Unbound configuration file for Debian.
#
# See the unbound.conf(5) man page.
#
# See /usr/share/doc/unbound/examples/unbound.conf for a commented
# reference config file.
#
# The following line includes additional configuration files from the
# /etc/unbound/unbound.conf.d directory.
include: "/etc/unbound/unbound.conf.d/*.conf"
User avatar
Joulinar
Posts: 3339
Joined: Sat Nov 16, 2019 12:49 am

Re: unbound install error?

Post by Joulinar »

pls post content of the other 2 files as well

Code: Select all

cat /etc/unbound/unbound.conf.d/dietpi.conf
cat /etc/unbound/unbound.conf.d/dietpi-pihole.conf
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
naddel81
Posts: 62
Joined: Sun Jul 21, 2019 12:54 pm

Re: unbound install error?

Post by naddel81 »

Code: Select all

root@DietPi:~# cat /etc/unbound/unbound.conf.d/dietpi.conf
server:
    verbosity: 0

    interface: 0.0.0.0
    port: 53
    do-ip4: yes
    do-udp: yes
    do-tcp: yes

    do-ip6: yes

    prefer-ip6: no

    root-hints: "/var/lib/unbound/root.hints"

    harden-glue: yes
    harden-large-queries: yes

    harden-dnssec-stripped: yes

    use-caps-for-id: yes

    edns-buffer-size: 1472

    rrset-roundrobin: yes

    cache-min-ttl: 300
    cache-max-ttl: 86400

    serve-expired: yes

    harden-algo-downgrade: yes

    harden-short-bufsize: yes

    hide-identity: yes

    identity: "Server"

    hide-version: yes

    do-daemonize: no

    neg-cache-size: 4M

    qname-minimisation: yes

    minimal-responses: yes

    prefetch: yes
    prefetch-key: yes

    num-threads: 1

    msg-cache-size: 50m
    rrset-cache-size: 100m

    so-reuseport: yes

    so-rcvbuf: 4m
    so-sndbuf: 4m

    unwanted-reply-threshold: 10000

    ratelimit: 1000

    log-queries: no
    log-replies: no
    logfile: ''

    access-control: 0.0.0.0/0 refuse
    access-control: 127.0.0.1 allow
    access-control: 192.168.2.0/24 allow

    private-address: 192.168.0.0/16
    private-address: 169.254.0.0/16
    private-address: 172.16.0.0/12
    private-address: 10.0.0.0/8
    private-address: fd00::/8
    private-address: fe80::/10
root@DietPi:~#

Code: Select all

root@DietPi:~# cat /etc/unbound/unbound.conf.d/dietpi-pihole.conf
port: 5353
interface: 127.0.0.1
root@DietPi:~#
User avatar
Joulinar
Posts: 3339
Joined: Sat Nov 16, 2019 12:49 am

Re: unbound install error?

Post by Joulinar »

ok pls do following

Code: Select all

dietpi-software install 182
once you hit by the error, you have the possibility to Open subshell from the error handle. On the subshell do following

Code: Select all

rm -vf /etc/unbound/unbound.conf.d/{dietpi-pihole,pi-hole}.conf
G_CONFIG_INJECT 'port:[[:blank:]]' '	port: 5353' /etc/unbound/unbound.conf.d/dietpi.conf
G_CONFIG_INJECT 'interface:[[:blank:]]' '	interface: 127.0.0.1' /etc/unbound/unbound.conf.d/dietpi.conf
G_CONFIG_INJECT 'verbosity:[[:blank:]]' '	verbosity: 3' /etc/unbound/unbound.conf.d/dietpi.conf
G_CONFIG_INJECT 'log-queries:[[:blank:]]' '	log-queries: yes' /etc/unbound/unbound.conf.d/dietpi.conf
exit the subshell and hit Retry on the error handle
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
naddel81
Posts: 62
Joined: Sun Jul 21, 2019 12:54 pm

Re: unbound install error?

Post by naddel81 »

no error shown. should I continue with the pihole unbound guide now?
User avatar
Joulinar
Posts: 3339
Joined: Sat Nov 16, 2019 12:49 am

Re: unbound install error?

Post by Joulinar »

usually there is no need to follow any guide. dietpi-software should have set everything correctly. Probably the only thing needed to simply save DNS settings again inside PiHole.

Still i recommend following if not done already

Code: Select all

rm -vf /etc/unbound/unbound.conf.d/{dietpi-pihole,pi-hole}.conf
G_CONFIG_INJECT 'port:[[:blank:]]' '	port: 5353' /etc/unbound/unbound.conf.d/dietpi.conf
G_CONFIG_INJECT 'interface:[[:blank:]]' '	interface: 127.0.0.1' /etc/unbound/unbound.conf.d/dietpi.conf
G_CONFIG_INJECT 'verbosity:[[:blank:]]' '	verbosity: 3' /etc/unbound/unbound.conf.d/dietpi.conf
G_CONFIG_INJECT 'log-queries:[[:blank:]]' '	log-queries: yes' /etc/unbound/unbound.conf.d/dietpi.conf
BTW: on upcoming release DietPi 6.35, we will adjust unbound configuration to use port 5335 instead 5353. The new config file will be this once released. https://github.com/MichaIng/DietPi/blob ... bound.conf
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply