[TriLUG] RH networking mis-configured
Robert Dale
rob at nrek.net
Thu Dec 19 16:17:30 EST 2002
On Thu, 19 Dec 2002, Chris Merrill wrote:
> I have a Java application, which on one particular RH 7.3 machine,
> is having a network problem. The machine seems to be completely
> operational (the network is, anyway) - but my app is throwing an
> UnknownHostException when I call InetAddress().getLocalHost().
Java checks /etc/nsswitch.conf and uses the first method available.
By default on many systems, this file is configured as "hosts: files dns".
"files" is basically /etc/hosts. So, if your IP-host mapping isn't in
that file, it will fail on name resoultion. You can fix it one of two
ways:
a) add you ip-host map to /etc/hosts
b) edit nsswitch.conf to "hosts: dns files"
if you're using DHCP, you'll probably want to do option b.
--
Robert Dale
More information about the TriLUG
mailing list