Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server version command ignores JAVA_HOME set in server's server.env #24981

Closed
ninadaa opened this issue Apr 12, 2023 · 4 comments · Fixed by #25200
Closed

server version command ignores JAVA_HOME set in server's server.env #24981

ninadaa opened this issue Apr 12, 2023 · 4 comments · Fixed by #25200
Assignees
Labels
in:Kernel/Bootstrap Needs member attention release bug This bug is present in a released version of Open Liberty release:23006

Comments

@ninadaa
Copy link

ninadaa commented Apr 12, 2023

Describe the bug
The server version <serverName> command ignores the JAVA_HOME variable that is set in the server's server.envfile.
Instead it prints out the java version info of the java installation set by JAVA_HOME variable in shell environment (bash).

Steps to Reproduce

  • set JAVA_HOME in shell envionment (e.g. set to Semeru 8 installation)
  • create server myServer and add server.env in ${WLP_INSTALL_DIR}/usr/servers/myServer/server.env
  • set JAVA_HOME (e.g. set to Semeru 11 installation) in ${WLP_INSTALL_DIR}/usr/servers/myServer/server.env
  • run ${WLP_INSTALL_DIR}/bin/server version myServer

Expected behavior
When I run server version <serverName> I expect it to display the version info related to the java installation I specified in the server.env of the server.

Diagnostic information:

  • OpenLiberty Version: 23.0.0.3

Additional context
Works as expected if I change the server script to:

  version)
    #installEnv
    serverEnv
    javaCmd '' --version
@ninadaa ninadaa added the release bug This bug is present in a released version of Open Liberty label Apr 12, 2023
@hlhoots hlhoots added this to Kernel Tasks in Open Liberty Kernel Team Apr 12, 2023
@cbridgha
Copy link
Member

Just to confirm... server start does pickup the correct version right? as seen in the logs...
But I have confirmed this issue with the server version command. = We will investigate.

@cbridgha
Copy link
Member

@ninadaa I did confirm if a server.env file is added to ${wlp.install.dir}/etc/server.env. those values are picked up by the server version command. still investigating as we do see some inconsistencies...

@ninadaa
Copy link
Author

ninadaa commented Apr 13, 2023

Just to confirm... server start does pickup the correct version right? as seen in the logs... But I have confirmed this issue with the server version command. = We will investigate.

@cbridgha yes, server start picks the correct Java, only server version does not.

@jimblye
Copy link
Member

jimblye commented May 4, 2023

See opening comment in the pull request.

@tbitonti tbitonti moved this from Kernel Tasks to Completed Tasks in Open Liberty Kernel Team Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:Kernel/Bootstrap Needs member attention release bug This bug is present in a released version of Open Liberty release:23006
Projects
Development

Successfully merging a pull request may close this issue.

4 participants