[jcifs] SmbException by copying a File

Michael B Allen mba2000 at ioplex.com
Mon Aug 29 21:49:52 GMT 2005


On Mon, 29 Aug 2005 21:19:06 +0200
"kku at shd.de" <kku at shd.de> wrote:

> Hi,
> 
> I try to copy a File (Zip-File) from an SMB share on a Windows 2003 
> Server (SP1) to an other 2003 Server.
> Sometimes it works great, but often the transmission crashes with an 
> Exception:
> 
> jcifs.smb.SmbException:
> jcifs.util.transport.TransportException: Transport1 timedout waiting for 
> respons
> e to 
> SmbComReadAndX[command=SMB_COM_READ_ANDX,received=false,errorCode=The opera
> tion completed 
> successfully.,flags=0x0018,flags2=0xC003,signSeq=0,tid=12289,pid=
> 52551,uid=20482,mid=2537,wordCount=12,byteCount=0,andxCommand=0xFF,andxOffset=0, 
> 
> fid=16392,offset=4030464,maxCount=2048,minCount=2048,openTimeout=-1,remaining=0, 
> 
> offset=4030464]
>        at jcifs.util.transport.Transport.sendrecv(Transport.java:74)
>        at jcifs.smb.SmbTransport.send(SmbTransport.java:554)
>        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.SmbFileInputStream.read(SmbFileInputStream.java:152)
> 
> The connection between the 2 Servers is available at all the time and 
> doesn't break.
> Copying the File whit the Windows-Explorer or other tools works whitout 
> problems.
> 
> What can I do?

Try setting jcifs.smb.client.responseTimeout = 300000. This will cause
the client to wait for up to 5 minutes for a response. The default value
is 10 seconds. If you still get the error then there's something else
going wrong and we'll need to start talking about packet captures. If it
"fixes" the problem then you might want to look at your network.

Mike


More information about the jcifs mailing list