Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnixResolverDnsServerAddressStreamProvider : unresolved DNS server address #9684

Closed
shivabhalla opened this issue Oct 17, 2019 · 14 comments · Fixed by #9697
Closed

UnixResolverDnsServerAddressStreamProvider : unresolved DNS server address #9684

shivabhalla opened this issue Oct 17, 2019 · 14 comments · Fixed by #9697
Milestone

Comments

@shivabhalla
Copy link

Getting Following exception when UnixResolverDnsServerAddressStreamProvider is trying to read from /etc/resolver.conf

java.lang.ExceptionInInitializerError: null at io.netty.resolver.dns.UnixResolverDnsServerAddressStreamProvider.parseSilently(UnixResolverDnsServerAddressStreamProvider.java:72) ~[AdExchange%23%23redisson-upgrade_9557.jar:?] at io.netty.resolver.dns.DnsServerAddressStreamProviders.<clinit>(DnsServerAddressStreamProviders.java:28) ~[AdExchange%23%23redisson-upgrade_9557.jar:?] at org.redisson.connection.MasterSlaveConnectionManager.<init>(MasterSlaveConnectionManager.java:195) ~[AdExchange%23%23redisson-upgrade_9557.jar:?] at org.redisson.connection.MasterSlaveConnectionManager.<init>(MasterSlaveConnectionManager.java:169) ~[AdExchange%23%23redisson-upgrade_9557.jar:?]

Caused by: java.lang.IllegalArgumentException: cannot use an unresolved DNS server address: nil:53 at io.netty.resolver.dns.DnsServerAddresses.sanitize(DnsServerAddresses.java:204) ~[AdExchange%23%23redisson-upgrade_9557.jar:?] at io.netty.resolver.dns.DnsServerAddresses.sequential(DnsServerAddresses.java:77) ~[AdExchange%23%23redisson-upgrade_9557.jar:?] at io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.<clinit>(DefaultDnsServerAddressStreamProvider.java:146) ~[AdExchange%23%23redisson-upgrade_9557.jar:?]

/etc/resolver.conf file contains following data ->

nameserver {A Valid IP}

nameserver {A Valid IP}

nameserver nil

Issue is resolved if we remove "nameserver nil" from file.

@normanmaurer
Copy link
Member

@shivabhalla hmm.. why you have nameserver nil in there ? This sounds like an invalid entry.

@shivabhalla
Copy link
Author

This is being created by some job, but I wasn't facing this issue with earlier versions of netty. Currently I shifted to 4.1.17 where I started facing this.

@normanmaurer
Copy link
Member

@shivabhalla sure because we did not read this file in earlier releases (which was a bug). That said I wonder if we should just skip "corrupt" entries.

@normanmaurer
Copy link
Member

@slandelle what are your thoughts on this ?

@slandelle
Copy link
Contributor

Agree, we should skip invalid entries.

normanmaurer added a commit that referenced this issue Oct 21, 2019
Motivation:

We should just ignore (and so skip) invalid entries in /etc/resolver.conf.

Modifications:

- Skip invalid entries
- Add unit test

Result:

Fix #9684

After your change, what will change.
@normanmaurer
Copy link
Member

@slandelle @shivabhalla PTAL #9697

@normanmaurer normanmaurer added this to the 4.1.43.Final milestone Oct 21, 2019
@shivabhalla
Copy link
Author

Thanks @normanmaurer 😊

normanmaurer added a commit that referenced this issue Oct 21, 2019
Motivation:

We should just ignore (and so skip) invalid entries in /etc/resolver.conf.

Modifications:

- Skip invalid entries
- Add unit test

Result:

Fix #9684

After your change, what will change.
normanmaurer added a commit that referenced this issue Oct 22, 2019
Motivation:

We should just ignore (and so skip) invalid entries in /etc/resolver.conf.

Modifications:

- Skip invalid entries
- Add unit test

Result:

Fix #9684
normanmaurer added a commit that referenced this issue Oct 22, 2019
Motivation:

We should just ignore (and so skip) invalid entries in /etc/resolver.conf.

Modifications:

- Skip invalid entries
- Add unit test

Result:

Fix #9684
@fax4ever
Copy link

fax4ever commented Sep 9, 2023

I have the same issue with the following /etc/resolv.conf (I have in my VM):

# Generated by NetworkManager
search localdomain
nameserver 10.211.55.1
nameserver fe80::21c:42ff:fe00:18%enp0s5

It works commenting the IPv6 line. Is it normal?

@normanmaurer
Copy link
Member

@fax4ever no... can you please open a issue ?

@normanmaurer
Copy link
Member

@fax4ever I suspect the problem is that enp0s5 does not exist on the host as interface, correct ?

@fax4ever
Copy link

host as interface

[fabio@localhost infinispan]$ ip addr 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:1c:42:32:14:87 brd ff:ff:ff:ff:ff:ff
    inet 10.211.55.25/24 brd 10.211.55.255 scope global dynamic noprefixroute enp0s5
       valid_lft 1480sec preferred_lft 1480sec
    inet6 fdb2:2c26:f4e4:0:21c:42ff:fe32:1487/64 scope global dynamic noprefixroute 
       valid_lft 2591703sec preferred_lft 604503sec
    inet6 fe80::21c:42ff:fe32:1487/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:ec:2a:d3:64 brd ff:ff:ff:ff:ff:ff

@normanmaurer
Copy link
Member

So what exactly happens on your system ? Throws an exception when the entry is present or what ?

@fax4ever
Copy link

I opened #13612

@normanmaurer
Copy link
Member

I opened #13612

Thanks... let's continue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants