-
Notifications
You must be signed in to change notification settings - Fork 624
Description
Describe the bug
We have an automatic restart mechanism that checks if the server is started. If its not running the script will try to start the server using ./server start abcserver. However after upgrade to 21.0.0.9 this script is failing with error message as CWWKE0097W: The JAVA_HOME environment variable is not set.
More details :
The script runs as xyz. JAVA_HOME variable is set in the .bash_profile of the user using the below command export JAVA_HOME=$(alternatives --display java | grep 'family java-21-openjdk' | cut -d' ' -f1 | sed -e 's//bin/java$//')
This is reflected in the echo statement in the script itself.
The issue does not happen if i login to the server and start the server by issuing ./server start abcserver.
The issue also happens when start up command is issued from azure devops pipeline.
Steps to Reproduce
- Install openliberty server on redhat linux
- Set the JAVA_HOME variable in the .bash_profile using export JAVA_HOME=$(alternatives --display java | grep 'family java-21-openjdk' | cut -d' ' -f1 | sed -e 's//bin/java$//')
- Create a cron that will trigger a script. The script has the command to start the openliberty server.
Expected behavior
Server should start up normally and error message with code CWWKE0097W should not be displayed.
Diagnostic information:
-
OpenLiberty Version: 21.0.0.9
-
Affected feature(s) : Server startup
-
Java Version: [i.e. full output of
java -version
]- openjdk version "21.0.8" 2025-07-15 LTS
OpenJDK Runtime Environment (Red_Hat-21.0.8.0.9-1) (build 21.0.8+9-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-21.0.8.0.9-1) (build 21.0.8+9-LTS, mixed mode, sharing)
- openjdk version "21.0.8" 2025-07-15 LTS
-
server.xml configuration (WITHOUT sensitive information like passwords)
Additional context
- Happens only when started with script or when openliberty server is started from pipeline. Works fine while starting manually.
- JAVA_HOME is properly set and the echo statement in script prints the JAVA_HOME value correctly
- Was observed on 25.0.0.8 version too.