Unbound: chroot_setup & root_trust_anchor_update failure

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

  • Asprine
  • Registratie: September 2001
  • Laatst online: 17:10
Hi, probeer Unbound aan te praat te krijgen maar krijg hem niet aan de praat. Iemand die kan helpen?

Wat:
Raspberry Pi Zero 2 W
Raspbian GNU/Linux 11 (bullseye)

Gevolgde installatie handleiding:
https://docs.pi-hole.net/guides/dns/unbound/

Probleem
dig pi-hole.net @127.0.0.1 -p 5335
connection timed out; no servers could be reached

sudo service unbound status geeft 2 foutmeldingen
Process: 7608 ExecStartPre=/usr/lib/unbound/package-helper chroot_setup (code=exited, status=1/FAILURE)
Process: 7611 ExecStartPre=/usr/lib/unbound/package-helper root_trust_anchor_update (code=exited, status=1/FAILURE)

Geprobeerd:
- Reboot
- Root-hints in de config uncomment
-Uninstall, reinstall. Daarbij was opvallend dat de volgende directories niet gevonden en dus verwijderd kunnen worden Zet hij hem op een onverwachte plaats neer?
sudo rm -r /var/lib/unbound/
sudo rm -r /etc/unbound/


sudo grep -v '#\|^$' -R /etc/unbound/unbound.conf*
/etc/unbound/unbound.conf.d/pi-hole.conf:server:
/etc/unbound/unbound.conf.d/pi-hole.conf: verbosity: 0
/etc/unbound/unbound.conf.d/pi-hole.conf: interface: 127.0.0.1
/etc/unbound/unbound.conf.d/pi-hole.conf: port: 5335
/etc/unbound/unbound.conf.d/pi-hole.conf: do-ip4: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: do-udp: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: do-tcp: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: do-ip6: no
/etc/unbound/unbound.conf.d/pi-hole.conf: prefer-ip6: no
/etc/unbound/unbound.conf.d/pi-hole.conf: root-hints: "/var/lib/unbound/root.hints"
/etc/unbound/unbound.conf.d/pi-hole.conf: harden-glue: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: harden-dnssec-stripped: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: use-caps-for-id: no
/etc/unbound/unbound.conf.d/pi-hole.conf: edns-buffer-size: 1232
/etc/unbound/unbound.conf.d/pi-hole.conf: prefetch: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: num-threads: 1
/etc/unbound/unbound.conf.d/pi-hole.conf: so-rcvbuf: 1m
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 192.168.0.0/16
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 169.254.0.0/16
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 172.16.0.0/12
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 10.0.0.0/8
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: fd00::/8
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: fe80::/10

[ Voor 46% gewijzigd door Asprine op 15-04-2024 09:29 ]


Acties:
  • 0 Henk 'm!

  • Asprine
  • Registratie: September 2001
  • Laatst online: 17:10
Foutmeldingen verholpen door een config aan te maken onder:
/etc/unbound/unbound.conf
Met daarin:
include: "/etc/unbound/unbound.conf.d/*.conf"

Hij draait nu alleen krijg ik geen SERVFAIL voor
dig fail01.dnssec.works @127.0.0.1 -p 5335

Acties:
  • +1 Henk 'm!

  • Yariva
  • Registratie: November 2012
  • Laatst online: 15:50

Yariva

Moderator Internet & Netwerken

Power to the people!

Ik verplaats deze even naar serversoftware. Hoewel Unbound een netwerkdienst levert zijn al je vragen server gerelateerd.

Mensen zijn gelijk, maar sommige zijn gelijker dan andere | Humans need not apply


Acties:
  • +1 Henk 'm!

  • deHakkelaar
  • Registratie: Februari 2015
  • Laatst online: 27-07-2024
Je mist wel meer dan alleen dat /etc/unbound/unbound.conf bestandje:
pi@ph5b:~ $ lsb_release -d
Description:    Raspbian GNU/Linux 11 (bullseye)

pi@ph5b:~ $ sudo rgrep -v '^ *#\|^ *$' /etc/unbound/unbound.conf*
/etc/unbound/unbound.conf:include-toplevel: "/etc/unbound/unbound.conf.d/*.conf"
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf:server:
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf:    auto-trust-anchor-file: "/var/lib/unbound/root.key"
/etc/unbound/unbound.conf.d/pi-hole.conf:server:
/etc/unbound/unbound.conf.d/pi-hole.conf:    verbosity: 0
/etc/unbound/unbound.conf.d/pi-hole.conf:    interface: 127.0.0.1
/etc/unbound/unbound.conf.d/pi-hole.conf:    port: 5335
/etc/unbound/unbound.conf.d/pi-hole.conf:    do-ip4: yes
/etc/unbound/unbound.conf.d/pi-hole.conf:    do-udp: yes
/etc/unbound/unbound.conf.d/pi-hole.conf:    do-tcp: yes
/etc/unbound/unbound.conf.d/pi-hole.conf:    do-ip6: no
/etc/unbound/unbound.conf.d/pi-hole.conf:    prefer-ip6: no
/etc/unbound/unbound.conf.d/pi-hole.conf:    harden-glue: yes
/etc/unbound/unbound.conf.d/pi-hole.conf:    harden-dnssec-stripped: yes
/etc/unbound/unbound.conf.d/pi-hole.conf:    use-caps-for-id: no
/etc/unbound/unbound.conf.d/pi-hole.conf:    edns-buffer-size: 1232
/etc/unbound/unbound.conf.d/pi-hole.conf:    prefetch: yes
/etc/unbound/unbound.conf.d/pi-hole.conf:    num-threads: 1
/etc/unbound/unbound.conf.d/pi-hole.conf:    so-rcvbuf: 1m
/etc/unbound/unbound.conf.d/pi-hole.conf:    private-address: 192.168.0.0/16
/etc/unbound/unbound.conf.d/pi-hole.conf:    private-address: 169.254.0.0/16
/etc/unbound/unbound.conf.d/pi-hole.conf:    private-address: 172.16.0.0/12
/etc/unbound/unbound.conf.d/pi-hole.conf:    private-address: 10.0.0.0/8
/etc/unbound/unbound.conf.d/pi-hole.conf:    private-address: fd00::/8
/etc/unbound/unbound.conf.d/pi-hole.conf:    private-address: fe80::/10

Ze komen beiden met de unbound installatie:
pi@ph5b:~ $ dpkg -L unbound
[..]
/etc/unbound/unbound.conf
/etc/unbound/unbound.conf.d
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf

Enig idee hoe het komt dat die beide bestandjes missen na de installatie?

Onder twee om vers beide config bestandjes te herinstalleren:
code:
1
sudo rm /etc/unbound/unbound.conf{,.d/root-auto-trust-anchor-file.conf}

code:
1
sudo apt -o Dpkg::Options::="--force-confmiss" install --reinstall unbound

Comment die root-hints regel weer (plaats er een hekje # voor) want deze is niet nodig als je unbound via apt installeert:
pi@ph5b:~ $ apt depends unbound
[..]
  Depends: dns-root-data

pi@ph5b:~ $ dpkg -L dns-root-data
[..]
/usr/share/dns/root.hints
/usr/share/dns/root.hints.sig
/usr/share/dns/root.key

Controleer de huidig config:
code:
1
sudo unbound-checkconf

Herstart:
code:
1
sudo systemctl restart unbound.service

En probeer de dig's opnieuw:
code:
1
dig fail01.dnssec.works @127.0.0.1 -p 5335

code:
1
dig dnssec.works @127.0.0.1 -p 5335

EDIT: Ow kun je jouw output met de code tags <\> omsluiten aub?
Dat ziet er wat netter uit zoals in dit berichtje boven ^^^

There are only 10 types of people in the world: those who understand binary, and those who don't


Acties:
  • +1 Henk 'm!

  • Asprine
  • Registratie: September 2001
  • Laatst online: 17:10
Held, thanks voor je hulp
Heb de initiele installatie doorlopen, want dingen geprobeerd die ik verschillende forums zag zonder succes. Toen unbound verwijdert en clean gedaan en opnieuw begonnen. Heb die bestanden niet bewust weggegooid.

Config geeft geen erros, kreeg na de restart service timeouts maar met een volledige reboot werkt hij
Dank!

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
dig fail01.dnssec.works @127.0.0.1 -p 5335

; <<>> DiG 9.16.48-Raspbian <<>> fail01.dnssec.works @127.0.0.1 -p 5335
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 39236
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;fail01.dnssec.works.       IN  A

;; Query time: 10 msec
;; SERVER: 127.0.0.1#5335(127.0.0.1)
;; WHEN: Tue Apr 16 15:01:08 CEST 2024
;; MSG SIZE  rcvd: 48

Acties:
  • 0 Henk 'm!

  • Asprine
  • Registratie: September 2001
  • Laatst online: 17:10
Probeerde net nogmaals en kreeg bij de eerste keer weer een connection time-out en bij de tweede een succes. Moet ik nog iets aanvullen of is dit normaal gedrag?

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
dig fail01.dnssec.works @127.0.0.1 -p 5335

; <<>> DiG 9.16.48-Raspbian <<>> fail01.dnssec.works @127.0.0.1 -p 5335
;; global options: +cmd
;; connection timed out; no servers could be reached



dig fail01.dnssec.works @127.0.0.1 -p 5335

; <<>> DiG 9.16.48-Raspbian <<>> fail01.dnssec.works @127.0.0.1 -p 5335
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 1444
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;fail01.dnssec.works.       IN  A

;; Query time: 0 msec
;; SERVER: 127.0.0.1#5335(127.0.0.1)
;; WHEN: Tue Apr 16 15:49:28 CEST 2024
;; MSG SIZE  rcvd: 48

Acties:
  • +1 Henk 'm!

  • deHakkelaar
  • Registratie: Februari 2015
  • Laatst online: 27-07-2024
Asprine schreef op dinsdag 16 april 2024 @ 15:51:
Probeerde net nogmaals en kreeg bij de eerste keer weer een connection time-out en bij de tweede een succes. Moet ik nog iets aanvullen of is dit normaal gedrag?
Ja is normaal.
Gewoon net zolang hameren totdat je SERVFAIL krijgt ipv timeouts.
Dat is wel een vermelding waard in de gids ;)

There are only 10 types of people in the world: those who understand binary, and those who don't


Acties:
  • +1 Henk 'm!

  • Asprine
  • Registratie: September 2001
  • Laatst online: 17:10
Thanks!

Acties:
  • 0 Henk 'm!

  • Asprine
  • Registratie: September 2001
  • Laatst online: 17:10
Nog een aanvullende vraag. Las dat Unbound zijn DNS record in mem vast houdt. Dat betekend dat elke keer als de stroom er af is je alles kwijt bent. Is daar nog iets aan te doen?
Stroom gaat er wel een paar keer per jaar af, lijkt me wel zonde om dan weer helemaal op te bouwen, maar een ups voor een rassbery pi is ook weel overkill.

Acties:
  • +1 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 21:10

Hero of Time

Moderator LNX

There is only one Legend

Waarom zou je data die je elders ophaalt en alleen lokaal tijdelijk hoeft te bewaren op schijf op te slaan? Dat kost enorm veel writes.

Overigens is je cache ook al leeg bij een reboot, niet alleen een power down.

Commandline FTW | Tweakt met mate


Acties:
  • +2 Henk 'm!

  • deHakkelaar
  • Registratie: Februari 2015
  • Laatst online: 27-07-2024
Asprine schreef op woensdag 17 april 2024 @ 08:52:
Nog een aanvullende vraag. Las dat Unbound zijn DNS record in mem vast houdt. Dat betekend dat elke keer als de stroom er af is je alles kwijt bent. Is daar nog iets aan te doen?
Stroom gaat er wel een paar keer per jaar af, lijkt me wel zonde om dan weer helemaal op te bouwen, maar een ups voor een rassbery pi is ook weel overkill.
Dat cachen is niet permanent maar tijdelijk.
Elk DNS record die wordt gecached heeft een TTL (Time To Live).
Voor het tweakers.net A DNS record is dat 60 seconden:
pi@ph5b:~ $ dig +short tweakers.net. ns
ns-655.awsdns-17.net.
ns-1109.awsdns-10.org.
ns-1927.awsdns-48.co.uk.
ns-208.awsdns-26.com.

pi@ph5b:~ $ dig +noall +answer @ns-655.awsdns-17.net. tweakers.net. a
tweakers.net.           60      IN      A       213.239.154.31

Maar voor de MX DNS records (mail) is dit weer 300 seconden:
pi@ph5b:~ $ dig +noall +answer @ns-655.awsdns-17.net. tweakers.net. mx
tweakers.net.           300     IN      MX      10 mx1-eu.spamexperts.com.
tweakers.net.           300     IN      MX      20 mx2-eu.spamexperts.com.
tweakers.net.           300     IN      MX      30 mx3-eu.spamexperts.com.
tweakers.net.           300     IN      MX      40 mx4-eu.spamexperts.com.

En voor de root "." NS records (Name Server) weer 518400 seconden:
pi@ph5b:~ $ dig +noall +answer @a.root-servers.net. . ns
.                       518400  IN      NS      e.root-servers.net.
.                       518400  IN      NS      h.root-servers.net.
.                       518400  IN      NS      l.root-servers.net.
.                       518400  IN      NS      i.root-servers.net.
.                       518400  IN      NS      a.root-servers.net.
.                       518400  IN      NS      d.root-servers.net.
.                       518400  IN      NS      c.root-servers.net.
.                       518400  IN      NS      b.root-servers.net.
.                       518400  IN      NS      j.root-servers.net.
.                       518400  IN      NS      k.root-servers.net.
.                       518400  IN      NS      g.root-servers.net.
.                       518400  IN      NS      m.root-servers.net.
.                       518400  IN      NS      f.root-servers.net.

EDIT: Hier zie je mooi het aftellen naar nul wanneer hij weer verloopt uit de cache:
pi@ph5b:~ $ while :; do dig +noall +answer tweakers.net. a; sleep 2; done
tweakers.net.           60      IN      A       213.239.154.31
tweakers.net.           58      IN      A       213.239.154.31
tweakers.net.           56      IN      A       213.239.154.31
tweakers.net.           53      IN      A       213.239.154.31
tweakers.net.           51      IN      A       213.239.154.31
tweakers.net.           49      IN      A       213.239.154.31
tweakers.net.           47      IN      A       213.239.154.31
tweakers.net.           44      IN      A       213.239.154.31
[..]

[ Voor 12% gewijzigd door deHakkelaar op 17-04-2024 22:08 ]

There are only 10 types of people in the world: those who understand binary, and those who don't


Acties:
  • 0 Henk 'm!

  • Asprine
  • Registratie: September 2001
  • Laatst online: 17:10
Thanks, weer wat geleerd.
Pagina: 1