The ipV6 configuration in etc/hosts can cause javax.naming.ServiceUnavailableException: A communication failure occurred on a loopback connection if the IP address in the InitialContext is not supported by the etc/hosts configuration.
 Technote (troubleshooting)
 
Problem(Abstract)
The loopback settings in the etc/hosts configuration of a Unix® system can adversely affect the attempt to get the initial context for a naming lookup.

The exception that is logged when this is the case is
javax.naming.ServiceUnavailableException: A communication failure occurred while attempting to obtain an initial context with the provider URL: "corbaloc:iiop:9.37.23.2:2809".

Make sure that any bootstrap address information in the URL is correct and that the target name server is running. A bootstrap address with no port specification defaults to port 2809.

Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration.

Root exception is
org.omg.CORBA.TRANSIENT: java.net.SocketException: Invalid argument
or cannot assign requested address:host=9.37.23.2,port=2809
vmcid: IBM minor code: E02 completed: No
at com.ibm.CORBA.transport.TransportConnectionBase.connect
(TransportConnectionBase.java:458)
 
Cause
The keys to determine if this is the cause of the problem are these:

1. The IP address is for the local host.

2. The bootstrap address is correct.

3. The IBM® WebSphere® Application Server is up and running.

4. The error, org.omg.CORBA.TRANSIENT: java.net.SocketException: Invalid argument or cannot assign requested address:host=9.37.23.2,port=2809, occurs when attempting to get the initial context.

If all of these are true, then check the loopback configuration in the etc/hosts file. If it is not set correctly, then this error results. In the exception that is used as an example here, the loopback configuration was only set correctly for ipV6 format and the localhost's IP address was specified in ipV4 format.

 
Resolving the problem
Fix the loopback configuration in etc/hosts to allow for the IP format used in the IIOP of the URL used to initialize the context.

Here is an example of a misconfigured etc/hosts file

#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 posClient1


# special IPv6 addresses
::1 posClient1 ipv6- ipv6-posClient1

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts

There are two possible ways to resolve this.

1. Use the default etc/hosts

#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost


# special IPv6 addresses
::1 ipv6- ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts

9.168.23.31 posClient1

2. Restore the localhost to 127.0.0.1; comment out the ::1 tag and add a definition for the host.

#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost


# special IPv6 addresses
#::1 posClient1 ipv6- ipv6-posClient1

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts

9.168.23.31 posClient1
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Object Request Broker (ORB)
Operating system(s): i5/OS
Software version: 6.0.2
Software edition:
Reference #: 1240351
IBM Group: Software Group
Modified date: Jun 28, 2006