Re: More and more transport threads in blocking state
Venkatesh D <[email protected]> Thu, 14 May 2015 15:41:17 -0500
| Newsgroups | gmane.network.samba.java |
|---|---|
| Message-ID | <CAGVkMtbD-wmTJwk-p4jcErQU8iT+gPkXdkdr=+zQ9N5-WgcSSg@mail.gmail.com> |
--001a11c3f026dd51ea051610bf97 Content-Type: text/plain; charset=UTF-8 Thank you very much Mike! Its a firewall issue. On Wed, May 13, 2015 at 6:42 PM, Michael B Allen <[email protected]> wrote: > 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 > --001a11c3f026dd51ea051610bf97 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Thank you very much Mike! Its a firewall issue.</div><div = class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Wed, May 13, 2015 a= t 6:42 PM, Michael B Allen <span dir=3D"ltr"><<a href=3D"mailto:ioplex@g= mail.com" target=3D"_blank">[email protected]</a>></span> wrote:<br><bloc= kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc= c solid;padding-left:1ex">On Thu, May 7, 2015 at 11:12 AM, Dev <<a href= =3D"mailto:[email protected]">[email protected]</a>> wrote:<br> > Michael B Allen <ioplex <at> <a href=3D"http://gmail.com" tar= get=3D"_blank">gmail.com</a>> writes:<br> >> Hi Stefan,<br> >><br> >> I believe the "connection in error" condition will only = occur if you<br> >> try to reuse the same transport after it just choked. Then, just i= n<br> >> case the server suddenly becomes alive at some point, it resets th= e<br> >> connection state. Thats why you then go back to "connect time= d out". I<br> >> never really liked that behavior because it seems clumsey to ping-= pong<br> >> between two different errors. But it's not obvious to me that = anything<br> >> is logically wrong with this behavior. Think about it. If you try = to<br> >> connect to a server and it chokes, why mindlessly try to connect t= o<br> >> the same server again? You should have some logic in your code tha= t<br> >> catches the exception and just removes all targets on that server = from<br> >> the list for the current scan.<br> >><br> >> So I would say that with some adjustment to your code as described= <br> >> above and combined with using responseTimeout > connTimeout, th= at<br> >> should give you correct results.<br> >><br> >> If you're still not getting the desired result, please explain= what<br> >> you think the correct results should be.<br> >><br> >> Mike<br> >><br> ><br> ><br> ><br> > Hi Michael,<br> ><br> > I am getting the below exception when I try to use JCIFS-1.3.17.jar.<b= r> >=C2=A0 Please let me know what is the<br> > resolution.<br> <br> Hi Dev,<br> <br> Easy. Fix the network / other end to accept the connection.<br> <br> > Also can you let me know what are the ports that<br> >=C2=A0 JCIFS uses to connect to the destination<br> > server? Is it something if we try to open the ports from source<br> >=C2=A0 to destination would help?<br> <br> Like a firewall problem? Certainly.<br> <br> JCIFS uses TCP port 445 [1].<br> <br> Mike<br> <br> [1] Techincally JCIFS actually fails over to port 139 if 445 is not<br> available. But I don't know of any servers that only listen on 139.<br> Maybe some really old version of Samba. So port 139 can / should just<br> be ignored because if 445 doesn't work, 139 won't either.<br> <br> --<br> Michael B Allen<br> Java Active Directory Integration<br> <a href=3D"http://www.ioplex.com/" target=3D"_blank">http://www.ioplex.com/= </a><br> <br> > osgi.wiring.package=3D*) -> [0]<br> > jcifs.smb.SmbException: Failed to connect: 0.0.0.0(00)/<a href=3D"http= ://10.12.212.41" target=3D"_blank">10.12.212.41</a><br> > jcifs.util.transport.TransportException: Connection timeout<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.util.transport.Transport.con= nect(Transport.java:174)<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbTransport.connect(Smb= Transport.java:307)<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbTree.treeConnect(SmbT= ree.java:156)<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFile.doConnect(SmbFil= e.java:911)<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFile.connect(SmbFile.= java:954)<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFile.connect0(SmbFile= .java:880)<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFile.open0(SmbFile.ja= va:972)<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFile.open(SmbFile.jav= a:1006)<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFileInputStream.<i= nit>(SmbFileInputStream.java:73)<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFileInputStream.<i= nit>(SmbFileInputStream.java:65)<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at<br> </blockquote></div><br></div> --001a11c3f026dd51ea051610bf97--