jcifs.util.transport.TransportException: Connection timeout

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

jcifs.util.transport.TransportException: Connection timeout

Keith-16
Hi-
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", "10.10.10.10");
   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.smb.SmbException:
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)

Reply | Threaded
Open this post in threaded view
|

Re: jcifs.util.transport.TransportException: Connection timeout

Michael B Allen-4
On Thu, 29 Dec 2005 01:07:40 +0000 (UTC)
Keith <[hidden email]> wrote:

> jcifs.smb.SmbException:
> jcifs.util.transport.TransportException: Connection timeout
> at jcifs.util.transport.Transport.connect(Transport.java:177)
> at jcifs.smb.SmbTransport.connect(SmbTransport.java:286)

Connection timeout most likely means that the target host did not respond
to the initial SYN message. Take a packet capture [1] and check to see
if the target is responding to the initil SYN packet. If it did not,
there is a problem with the network. If it did, there is a problem with
jCIFS in which case you are welcome to report back here.

Mike

[1] http://jcifs.samba.org/capture.html

PS: I believe loglevel = 0 means not to log anything. Try a loglevel
of 10.