Customer is using Solaris 10 zones and WebLogic. They use java.net.InetAddress to get all the IP addresses of a server.
For the global zone, they observe InetAddress.getLocalHost() gets the actual IP address of the server. This is passed to WebLogic where it adds the loopback address to the list of IP addresses.
For local zones, they observe InetAddress.getLocalHost() gets the loopback address. This is passed to WebLogic, where it skips adding the loopback address. They report the server never gets the actual IP address of the server.
This looks similar to bug 4435662. But that bug was for RedHat, and not for local zones in Solaris 10. The customer does not want to use the workarounds in this bug, editing /etc/hosts or alternatively updating /etc/nsswitch.conf to query DNS beforing querying /etc/hosts.
Customer questions why does a local zone get created by default with just the loopback
interface in this file? They don't want to make a change to the /etc/hosts file if this is going to cause additional issues. They don't want to change their /etc/nsswitch.conf file for performance reasons. Thats an established default to have files searched first on all of their solaris servers.
Here are the results of 'ifconfig -a' and the /etc/hosts for the global zone and the local zone.
TUSSIN (global zone)
tussin:/#
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232
index 1
inet 127.0.0.1 netmask ff000000
lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
8232 index 1
zone tussinz2
inet 127.0.0.1 netmask ff000000
lo0:2: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
8232 index 1
zone tussinz3
inet 127.0.0.1 netmask ff000000
lo0:3: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
8232 index 1
zone tussinz1
inet 127.0.0.1 netmask ff000000
lo0:4: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
8232 index 1
zone tussinz4
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.12.10.129 netmask ffffe000 broadcast 10.12.31.255
ether 0:3:ba:78:3b:6b
ce0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
zone tussinz2
inet 10.12.11.14 netmask ffffe000 broadcast 10.12.31.255
ce0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
zone tussinz3
inet 10.12.11.76 netmask ffffe000 broadcast 10.12.31.255
ce0:3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
zone tussinz1
inet 10.12.10.43 netmask ffffe000 broadcast 10.12.31.255
ce0:4: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
zone tussinz4
inet 10.12.11.82 netmask ffffe000 broadcast 10.12.31.255
# cat /etc/hosts
127.0.0.1 localhost
10.12.10.129 tussin tussin.oz.convergys.com loghost
TUSSINZ1
tussinz1:/#
# ifconfig -a
lo0:3: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
8232 index 1
inet 127.0.0.1 netmask ff000000
ce0:3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.12.10.43 netmask ffffe000 broadcast 10.12.31.255
tussinz1:/#
# cat /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost loghost tussinz1