[jcifs] jcifs.util.transport.TransportException: Connection timeout
Praveen Tammana
praveen.public at gmail.com
Sun Jul 24 22:38:42 GMT 2005
Hi All,
I am testing/evaluating jcifs for my usage. I compiled Get.java and
ListFiles.java example files and I am trying to run them against some
XP machines.
Setup A) :
I ran them on my linux destop on my company network and the smb
servers I tried to reach are 2 regular machines (a desktop and a
laptop) running XP Professional and are also on the same network. I
could run both Get and ListFiles successfully against these XP
machines.
Setup B) :
I ran them on a linux test server on a separate subnet trying to reach
the same XP machines but this time I am getting a timeout error.
------------------------------
/usr/java/j2re1.4.2/bin/java -classpath jcifs-1.2.1.jar:. ListFiles
smb://username:password@172.24.76.67/public/
Exception in thread "main"
jcifs.smb.SmbException:
jcifs.util.transport.TransportException: Connection timeout
at jcifs.util.transport.Transport.connect(Transport.java:164)
at jcifs.smb.SmbTransport.connect(SmbTransport.java:254)
at jcifs.smb.SmbTree.treeConnect(SmbTree.java:122)
at jcifs.smb.SmbFile.connect(SmbFile.java:791)
at jcifs.smb.SmbFile.connect0(SmbFile.java:761)
at jcifs.smb.SmbFile.send(SmbFile.java:660)
at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1679)
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1570)
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1478)
at ListFiles.main(ListFiles.java:14)
at jcifs.smb.SmbTransport.connect(SmbTransport.java:256)
at jcifs.smb.SmbTree.treeConnect(SmbTree.java:122)
at jcifs.smb.SmbFile.connect(SmbFile.java:791)
at jcifs.smb.SmbFile.connect0(SmbFile.java:761)
at jcifs.smb.SmbFile.send(SmbFile.java:660)
at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1679)
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1570)
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1478)
at ListFiles.main(ListFiles.java:14)
------------------------------
Connectivity can't be a problem because:
1) I can execute SmbFile::isFile() and SmbFile::isDirectory() and they
return false and true respectively when called on smb://server/share/
but once I also attach a directory/file name (such as
smb://server/share/dir/ or smb://server/share/file), they timeout.
2) I could successfully list and get files in the same setup (running
on the same linux test server and accesing the same XP machines) using
a similar test program written in C++ using libsmbclient
I am using jcifs-1.2.1.jar downloaded from jcifs.samba.org - I didn't
rebuild it.
I built the class files using jdk1.4.2 and ran it using 1.4.2 jre in
both setups.
Increasing the timeout (jcifs.smb.client.responseTimeout and
jcifs.smb.client.soTimeout) didn't make any difference - they still
timed out.
What could be the problem here? Any help is much appreciated.
Thanks
-Praveen
More information about the jcifs
mailing list