[jcifs] jcifs.util.transport.TransportException: Connection timeout

Keith kmaull at webroot.com
Thu Dec 29 01:07:40 GMT 2005

I'm just getting started with jcifs and am coming up with the following in a
test program.  I'm using jcifs1.2.7.jar.

I can't seem to figure out why it's failing ( thought it succeeds intermittently
), but it fails more than it succeeds, like 10:1.  

Looks like listFiles() is causing problems, and I saw a thread about 1.1.11 on
this, and then another about 1.2.7 solving some apparent issues, but ... I can't
seem to get any love.  It also doesn't seem to matter whether I authenticate or
not - I can get intermittently connections ( or failures, depending on whether
you stand on your head or your feet ) either way.

Any thoughts, ideas or updates would be fantastic!

Code :

try {
   System.setProperty("jcifs.util.loglevel", "0");
   System.setProperty("jcifs.netbios.wins", "");
   System.setProperty("jcifs.netbios.retryTimeout", "20000");
   System.setProperty("jcifs.netbios.soTimeout", "30000");

   SmbFile f = new SmbFile("smb://");
   SmbFile[] files = f.listFiles();
} catch (Exception e) {
  // TODO : log exception

Error :

jcifs.util.transport.TransportException: Connection timeout
	at jcifs.util.transport.Transport.connect(Transport.java:177)
	at jcifs.smb.SmbTransport.connect(SmbTransport.java:286)
	at jcifs.smb.SmbTree.treeConnect(SmbTree.java:129)
	at jcifs.smb.SmbFile.connect(SmbFile.java:792)
	at jcifs.smb.SmbFile.connect0(SmbFile.java:762)
	at jcifs.smb.SmbFile.doNetEnum(SmbFile.java:1603)
	at jcifs.smb.SmbFile.listFiles(SmbFile.java:1573)
	at jcifs.smb.SmbFile.listFiles(SmbFile.java:1483)

More information about the jcifs mailing list