Stanislav, I don't think we should fix it on JDK level.
Workaround is obvious and actually recommended for production - install one of cashing nameservers and lock resolv.conf to localhost. -Dmitry On 2015-05-04 18:38, Stanislav Baiduzhyi wrote: > Hi All, > > We are facing an issue with DNS server caching on RHEL-based distros: after > the update of resolv.conf java application cannot resolve the hosts any more. > > Reproducer is very simple: > 1. Clean /etc/resolv.conf or connect to vpn and use vpn-only nameserver. > 2. Launch the minimal java app [1]. > 3. Restore the /etc/resolv.conf or disconnect from vpn (/etc/resolv.conf > should be updated with accessible nameserver at this moment). > 4. Notice that name resolution continues to fail. > > I've prepared a small webrev that fixes the issue [2], but would like to hear > some ideas/criticism first. If the patch looks ok to everyone, please create > an issue for this, and I will submit it for approval/sponsorship. > > [1]: > https://e61b615da46327c9050d624b0a3783ba21c6b125.googledrive.com/host/0B5Kp-cB1sXJrfnZ4NHZ0S1V3UTJZcDFra3RwUFZjQXY5WVZzUkwtTTd0Z1IyR1JmbDZPSVk/resolvconf-reinit/ResolvingHost.java > > [2]: > https://e61b615da46327c9050d624b0a3783ba21c6b125.googledrive.com/host/0B5Kp-cB1sXJrfnZ4NHZ0S1V3UTJZcDFra3RwUFZjQXY5WVZzUkwtTTd0Z1IyR1JmbDZPSVk/resolvconf-reinit/ > -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * I would love to change the world, but they won't give me the sources.