It is definetly using /usr/local/java, so I'm positive its 1.4.1. Setting the 'networkaddress.cache.negative.ttl' to 0 seems to have helped. I just watched James get the unknownhostexception from one MX server, then try a different server 10 minutes later, fail a couple more times, and then finally succeed in sending the message. For what its worth, 'networkaddress.cache.negative.ttl' is set to 10 by default in 1.4.1, so some negative caching of dns entries always does occur.

Is it James or JavaMail that chooses between multiple MX records if they exist? I'm thinking if one server was down, maybe its not even trying the other servers because it caches the fact that the original name did not work. So as long as one server is down and its caching negative lookups, even for 10 seconds, it isn't able to connect to a good server because it doesn't try the next one. Just a thought.

Thanks for the help debugging.

-J

Noel J. Bergman wrote:

Jay,

When you run phoenix.sh, it will echo JAVA_HOME, e.g.,

Using JAVA_HOME: /usr/local/java

so you'll know definitely under which one Phoenix thinks it is running.

Let me know how it goes.

--- Noel

-----Original Message-----
From: Jay Kraly [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 17, 2003 16:21
To: James Users List
Subject: Re: Random DNS and/or network issues


I also found some other people with similar problems on the java.sun.com forum, I'm going to try the negative.ttl fix to see if it makes any difference. Unless I'm insane I'm using 1.4.1:

[EMAIL PROTECTED] local]# $JAVA_HOME/bin/java -version
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)

I do have 1.3.1 installed on the same machine, but I've set JAVA_HOME to
the 1.4.1_02 version.

Thanks for the info.

-J

Noel J. Bergman wrote:



Maybe the 1.4.1 JVM has an issue recovering once it thinks a host is down.




I don't mean to be cute, but are you sure that you are running on JVM 1.4.1
on that system?  The defect you are describing is in the release notes for
JVM 1.4.1: "Prior to J2SE 1.4 if InetAddress.getByName if a lookup to the
name service failed then all subsequent lookups of that hostname would fail
for the lifetime of the virtual machine."

More details at http://java.sun.com/j2se/1.4.1/networking-relnotes.html.
See also the javadocs:
http://java.sun.com/j2se/1.4.1/docs/api/java/net/InetAddress.html (section
on InetAddress Caching) and
http://java.sun.com/j2se/1.4/jcp/j2se-1_4-mr_docs-spec/net.html (the bottom
of the page).  You could also try 1.4.2, although I don't see anything in
the release notes
(http://java.sun.com/j2se/1.4.2/docs/guide/net/relnotes.html) that suggests
a later fix.

You could try setting networkaddress.cache.negative.ttl to 0, and see if
that helps in your situation.

--- Noel




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







Reply via email to