[jcifs] timeout exceptions

Embry, Clay cembry at vignette.com
Tue Jun 6 22:34:25 GMT 2006


Thanks. I will see if I can get a packet capture when the exception
occurs.

It will be a little more complicated than below since I am using JCIFS
to create and write to files. When the exception occurs I won't know
what state JCIFS has left my filesystem in. So I will have to check for
the existence of the file and possibly delete it. Since either of these
operations could result in additional JCIFS exceptions I will have to
also wrap these in some retry logic.

-----Original Message-----
From: Michael B Allen [mailto:mba2000 at ioplex.com] 
Sent: Tuesday, June 06, 2006 5:03 PM
To: Embry, Clay
Cc: jcifs at lists.samba.org
Subject: Re: [jcifs] timeout exceptions

Well if there's some way to get a capture it would be good to
definitively
determine whether or not the response is actually making it back to the
client. But I suspect it isn't. It's just getting lost or the connection
is getting dropped while a backup is running or there's some wonky
network issue.

Your best option is probably something like:

  for (retry = 0; retry < 3; retry++) {
      try {
          doSomethingWithJCIFS()
          break;
      } catch (TransportException te) {
          log.println( (new Date()) + ": retry=" + retryCount + "," +
te.getMessage());
      }
  }

Mike

On Tue, 6 Jun 2006 12:53:03 -0500
"Embry, Clay" <cembry at vignette.com> wrote:

> I have upped the timeout to 10 minutes and I still get timeout errors.
> 
> jcifs.smb.SmbException: 
> jcifs.util.transport.TransportException: Transport1 timedout waiting
for
> response to
>
SmbComReadAndX[command=SMB_COM_READ_ANDX,received=false,errorCode=0,flag
>
s=0x0018,flags2=0xC003,signSeq=0,tid=30722,pid=30257,uid=55297,mid=3628,
>
wordCount=12,byteCount=0,andxCommand=0xFF,andxOffset=0,fid=5,offset=1607
>
68,maxCount=1024,minCount=1024,openTimeout=-1,remaining=0,offset=160768]
> 	at jcifs.util.transport.Transport.sendrecv(Transport.java:76)
> 	at jcifs.smb.SmbTransport.send(SmbTransport.java:602)
> 	at jcifs.smb.SmbSession.send(SmbSession.java:231)
> 	at jcifs.smb.SmbTree.send(SmbTree.java:102)
> 	at jcifs.smb.SmbFile.send(SmbFile.java:687)
> 	at
> jcifs.smb.SmbFileInputStream.read(SmbFileInputStream.java:152)
> 	at
> jcifs.smb.SmbFileInputStream.read(SmbFileInputStream.java:110)
> 
> 
> -----Original Message-----
> From: Michael B Allen [mailto:mba2000 at ioplex.com] 
> Sent: Monday, June 05, 2006 1:44 PM
> To: Embry, Clay
> Cc: jcifs at lists.samba.org
> Subject: Re: [jcifs] timeout exceptions
> 
> On Mon, 5 Jun 2006 12:30:25 -0500
> "Embry, Clay" <cembry at vignette.com> wrote:
> 
> > Hi. I keep getting the following two errors intermittently. I have
> > jcifs.smb.client.responseTimeout set to 60000 and
> > jcifs.smb.client.soTimeout set to 65000. Does anyone have any advice
> on
> > how to deal with these errors?
> 
> Is this reproduceable *every* time?
> 
> Have you *ever* seen it work?
> 
> What's the server (e.g. W2K3 Server, Acme 5000, ...)?
> 
> First, try setting the timeouts to something huge like 1 hour just to
> verify that changing the time makes any difference at all. If it does
> make a difference then your server's just overloaded and it's probably
> not a big deal to leave the timeouts with big values. If it doesn't
> make a difference then either the server's in a bad way or the
client's
> in a bad way. But let's find out if using huge timeouts actually makes
> a difference.
> 
> Mike
> 
> -- 
> Michael B Allen
> PHP Extension for SSO w/ Windows Group Authorization
> http://www.ioplex.com/
> 


-- 
Michael B Allen
PHP Extension for SSO w/ Windows Group Authorization
http://www.ioplex.com/



More information about the jcifs mailing list