Current behavior
I ran in to the issue, when I upgraded Ubuntu 20.04 to 22.04 which upgraded Unbound 1.9.4 to 1.13.1
Unbound 1.9.4 ran fine, but after I upgraded to 1.13.1 I got these errors:
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
and unbound-checkconf was also saying basically the same.
The real issue was, that I forgot to add "server:" to the config file in the first place.
Describe the desired feature
I would like that unbound-checkconf would check, if the most basic variables are present like "server:" and if they are not give better error messages than like the one I got. Because for me a "Could not read config file" sounds more like a permission issue than a missing line in the config file.
Potential use-case
I think most users who start to use unbound would benefit from this, since good error messages help finding the right culprit
Current behavior
I ran in to the issue, when I upgraded Ubuntu 20.04 to 22.04 which upgraded Unbound 1.9.4 to 1.13.1
Unbound 1.9.4 ran fine, but after I upgraded to 1.13.1 I got these errors:
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
and unbound-checkconf was also saying basically the same.
The real issue was, that I forgot to add "server:" to the config file in the first place.
Describe the desired feature
I would like that unbound-checkconf would check, if the most basic variables are present like "server:" and if they are not give better error messages than like the one I got. Because for me a "Could not read config file" sounds more like a permission issue than a missing line in the config file.
Potential use-case
I think most users who start to use unbound would benefit from this, since good error messages help finding the right culprit