[jcifs] timeout exception

Michael B Allen ioplex at gmail.com
Tue Oct 6 14:34:23 MDT 2009


On Tue, Oct 6, 2009 at 12:03 AM, jiang ding <jiang.d at tier-3.com> wrote:
> Hi,
>
>  I am trying to copy a huge local file, size is 1.4G to a remote windows.
>
> Here is my code:
>
>   smbFile = new SmbFile(remoteSmbUrl);
>
>   BufferedInputStream in  = new BufferedInputStream(localFile);
>
>   BufferedOutputStream out = new
> BufferedOutputStreram(smbFile.getOutputStream());

Hi Jiang,

You do not need to use Buffer{Input,Output}Stream. In fact it will
probably just slow things down. Just use FileInputStream with the
OutputStream of SmbFile directly.

> jcifs.smb.SmbException: Transport1 timedout waiting for response to
> SmbComClose[command=SMB_COM_CLOSE,received=false,errorCode=0,flags=0x0018,flags2=0xC803,signSeq=0,tid=2049,pid=51602,uid=2049,mid=12445,wordCount=3,byteCount=0,fid=16385,lastWriteTime=0]
>
> jcifs.util.transport.TransportException: Transport1 timedout waiting for
> response to

Try setting jcifs.smb.client.responseTimeout = 120000. This is 4 x the
default of 30 seconds. The file server is probably trying to do
something on close that is causing the response to take a long time.
If it still happends after waiting 2 minutes, I don't know what the
problem is.

Mike

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


More information about the jCIFS mailing list