[jcifs] threading

Michael B. Allen miallen at eskimo.com
Sun Feb 23 16:05:53 EST 2003


On Sat, 22 Feb 2003 17:58:59 -0500
Dan Dumont <dan at canofsleep.com> wrote:

> OS: winXP
> JVM: 1.3.1
> 
> -----Original Message-----
> From: Christopher R. Hertel [mailto:crh at ubiqx.mn.org] 
> Sent: Saturday, February 22, 2003 5:51 PM
> To: Dan Dumont
> Cc: jcifs at samba.org
> Subject: Re: [jcifs] threading
> 
> [On List]
> 
> On Sat, Feb 22, 2003 at 04:36:20PM -0500, Dan Dumont wrote:
> :
> > this is the error I get when the thread finally dies:
> > jcifs.smb.SmbException: Connection timed out: connect
> > 	at jcifs.smb.SmbTransport.send(SmbTransport.java:476)
> > 	at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:664)
> > 	at jcifs.smb.SmbTree.treeConnect(SmbTree.java:116)
> > 	at jcifs.smb.SmbFile.connect(SmbFile.java:514)
> > 	at jcifs.smb.SmbFile.connect0(SmbFile.java:484)
> > 	at jcifs.smb.SmbFile.sendTransaction(SmbFile.java:460)
> > 	at jcifs.smb.SmbFile.listFiles(SmbFile.java:1325)
> > 	at jcifs.smb.SmbFile.listFiles(SmbFile.java:1237)
> > 	at T2Crawler.<init>(T2Crawler.java:91)
> > 	at T2Crawler.main(T2Crawler.java:114)

This is standard behavior for a host that does not respond to a SYN
packet. Try another client. Or just try writing a trivial socket program
to test against the errant server. It will always hang the thread for
~1min15sec.

> The connect() function on a Unix box can block if the socket is not set
> to
> non-blocking before the call is made.  It would take some testing (the

You cannot set a socket non-blocking in Java.

Mike

-- 
A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 


More information about the jcifs mailing list