Open fazeem84 opened 3 years ago
Can Anybody look into the issue?
Hi @fazeem84 I believe your hostname has 2 ip addresses (May be a load balancer or IP address is getting changed often(i.e Elastic IP)) your issue is similar to https://github.com/hierynomus/smbj/issues/644 Resolution
feel free to close this issue.
Thanks, R Ramarajan.
hi @rokkakasu
I follow your recommendation, but still failed. Could you provide a snip code.
thanks
I've tried to address this in #835, please see whether that works better
Hi @hierynomus and @pepijnve, I am getting connection time out error randomly when I tried to connect share folder from My Java program. When debugging the code found out that while for mapping host name to IP InetAddress.getAllByName("hostname") is been used and it returns two IP address one of which is not getting connected and the other one works fine is there any way to try to connect the working IP if the other one fails to connect?
java.net.SocketTimeoutException: Connect timed out at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:546) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) at java.base/java.net.Socket.connect(Socket.java:648) at com.hierynomus.protocol.commons.socket.ProxySocketFactory.createSocket(ProxySocketFactory.java:87) at com.hierynomus.protocol.commons.socket.ProxySocketFactory.createSocket(ProxySocketFactory.java:63) at com.hierynomus.smbj.transport.tcp.direct.DirectTcpTransport.connect(DirectTcpTransport.java:88) at com.hierynomus.smbj.connection.Connection.connect(Connection.java:135) at com.hierynomus.smbj.SMBClient.getEstablishedOrConnect(SMBClient.java:108) at com.hierynomus.smbj.SMBClient.connect(SMBClient.java:79)