IBM Support

IBM WebSphere Application Server Fails With java.lang.UnknownHostException

Troubleshooting


Problem

When attempting to start an IBM WebSphere Application Server, the application server fails to start with a java.lang.UnkonwnHostException. The exception is found in the SystemOut.log and/or SystemErr.log file.

Symptom

The IBM WebSphere Application Server being started fails to start and an error in the SystemOut.log and/or SystemErr.log indicates a java.lang.UnknownHostException was thrown.

Cause

TCP/IP is not started on IBM i OS, or the TCP configuration is not correct. The IBM WebSphere Application Server product is not able to resolve the configured Fully Qualified Domain Name.

Environment

WebSphere Application Server (WAS) - All versions and editions

Resolving The Problem

The java.lang.UnknownHostException typically occurs when one of the following is true.

1) TCP/IP is not started on the server.
2) The Fully Qualified Domain Name (FQDN), which consists of the hostName.domainName (i.e. server.ibm.com) listed in CFGTCP Option 12 is not being resolved to a valid IP address properly.
3) The FQDN specified in the WebSphere Application Server profile configuration is not being resolved to a valid IP address properly.

First, verify that TCP/IP is started on the IBM i by running the STRTCP command or checking NETSTAT Option 10. Then, attempt to PING the IBM i server using its host name as defined in the TCP/IP configuration. You can run the CFGTCP command and select Option 12 to determine the full qualified domain name (FQDN) defined for the system. The FQDN is defined as the host name plus the domain name (i.e. AS400.ibm.com). If your host name search priority is set to *LOCAL, verify the FQDN (host.domain) name is set to a valid, active TCP interface on the system in the local host table in CFGTCP Option 10.

You can verify the host name being used by your WebSphere Application Server profile by viewing the /QIBM/UserData/WebSphere/AppServer/<version>/<edition>/profiles/<profileName>/config/cells/<cellName>/nodes/<nodeName>/serverindex.xml file.

i.e. /qibm/userdata/websphere/appserver/v85/express/profiles/default/conig/cells/AS400_default/nodes/AS400_default/serverindex.xml

When displaying this file, you would want to look at the endPoint configuration for your WAS profile. Locate one of the endPoint lines which are similar to the following.

<endPoint xmi:id="EndPoint_1183122129640" host="AS400.ibm.com" port="2867"/>

In this example, the FQDN used by the WebSphere Application Serve profile is AS400.ibm.com. You would need to ensure this FQDN is being properly resolved to a valid IP address either through the local host table or through your DNS.

If the FQDN needs to be changed for your WAS profile's configuration, you can do this by following the instructions in the IBM Technical Document:
How To Change The Host Name For An IBM WebSphere Application Server Full Profile

You can test to see if the FQDN configured for the server resolves to an IP address successfully by using the Java program IPTest located in the app_server_root/bin directory. Where app_server_root is the following:

/QIBM/ProdData/WebSphere/AppServer/<Version>/<Edition>/bin

<Version> = V6, V61, V7, V8, V85, V9

<Edition> = Express, Base, ND

This example was run from QShell:

   $


 > cd /qibm/proddata/websphere/appserver/v8/express/bin
   $
 > iptest
   Local Address: 1.2.3.4
   Local Name: MYSYSTEM.MYCOMPANY.COM
   All addresses for MYSYSTEM.MYCOMPANY.COM:
           1.2.3.4
   $

The values returned by IPTest (and usually used by WebSphere) come from the TCP configuration. You can look at the TCP configuration using the CFGTCP command. Option 12 shows the FQDN (host.domiain) WebSphere is using. It also shows if a DNS is being used (HOSTSCHPTY=*REMOTE) or if the IBM i host table is being used (HOSTSCHPTY=*LOCAL). The IBM i host table can be viewed and changed with Option 10. The TCP interfaces (TCP/IP addresses) are under Option 1. When displaying the TCP interfaces, press F11 on to view the status of each interface.



The exact resolution for this problem depends on where the configuration is incorrect.

If the TCP/IP address returned by IPTest is not correct, do the following:
oIf CFGTCP, Option 12 shows HOSTSCHPTY=*REMOTE, the DNS has an entry that is not correct and must be corrected.
oIf CFGTCP, Option 12 shows HOSTSCHPTY=*LOCAL, use CFGTCP, Option 10 to define the correct TCP/IP address for the host name.

If the TCP/IP address returned by IPTest is correct, use CFGTCP, Option 1. Do the following:
1.If the TCP/IP address is not listed, add it.
2.Press F11. If the TCP/IP address is not active, start it using Option 9.
If the problem, still persists, please call the IBM i Global Support Center at 1-800-IBM-SERV to create a problem record (PMR).

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number

20114011

Document Information

Modified date:
18 December 2019

UID

nas8N1017719