commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Johnson <apa...@spatula.net>
Subject commons-daemon and InetAddress DNS caching
Date Sun, 28 Oct 2007 20:35:32 GMT
Does commons-daemon/jsvc do anything special or different for hostname 
resolution than running a plain JVM would?  Or to ask the question another 
way, is it possible that parameters configured in java.security would be 
ignored because the JVM was started from jsvc instead of java?

I ask because when running Tomcat from jsvc, no matter what I try to do to 
stop negative caching (configuring java.security or using the deprecated 
Sun-specific properties), hostnames are getting positive and 
negative cached forever.  I can verify that the JVM does not attempt a 
second lookup by watching traffic on port 53 with tcpdump.

If I write a small test program to perform a lookup for a host for which 
I've firewalled its DNS server, then wait for me to remove the entry for 
the firewall, then perform the lookup again, this works as-expected... the 
address is not cached forever.

But in my code to validate URLs submitted by users, once a hostname has 
failed once, it always fails, with no further attempts at lookups.  
Restarting Tomcat/jsvc will always clear the problem. (Because by then the 
host has finally resolvedand will be present in the nameserver's cache.)

   Nick

-- 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message