Re: More and more transport threads in blocking state
Michael B Allen <[email protected]> Wed, 13 May 2015 19:42:03 -0400
| Newsgroups | gmane.network.samba.java |
|---|---|
| Message-ID | <CAGMFw4iMZ3qfaYOeC1DbuH-8p2s6-ftdvgN=AHy1S0nAKmbB8Q@mail.gmail.com> |
On Thu, May 7, 2015 at 11:12 AM, Dev <[email protected]> wrote: > Michael B Allen <ioplex <at> gmail.com> writes: >> Hi Stefan, >> >> I believe the "connection in error" condition will only occur if you >> try to reuse the same transport after it just choked. Then, just in >> case the server suddenly becomes alive at some point, it resets the >> connection state. Thats why you then go back to "connect timed out". I >> never really liked that behavior because it seems clumsey to ping-pong >> between two different errors. But it's not obvious to me that anything >> is logically wrong with this behavior. Think about it. If you try to >> connect to a server and it chokes, why mindlessly try to connect to >> the same server again? You should have some logic in your code that >> catches the exception and just removes all targets on that server from >> the list for the current scan. >> >> So I would say that with some adjustment to your code as described >> above and combined with using responseTimeout > connTimeout, that >> should give you correct results. >> >> If you're still not getting the desired result, please explain what >> you think the correct results should be. >> >> Mike >> > > > > Hi Michael, > > I am getting the below exception when I try to use JCIFS-1.3.17.jar. > Please let me know what is the > resolution. Hi Dev, Easy. Fix the network / other end to accept the connection. > Also can you let me know what are the ports that > JCIFS uses to connect to the destination > server? Is it something if we try to open the ports from source > to destination would help? Like a firewall problem? Certainly. JCIFS uses TCP port 445 [1]. Mike [1] Techincally JCIFS actually fails over to port 139 if 445 is not available. But I don't know of any servers that only listen on 139. Maybe some really old version of Samba. So port 139 can / should just be ignored because if 445 doesn't work, 139 won't either. -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/ > osgi.wiring.package=*) -> [0] > jcifs.smb.SmbException: Failed to connect: 0.0.0.0(00)/10.12.212.41 > jcifs.util.transport.TransportException: Connection timeout > at jcifs.util.transport.Transport.connect(Transport.java:174) > at jcifs.smb.SmbTransport.connect(SmbTransport.java:307) > at jcifs.smb.SmbTree.treeConnect(SmbTree.java:156) > at jcifs.smb.SmbFile.doConnect(SmbFile.java:911) > at jcifs.smb.SmbFile.connect(SmbFile.java:954) > at jcifs.smb.SmbFile.connect0(SmbFile.java:880) > at jcifs.smb.SmbFile.open0(SmbFile.java:972) > at jcifs.smb.SmbFile.open(SmbFile.java:1006) > at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:73) > at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:65) > at