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">&lt;<a href=3D"mailto:ioplex@g=
mail.com" target=3D"_blank">[email protected]</a>&gt;</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 &lt;<a href=
=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<br>
&gt; Michael B Allen &lt;ioplex &lt;at&gt; <a href=3D"http://gmail.com" tar=
get=3D"_blank">gmail.com</a>&gt; writes:<br>
&gt;&gt; Hi Stefan,<br>
&gt;&gt;<br>
&gt;&gt; I believe the &quot;connection in error&quot; condition will only =
occur if you<br>
&gt;&gt; try to reuse the same transport after it just choked. Then, just i=
n<br>
&gt;&gt; case the server suddenly becomes alive at some point, it resets th=
e<br>
&gt;&gt; connection state. Thats why you then go back to &quot;connect time=
d out&quot;. I<br>
&gt;&gt; never really liked that behavior because it seems clumsey to ping-=
pong<br>
&gt;&gt; between two different errors. But it&#39;s not obvious to me that =
anything<br>
&gt;&gt; is logically wrong with this behavior. Think about it. If you try =
to<br>
&gt;&gt; connect to a server and it chokes, why mindlessly try to connect t=
o<br>
&gt;&gt; the same server again? You should have some logic in your code tha=
t<br>
&gt;&gt; catches the exception and just removes all targets on that server =
from<br>
&gt;&gt; the list for the current scan.<br>
&gt;&gt;<br>
&gt;&gt; So I would say that with some adjustment to your code as described=
<br>
&gt;&gt; above and combined with using responseTimeout &gt; connTimeout, th=
at<br>
&gt;&gt; should give you correct results.<br>
&gt;&gt;<br>
&gt;&gt; If you&#39;re still not getting the desired result, please explain=
 what<br>
&gt;&gt; you think the correct results should be.<br>
&gt;&gt;<br>
&gt;&gt; Mike<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Hi Michael,<br>
&gt;<br>
&gt; I am getting the below exception when I try to use JCIFS-1.3.17.jar.<b=
r>
&gt;=C2=A0 Please let me know what is the<br>
&gt; resolution.<br>
<br>
Hi Dev,<br>
<br>
Easy. Fix the network / other end to accept the connection.<br>
<br>
&gt; Also can you let me know what are the ports that<br>
&gt;=C2=A0 JCIFS uses to connect to the destination<br>
&gt; server? Is it something if we try to open the ports from source<br>
&gt;=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&#39;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&#39;t work, 139 won&#39;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>
&gt; osgi.wiring.package=3D*) -&gt; [0]<br>
&gt; 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>
&gt; jcifs.util.transport.TransportException: Connection timeout<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.util.transport.Transport.con=
nect(Transport.java:174)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbTransport.connect(Smb=
Transport.java:307)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbTree.treeConnect(SmbT=
ree.java:156)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFile.doConnect(SmbFil=
e.java:911)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFile.connect(SmbFile.=
java:954)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFile.connect0(SmbFile=
.java:880)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFile.open0(SmbFile.ja=
va:972)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFile.open(SmbFile.jav=
a:1006)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFileInputStream.&lt;i=
nit&gt;(SmbFileInputStream.java:73)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at jcifs.smb.SmbFileInputStream.&lt;i=
nit&gt;(SmbFileInputStream.java:65)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at<br>
</blockquote></div><br></div>

--001a11c3f026dd51ea051610bf97--