Unable to start WAS in Docker environment

Use this information to solve the problem when WebSphere Application Server (WAS) cannot be started in the Docker environment.

Problem

WebSphere Application Server cannot be started and enters a 'loop situation'.

Symptom

SMU Docker container is in a 'loop situation', and you see the following exception in WAS's SystemOut.log when starting WAS manually in the SMU Docker container debug mode:

com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable HOST

Cause

The host name of the Docker host isn't configured correctly. For example, only a subname is set instead of the fully qualified name (FQN). The SMU Docker container might not be able to resolve this host name. For example, if the FQN of the Docker host server is mydocker.mycompany.com, but the host name is set only to mydocker, the SMU Docker container inherits this host name but not be able to resolve it. As a result, WAS will not be able to start successfully, resulting in a 'loop situation'.

Solution

To solve this problem, configure your docker host's host name to the FQN so that the Docker container can resolve it properly.