JCIFS timeouts on windows

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JCIFS timeouts on windows

Justin Greene-2
We have been using JCIFS for some time to communicate between our Java apps
(running on windows) and Windows fileserver.  We constantly receive timeouts
reading data  from the network in the form:

Caused by: jcifs.smb.SmbException:
jcifs.util.transport.TransportException: Transport1[DATA01-
NYC<20>/192.168.0.66:445] timedout waiting for response to
Trans2QueryPathInformation
[command=SMB_COM_TRANSACTION2,received=false,errorCode=The operation completed
successfully.,flags=0x0018,flags2=0xC003,signSeq=0,tid=4096,pid=40125,uid=4097,m
id=651,wordCount=15,byteCount=137,totalParameterCount=136,totalDataCount=0,maxPa
rameterCount=2,maxDataCount=40,maxSetupCount=0,flags=0x00,timeout=0,parameterCou
nt=136,parameterOffset=66,parameterDisplacement=0,dataCount=0,dataOffset=202,dat
aDisplacement=0,setupCount=1,pad=1,pad1=0,informationLevel=0x101,filename=\xxxx\
mail\2006\03\07\19\20060307193527000.eml]
        at jcifs.smb.SmbTransport.send(SmbTransport.java:533)
        at jcifs.smb.SmbSession.send(SmbSession.java:228)
        at jcifs.smb.SmbTree.send(SmbTree.java:102)
        at jcifs.smb.SmbFile.send(SmbFile.java:688)
        at jcifs.smb.SmbFile.queryPath(SmbFile.java:1196)
        at jcifs.smb.SmbFile.exists(SmbFile.java:1250)
        at jcifs.smb.SmbFile.isDirectory(SmbFile.java:1323)

This timeout even occurs connecting to shares on the local machine, so it is
not the network.  I have increased the timeout to 60 seconds (-
Djcifs.smb.client.responseTimeout=60000) and it still occurs.  Any advice on
how to troubleshoot this would be greatly appreciated as it is really becoming
a thorn.  There is some reference in the docs to increasing the jcifs log level
but I cannot seem to figure out to where it logs.  Any help would be
appreciated.

TIA,
Justin

Reply | Threaded
Open this post in threaded view
|

Re: JCIFS timeouts on windows

Michael B Allen-4
On Thu, 9 Mar 2006 22:02:18 +0000 (UTC)
Justin Greene <[hidden email]> wrote:

> We have been using JCIFS for some time to communicate between our Java apps
> (running on windows) and Windows fileserver.  We constantly receive timeouts
> reading data  from the network in the form:
>
> Caused by: jcifs.smb.SmbException:
> jcifs.util.transport.TransportException: Transport1[DATA01-
> NYC<20>/192.168.0.66:445] timedout waiting for response to
> Trans2QueryPathInformation
> [command=SMB_COM_TRANSACTION2,received=false,errorCode=The operation completed
> successfully.,flags=0x0018,flags2=0xC003,signSeq=0,tid=4096,pid=40125,uid=4097,m
> id=651,wordCount=15,byteCount=137,totalParameterCount=136,totalDataCount=0,maxPa
> rameterCount=2,maxDataCount=40,maxSetupCount=0,flags=0x00,timeout=0,parameterCou
> nt=136,parameterOffset=66,parameterDisplacement=0,dataCount=0,dataOffset=202,dat
> aDisplacement=0,setupCount=1,pad=1,pad1=0,informationLevel=0x101,filename=\xxxx\
> mail\2006\03\07\19\20060307193527000.eml]
> at jcifs.smb.SmbTransport.send(SmbTransport.java:533)
> at jcifs.smb.SmbSession.send(SmbSession.java:228)
> at jcifs.smb.SmbTree.send(SmbTree.java:102)
> at jcifs.smb.SmbFile.send(SmbFile.java:688)
> at jcifs.smb.SmbFile.queryPath(SmbFile.java:1196)
> at jcifs.smb.SmbFile.exists(SmbFile.java:1250)
> at jcifs.smb.SmbFile.isDirectory(SmbFile.java:1323)
>
> This timeout even occurs connecting to shares on the local machine, so it is
> not the network.  I have increased the timeout to 60 seconds (-
> Djcifs.smb.client.responseTimeout=60000) and it still occurs.  Any advice on
> how to troubleshoot this would be greatly appreciated as it is really becoming
> a thorn.  There is some reference in the docs to increasing the jcifs log level
> but I cannot seem to figure out to where it logs.  Any help would be
> appreciated.

How frequently does it happen?

Did it just start happening or has the problem occured since you started
using jCIFS?

Once it happends, does it occur for all subsequent requests to that
server or is it just that one request that chokes?

You're going to have to present more information. You didn't even tell
us what version you're using.

Try upgrading to the latest version.

Try setting the timeout to something really huge just to make SURE it's
not making progress. Also, I think when you increase responseTimeout,
you need to increase soTimeout as well.

Logging is to System.err by default. I think you can do something
like jcifs.util.LogStream.setInstance( new jcifs.util.LogStream( new
FileOutputStream( "c:\temp\jcifs.log" ))) but it must be called before
any jCIFS classes are loaded (ie. in main).

Another good thing to do would be to get a packet capture of the traffic
[1] and check to make sure the response is really not being received. If
the response is being received then it's a bug in the version of jcifs
you're using. If the response is not being received then ...

That should keep you busy for a while :->

Mike

[1] http://jcifs.samba.org/capture.html