[jcifs] Transport1 timedout waiting for response to SmbComSessionSetupAndX

Michael B Allen ioplex at gmail.com
Wed Apr 22 14:41:11 GMT 2009


2009/4/22 Vladimir Volodin <vladimir.volodin at crc.net>:
> Hi All,
>
>
>
> We're developing an integrated solution using glassfish esb, alfresco and
> liferay, and we're using samba for file exchange between those components.
>
> Right now we're constantly running into jcifs errors (listed below) mostly
> on exists() calls. Network connectivity is ok, everything's on LAN, no
> packet drops or anything.
>
> Any ideas why this keeps happening?
>
>
>
> jcifs.smb.SmbException: Transport1 timedout waiting for response to
> SmbComSessionSetupAndX[command=SMB_COM_SESSION_SETUP_ANDX,received=false,errorCode=0,flags=0x0018,flags2=0xC803,signSeq=0,tid=0,pid=36098,uid=0,mid=8845,wordCount=13,byteCount=41,andxCommand=0x75,andxOffset=102,snd_buf_size=16644,maxMpxCount=10,VC_NUMBER=1,sessionKey=0,lmHash.length=0,ntHash.length=0,capabilities=4180,accountName=GUEST,primaryDomain=?,NATIVE_OS=Linux,NATIVE_LANMAN=jCIFS]
>
> jcifs.util.transport.TransportException: Transport1 timedout waiting for
> response to
> SmbComSessionSetupAndX[command=SMB_COM_SESSION_SETUP_ANDX,received=false,errorCode=0,flags=0x0018,flags2=0xC803,signSeq=0,tid=0,pid=36098,uid=0,mid=8845,wordCount=13,byteCount=41,andxCommand=0x75,andxOffset=102,snd_buf_size=16644,maxMpxCount=10,VC_NUMBER=1,sessionKey=0,lmHash.length=0,ntHash.length=0,capabilities=4180,accountName=GUEST,primaryDomain=?,NATIVE_OS=Linux,NATIVE_LANMAN=jCIFS]
> at jcifs.util.transport.Transport.sendrecv(Transport.java:76)
>
>         at jcifs.smb.SmbTransport.send(SmbTransport.java:634)
>
>         at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:307)
>
>         at jcifs.smb.SmbSession.send(SmbSession.java:235)
>
>         at jcifs.smb.SmbTree.treeConnect(SmbTree.java:161)
>
>         at jcifs.smb.SmbFile.doConnect(SmbFile.java:857)
>
>         at jcifs.smb.SmbFile.connect(SmbFile.java:900)
>
>         at jcifs.smb.SmbFile.connect0(SmbFile.java:826)
>
>         at jcifs.smb.SmbFile.queryPath(SmbFile.java:1279)
>
>         at jcifs.smb.SmbFile.exists(SmbFile.java:1361)

Hi Vladimir,

Is it possible that you are trying to access the same SmbFile instance
with multiple threads? JCIFS is thread-safe but you cannot
concurrently access the same SmbFile with multiple threads. You must
create separate SmbFile instances for each thread. Note that the
SmbFile instances may refer to the same file - you just cannot access
the same SmbFile object with multiple threads.

Is it possible that the VM is too busy or the VM is running out of memory?

What is the frequency of this error? Does it happen every time or is
it sporadic? If it is sporadic, what how often does it occur? Is there
a pattern to the error?

If you set jcifs.smb.client.responseTimeout = 120000 does it reduce
the frequency of the error?

What are the stack traces other than the exists() call?

I doubt that this is a bug in JCIFS. The JCIFS code has not changed
much in a very long time and is used by quite a few people so if there
were some kind of bug I think we would have seen it already (but
there's a first time for everything). I think it is much more likely
that you are either incorrectly using multiple threads with the same
SmbFile instance or the VM is just slowing down so much that it has
trouble processing the network responses or there's something else
that has basically nothing to do with JCIFS.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/


More information about the jcifs mailing list