Error starting unbound

Issues related to applications and software problems and general support
Post Reply
cgdo
Posts: 3
Joined: 2020/09/10 21:31:19

Error starting unbound

Post by cgdo » 2020/09/10 21:42:03

Hello guys, I'm new here

I have a problem when starting unbound and I am not able to solve it. I didn't find it anywhere on the internet.


unbound.service - Unbound recursive Domain Name Server
Loaded: loaded (/usr/lib/systemd/system/unbound.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-09-10 17:23:24 EDT; 10min ago
Process: 1760 ExecStart=/usr/sbin/unbound -d $UNBOUND_OPTIONS (code=exited, status=1/FAILURE)
Process: 1231 ExecStartPre=/usr/sbin/unbound-anchor -a /var/lib/unbound/root.key -c /etc/unbound/icannbundle.pem -f /etc/resolv.conf -R (code=exited, status=0/SUCCES>
Process: 1220 ExecStartPre=/usr/sbin/unbound-checkconf (code=exited, status=0/SUCCESS)
Main PID: 1760 (code=exited, status=1/FAILURE)

set 10 17:17:16 NS-03 systemd[1]: Started Unbound recursive Domain Name Server.
set 10 17:17:16 NS-03 unbound[1760]: [1760:0] notice: init module 0: subnet
set 10 17:17:16 NS-03 unbound[1760]: [1760:0] notice: init module 1: validator
set 10 17:17:16 NS-03 unbound[1760]: [1760:0] notice: init module 2: iterator
set 10 17:17:17 NS-03 unbound[1760]: [1760:0] info: start of service (unbound 1.7.3).
set 10 17:23:24 NS-03 unbound[1760]: [1760:6] info: generate keytag query _ta-4f66. NULL IN
set 10 17:23:24 NS-03 unbound[1760]: [1760:c] info: generate keytag query _ta-4f66. NULL IN
set 10 17:23:24 NS-03 unbound[1760]: [1760:c] fatal error: could not open autotrust file for writing, /root.key.1760-12: Permission denied
set 10 17:23:24 NS-03 systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
set 10 17:23:24 NS-03 systemd[1]: unbound.service: Failed with result 'exit-code'.


drwxr-xr-x. 2 unbound unbound 30 set 9 08:41 conf.d
-rw-r--r--. 1 unbound unbound 13026 jun 9 09:55 icannbundle.pem
drwxr-xr-x. 2 unbound unbound 29 set 9 08:41 keys.d
drwxr-xr-x. 2 unbound unbound 36 set 9 08:41 local.d
-rw-r--r--. 1 unbound unbound 3314 ago 12 11:48 named.root
-rw-r--r--. 1 unbound unbound 759 set 10 17:00 root.key
-rw-r--r--. 1 unbound unbound 3484 set 10 17:09 unbound.conf
-rw-------. 1 unbound unbound 2455 set 9 09:58 unbound_control.key
-rw-r-----. 1 unbound unbound 1342 set 9 09:58 unbound_control.pem
-rw-------. 1 unbound unbound 2459 set 9 09:58 unbound_server.key
-rw-r-----. 1 unbound unbound 1334 set 9 09:58 unbound_server.pem

I am grateful if you help me. Thanks

User avatar
TrevorH
Forum Moderator
Posts: 29493
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Error starting unbound

Post by TrevorH » 2020/09/10 22:27:48

set 10 17:23:24 NS-03 unbound[1760]: [1760:c] fatal error: could not open autotrust file for writing, /root.key.1760-12: Permission denied
Try restorecon -RFv /var/lib/unbound/root.key
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

cgdo
Posts: 3
Joined: 2020/09/10 21:31:19

Re: Error starting unbound

Post by cgdo » 2020/09/11 12:20:57

Continuous with the same error. I am using the root user.
When I disable this option: auto-trust-anchor-file: "/etc/unbound/root.key"
It works perfectly

User avatar
TrevorH
Forum Moderator
Posts: 29493
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Error starting unbound

Post by TrevorH » 2020/09/11 15:05:38

Run the restorecon on that file as well then
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

cgdo
Posts: 3
Joined: 2020/09/10 21:31:19

Re: Error starting unbound

Post by cgdo » 2020/09/14 14:14:11

It didn't work, it continues with the same error. I reinstalled CentOS 8 and configured unbound again, but it didn't work.

It seems to me that there is no permission to create or edit a file, even placing the chown unbound.unbound /etc/unbound/

unbound[23068:0] error: Could not open logfile /unbound.log: Permission denied
unbound[23068]: [1600091287] unbound[23068:f] info: generate keytag query _ta-4f66. NULL IN
unbound[23068]: [1600091287] unbound[23068:f] fatal error: could not open autotrust file for writing, /root.key.23129-13: Permission denied

Post Reply

Return to “CentOS 8 - General Support”