can't bind socket: Permission denied for IPv6

W.C.A. Wijngaards wouter at nlnetlabs.nl
Mon Jul 2 08:52:23 UTC 2018


Hi Nusenu,

On 02/07/18 10:42, nusenu via Unbound-users wrote:
> 
> 
> W.C.A. Wijngaards via Unbound-users:
>> I think it is harmless, but the permission denied shouldn't really be
>> happening?  In the code repository is a patch that prints out the port
>> number as well, perhaps the port number is somehow reserved for a purpose.
>>
>> No need to disable IPv6, but it is interesting to see what is permission
>> denied, as unbound uses randomised port numbers once in a while.
>> Unbound already avoids all IANA registered port numbers as well as <1024
>> port numbers.  Also, those port numbers should not give permission
>> denied, but a different failure (port already in use if it is in use).
>> So, perhaps also something with FreeBSD is going on, perhaps the
>> permissions system.
> 
> Thank you for the patch, I'm now running unbound with that diagnostics patch applied, lets see 
> what information we get.
> 
> I also have to mention that the error frequency decreases significantly after
> applying the last patch (services/outside_network.c):
> 
> before: 1-3 error per day
> after applying the patch: 1 error in 4 days

That is interesting to hear.

> 
> Will this be included in future unbound releases?

Yes, sure.  I'll keep it in.  Perhaps something similar is happening and
is what I need to do to fix it, somehow.  That would be a failure where
the socket structure is reused with the addr and port reset, and somehow
the reused socket structure is not the same as a fresh malloced structure.

Best regards, Wouter


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20180702/d72205f0/attachment.bin>


More information about the Unbound-users mailing list