This just in from Jay. I think he's probably right that it's 2000 only
-- I had thought I had the problem on NT too, but I can't now remember
the chronology of seeing the problem on a particular machine and
replacing NT with 2000 on the same machine -- it may be that I'd already
upgraded it to 2k when I saw the problem.
-------- Original Message --------
Subject: RE: 'localhost' v '127.0.0.1' in workers.properties
Date: Tue, 19 Jun 2001 16:48:07 -0500
From: "Burgess, Jay" <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
I've got problems sending to the newsgroup, but I thought I'd reply
personally, in case it helps.
Are you definitely having problems with both 2000 and NT, or maybe just
2000? I found a bug with InetAddress.getLocalHost() on WIN2000, and
maybe it's related to the way Tomcat works internally. The code below
shows it best:
try {
localHost = InetAddress.getLocalHost();
//
// Because of a bug on WIN 2000, getLocalHost() may
// return 0.0.0.0, for this machine. Clear localHost
// flag so we can try again below.
//
if (localHost.getHostAddress().equals("0.0.0.0")) {
localHost = null;
}
}
catch (UnknownHostException e) {
}
//
// If we haven't succeeded yet, try the loopback address.
//
if (localHost == null) {
try {
localHost = InetAddress.getByName("127.0.0.1");
}
catch (UnknownHostException e2){
throw (new Exception("Unable to resolve local host name."));
}
}
Jay
-- Jay Burgess
Delano Technology Corporation
mailto:[EMAIL PROTECTED]
(913) 438-9444 x154
-----Original Message-----
From: Andy Armstrong [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 19, 2001 4:39 PM
To: Tomcat Dev
Subject: 'localhost' v '127.0.0.1' in workers.properties
Has anyone else found that NT/2000 can't resolve 'localhost' in a line
like
worker.ajp13.host=localhost
in conf/workers.properties?
I had the problem when I was developing the domino connector and someone
else has just reported the same problem to me. On the machine where I
had the problem
nslookup localhost
was fine, and the problem persisted whether or not there was a localhost
entry in hosts. I haven't tried other hostnames there.
--
Andy Armstrong, Tagish