Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-29 Thread Benjamin Marwell
Hi Alan, actually, I do not know, but I suspect it should work OOTB as we are using the javax.naming.ldap.InitialLdapContext [1]. I discussed the new SPI with the shiro team, there is no experience with it yet. An integration test with an ApacheDS server as might reveal if it works as expected. H

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-28 Thread Alan Bateman
On 27/12/2020 10:05, Benjamin Marwell wrote: Is there more than just one? The built-in will provide support for javax.naming.spi.LdapDnsProvider from java 12 onwards. But I was not aware of any custom implementations I could use as a drop-in replacement with Apache Shiro. Do you know if the Ap

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-27 Thread Benjamin Marwell
Is there more than just one? The built-in will provide support for javax.naming.spi.LdapDnsProvider from java 12 onwards. But I was not aware of any custom implementations I could use as a drop-in replacement with Apache Shiro. The Java 8 implementation will just use the socket’s/InetAdress’s DNS

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-26 Thread Florian Weimer
* Benjamin Marwell: > Well, I am stuck with Java 8 and if any LDAP server goes down, all > java applications will, too. Python, .NET, etc. are not affected. Surely that totally depends on the LDAP client implementation in use?

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-22 Thread Benjamin Marwell
> unless there are any objections, I will close 8257080 No objection from me. > Things have moved on a lot since then, for example I see no reason why > the Java HTTP Client, that uses non-blocking NIO socket channels, could > not do it's own multi-connect thing. Well, I am stuck with Java 8 and

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-22 Thread Chris Hegarty
I believe that 8170568 [1] better describes the issue being discussed here. So, unless there are any objections, I will close 8257080 as a duplicate of 8170568. --- There was some renewed interest in this area back in mid 2019, when we touched on it (and several other issues) relating to IPv6 [2]

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-18 Thread Alan Bateman
On 18/12/2020 10:28, Benjamin Marwell wrote: Hi Alan, I am using the LDAP connector from the JDK (javax.naming.directory.*) [1]. As far as I know there is no way to configure this. [1]: https://docs.oracle.com/javase/jndi/tutorial/ldap/security/ldap.html

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-18 Thread Alan Bateman
On 18/12/2020 09:23, Benjamin Marwell wrote: Sounds good to me, but – to be honest – a simpler solution would be enough for now, at least for me. I actually need something which works on Java 8. I also want to share an excerpt from an RFC: RFC 1123 2.3  Applications on Multihomed hosts … Ap

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-18 Thread Benjamin Marwell
; > Gruss > Bernd > -- > http://bernd.eckenfels.net > -- > *Von:* net-dev im Auftrag von Aleks > Efimov > *Gesendet:* Wednesday, December 16, 2020 5:53:02 PM > *An:* Benjamin Marwell > *Cc:* Alan Bateman ; OpenJDK Network Dev list < > net-dev@openjdk.java.net>

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-17 Thread Chris Hegarty
Looping in a prior relevant issue in JIRA: https://bugs.openjdk.java.net/browse/JDK-8170568 - Improve address selection for network clients -Chris. > On 17 Dec 2020, at 13:45, Daniel Fuchs wrote: > > Hi Simone, > > We are investigating introducing a Service Provider interface > which would

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-17 Thread Daniel Fuchs
Hi Simone, We are investigating introducing a Service Provider interface which would allow an application to replace the default built-in implementation that blocks inside the kernel. There is no plan to introduce any public asynchronous API to perform address resolution at this point. With the

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Simone Bordet
Hi, On Wed, Dec 16, 2020 at 5:55 PM Aleks Efimov wrote: > > Hi Benjamin, > > As Alan stated I'm working on adding an SPI [1] which will provide a > possibility to alter how host names and IP addresses are resolved by JDK > platform. > I believe it would be possible to use this mechanism for addre

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Bernd Eckenfels
Von: net-dev im Auftrag von Aleks Efimov Gesendet: Wednesday, December 16, 2020 5:53:02 PM An: Benjamin Marwell Cc: Alan Bateman ; OpenJDK Network Dev list Betreff: Re: [JDK-8257080] Java does not try all DNS results when opening a socket Hi Benjamin, As Alan

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Aleks Efimov
Hi Benjamin, As Alan stated I'm working on adding an SPI [1] which will provide a possibility to alter how host names and IP addresses are resolved by JDK platform. I believe it would be possible to use this mechanism for addressing issue described in JDK-8257080. Best Regards, Aleksei [1]

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Alan Bateman
On 16/12/2020 15:21, Benjamin Marwell wrote: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8192780 Granted, it is an SPI. But it seemed to have been used. Aleksej Efimov is working on an InetAddress SPI, I'm sure there will be a draft JEP at some point. It has the potential to complem

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Benjamin Marwell
On 16.12.20 16:12, Alan Bateman wrote: On 16/12/2020 13:40, Benjamin Marwell wrote: Huh… the APIs have already been changed which is why the issues above exist. There is no workaround anymore. Can you expand on this as it's not clear what you mean by "the APIs have already changed"? The cod

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Alan Bateman
On 16/12/2020 13:40, Benjamin Marwell wrote: Huh… the APIs have already been changed which is why the issues above exist. There is no workaround anymore. Can you expand on this as it's not clear what you mean by "the APIs have already changed"? The code that you referenced are implementation

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Benjamin Marwell
On 16.12.20 13:49, Alan Bateman wrote: On 16/12/2020 09:04, Benjamin Marwell wrote: Hi Alan, > I can't tell if your proposal is focused on the Socket constructors > that take a hostname or more generally changing all APIs that > connect to a SocketAddress to support connecting to an > isUnresol

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Alan Bateman
On 16/12/2020 09:04, Benjamin Marwell wrote: Hi Alan, > I can't tell if your proposal is focused on the Socket constructors > that take a hostname or more generally changing all APIs that > connect to a SocketAddress to support connecting to an > isUnresolved InetSocketAddress Way before we eve

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Alan Bateman
On 16/12/2020 08:09, Benjamin Marwell wrote: Hello everyone, I would like to bring up the enhancement JDK-8257080[1] on this mailing list. tl;dr symptoms: Java will use the first IP address from DNS and will fail to connect when the target host is offline, even when the other IPs would have

[JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Benjamin Marwell
Hello everyone, I would like to bring up the enhancement JDK-8257080[1] on this mailing list. tl;dr symptoms: Java will use the first IP address from DNS and will fail to connect when the target host is offline, even when the other IPs would have worked. This is also true for the more recent Sock