[jcifs] "The network name cannot be found" after 30 seconds

Paul Clapham pclapham at core-mark.com
Wed Aug 6 21:36:52 GMT 2008


I will try to make this not too long; I have a largish Windows network which
also contains a few IBM iSeries machines. The Windows network has a DNS
which provides access to everything in the world, and each of the iSeries
has a DNS which provides access to the other iSeries by name. The iSeries
boxes are configured so that the first DNS in its DNS list is itself and the
second DNS is the network DNS.

I have a Java program running on the iSeries which periodically receives
requests to do various things. One of those things is to copy a file from
the local machine to one of the other iSeries machines, and it uses jCIFS to
do that. This works fine as long as the requests are less than 30 seconds
apart. But as soon as a request is processed more than 30 seconds after the
previous request, it gets an SmbException "The network name cannot be
found". And this then happens for all subsequent requests until the program
is restarted in a new JVM.

I've done a fair amount of testing with a small test program and the
30-second number is pretty accurate. 25 seconds is good, 35 seconds is no
good. Also, testing a similar process using FTP to transfer the file doesn't
have this problem, although it does use the same DNS to resolve the iSeries
names. So it looks like there's something in jCIFS that causes the problem.

(The iSeries also has a host table, but it's not in a format that LMHOSTS
can access, so jCIFS can't get at it. Perhaps that's why FTP doesn't have
the problem.)

I have also tried using the system properties -Dnetworkaddress.cache.ttl=0
and -Dsun.net.inetaddr.ttl=0 but they have no effect on this problem. (This
is Java 1.4 and it's an IBM JVM by the way.) Neither does it make any
difference if I set those properties to 120, there's still a 30-second
cutoff.

I'm perfectly willing to believe that there's some configuration problem
with the iSeries DNS, but right now I have no idea where to look. I don't
see any jCIFS properties I can use to try to affect things either.

-- 
View this message in context: http://www.nabble.com/%22The-network-name-cannot-be-found%22-after-30-seconds-tp18859163p18859163.html
Sent from the Samba - jcifs mailing list archive at Nabble.com.



More information about the jcifs mailing list