[Solved] Unbound service problem: service doesn't start

Hi there,

An old thread but I’m trying my luck since I’m facing the exact same problem. I’ve tried the steps proposed @Carlos_Estrada but with no luck. Unbound will still not start.

Excerpt from systemctl status unbound:

systemd[1]: Started Unbound recursive Domain Name Server.
unbound[6913]: Oct 24 23:25:39 unbound[6913:0] error: can't bind socket: Cannot assign request...or ::1
unbound[6913]: Oct 24 23:25:39 unbound[6913:0] error: cannot open control interface ::1 8953
unbound[6913]: Oct 24 23:25:39 unbound[6913:0] fatal error: could not open ports
systemd[1]: unbound.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Unit unbound.service entered failed state.
systemd[1]: unbound.service failed.

Any sugestion as to what might be causing this problem?

Thanks in advance!

Does your network make use of IPv6?
Was IPv6 disabled on the server?

Hi there,
Tanks for looking in to this matter.
No, there is no IPv6 enabled, unless this is activated by default in Nethserver.
/Mathias

Hi Mathias.
IPv6 is not disabled by default on NethServer. You can find this out with:

ip a | grep inet6                # IPv6 enabled if returns any IPv6 address
sysctl -a | grep disable_ipv6    # IPv6 disabled if settings equals 1

Unbound doesnt start, IPv6 deaktivieren and unbound flooding syslog with ‘sendto failed: Cannot assign requested address’ links suggest the error could be due to IPv6 being disabled, and provide a solution by specifying interface: 127.0.0.1 in unbound config, but this setting is already applied by nethserver.

unbound[6913]: Oct 24 23:25:39 unbound[6913:0] error: cannot open control interface ::1 8953

Same is suggested for control-interface option when unbound remote control is enabled (enabled by default by upstream Unbound package and by NethServer but control-interface not explicitly specified).

If IPv6 was disabled (and must remain that way) by any particular reason, do-ip6: no unbound option could be of use.

/var/log/messages and jounalctl -u unbound might provide more clues about why the service does not start.

When trying any of the unbound options remember the conf file is templated.

3 Likes

Hi @dnutan

You were completely right! ipv6 was switched off. I must have done this while playing around with my system and then forgot about it.

Thanx! :smiley:

Case closed!

Regards
/Mathias

I split off this later discussion because the root cause is different. And I think @dnutan deserves another accepted fix… :wink:
@bragrabb, can you please mark the post of @dnutan as solution?

1 Like

@robb, done! Thanks for bringing this to my attention.

Perhaps I should add that the problem was caused by me adding below configuration to /etc/sysctl.conf:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

After commenting them out and executing sysctl -p I was back on track.

@dnutan, I tip my hat. :slight_smile:

2 Likes

Sorry for resurrecting this old thread but I had the unbound service issue with an IPv6 disabled VPS.

I solved it by creating /etc/unbound/local.d/disableipv6.conf with following content and restarted unbound.

Could you check

And also if you have something in /etc/sysctl.conf and ‘/etc/sysctl.d/’ that could stop ipv6. Verify if the file does not come from a rpm

Check some messages later in the first link

It’s already working with disabled ipv6. unbound starts without error.

Or do you think ipv6 must be enabled?

When you disable ipv6 unbound stops to work because the service expects to give dns over ipv6.

If you stop ipv6 completely then you must add your fix to allow unbound for starting

1 Like

Thanks for clarification.
I’m ok with disabled ipv6 and the fix.

1 Like