unbound could not read config file after system upgrade to 22.04

Bug #1983586 reported by Martin Wolf
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unbound (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I ran a test upgrade of my Ubuntu 20.04 Server to 22.04.
I already noticed while updating that unbound would not start up again.
when the update was done the errors I get are:

Aug 04 15:20:41 test.adiumentum.de package-helper[2951]: /etc/unbound/unbound.conf.d/adiumentum.conf:2: error: syntax error
Aug 04 15:20:41 test.adiumentum.de package-helper[2951]: read /etc/unbound/unbound.conf failed: 1 errors in configuration file
Aug 04 15:20:41 test.adiumentum.de package-helper[2954]: /etc/unbound/unbound.conf.d/adiumentum.conf:2: error: syntax error
Aug 04 15:20:41 test.adiumentum.de package-helper[2954]: read /etc/unbound/unbound.conf failed: 1 errors in configuration file
Aug 04 15:20:41 test.adiumentum.de unbound[2955]: /etc/unbound/unbound.conf.d/adiumentum.conf:2: error: syntax error
Aug 04 15:20:41 test.adiumentum.de unbound[2955]: read /etc/unbound/unbound.conf failed: 1 errors in configuration file
Aug 04 15:20:41 test.adiumentum.de unbound[2955]: [1659619241] unbound[2955:0] fatal error: Could not read config file: /etc/unbound/unbound.conf. Maybe try unbound -dd, it stays on the commandline to see more errors, or unbound-checkconf
Aug 04 15:20:41 test.adiumentum.de systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE

drwxr-xr-x 3 root root 4096 Aug 4 15:11 ./
drwxr-xr-x 152 root root 12288 Aug 4 15:19 ../
-rw-r--r-- 1 root root 341 Jul 1 2021 unbound.conf
drwxr-xr-x 2 root root 4096 Aug 4 15:11 unbound.conf.d/
-rw-r----- 1 root root 2459 Apr 24 21:42 unbound_control.key
-rw-r----- 1 root root 1342 Apr 24 21:42 unbound_control.pem
-rw-r----- 1 root root 2455 Apr 24 21:42 unbound_server.key
-rw-r----- 1 root root 1334 Apr 24 21:42 unbound_server.pem
root@test:/etc/unbound# cd unbound.conf.d/
root@test:/etc/unbound/unbound.conf.d# ll
insgesamt 20
drwxr-xr-x 2 root root 4096 Aug 4 15:11 ./
drwxr-xr-x 3 root root 4096 Aug 4 15:11 ../
-rw-r--r-- 1 root root 2662 Jul 23 23:03 adiumentum.conf
-rw-r--r-- 1 root root 26 Apr 24 21:42 resolvconf_resolvers.conf
-rw-r--r-- 1 root root 190 Okt 26 2019 root-auto-trust-anchor-file.conf
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.24
Architecture: amd64
CasperMD5CheckResult: skip
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2016-02-04 (2372 days ago)
InstallationMedia: Ubuntu-Server 15.10 "Wily Werewolf" - Release amd64 (20151021)
Package: unbound 1.9.4-2ubuntu1.2
PackageArchitecture: amd64
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 5.4.0-122.138-generic 5.4.192
Tags: focal
Uname: Linux 5.4.0-122-generic x86_64
UpgradeStatus: Upgraded to focal on 2022-08-03 (0 days ago)
UserGroups: N/A
_MarkForUpload: True

Revision history for this message
Martin Wolf (mwolf-adiumentum) wrote :
Revision history for this message
Martin Wolf (mwolf-adiumentum) wrote : Dependencies.txt

apport information

tags: added: apport-collected focal
description: updated
Revision history for this message
Martin Wolf (mwolf-adiumentum) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Martin Wolf (mwolf-adiumentum) wrote :

My config file is missing the "server:" line.
It seems the old (1.9.4) version does tolerate that while the new (1.13.1) seems not.

Is it possible that you modify unbound-checkconf to see this error?

Tom Reynolds (tomreyn)
tags: added: dist-upgrade
Tom Reynolds (tomreyn)
no longer affects: ubuntu-release-upgrader (Ubuntu)
Revision history for this message
Tom Reynolds (tomreyn) wrote :

Further communication with the bug reporter on IRC indicates that the release upgrade 20.04 LTS -> 22.04 LTS succeeded, just unbound failed to start on 22.04 with the configuration file which worked on 20.04. So this is is NOT an issue with the release-upgrader.

Revision history for this message
Simon Déziel (sdeziel) wrote :

unbound 1.11.0 changed the main config (/etc/unbound/unbound.conf) to use `include-toplevel:` instead of the old `include:` keyword. I suspect this is why your config snippets are no longer included properly as is.

Revision history for this message
kokoye2007  (kokoye2007) wrote :

It's worked

include-toplevel: > include:

Thanks @Simon

Revision history for this message
Robie Basak (racb) wrote :

Thank you for your report and helping to make Ubuntu better.

I think this is an unfortunate "misconfiguration" then in the sense that the configuration format has changed, and not a bug in the unbound package in Ubuntu? I'll change the bug status to Invalid to reflect that then. But thank you for reporting it - hopefully this will help others who hit the same issue.

Changed in unbound (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.