You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This is an edge case where the the wlp/bin directory is a symbolic link. In this case, WLP_INSTALL_DIR might resolve to the parent of the symbolic link (logical path) rather than the real path (physical path) of the wlp directory. It works fine if there is a symbolic link somewhere in the ancestry of the bin directory, but fails in some cases when bin is a symbolic link.
The problem is that we first append "/.." to the bin directory, before trying to resolve the path. At that point, we are now trying to resolve the parent of the symbolic link, which normally won't resolve to anything different unless the parent or another ancestor directory is also a symbolic link.
Steps to Reproduce
cd wlp
mv bin realbin
ln -s realbin bin
./server start
Expected behavior
The server should start without error, but since the WLP_INSTALL_DIR is not calculated correctly, the server script might not be able to find etc/server.env, etc/jvm.options, /bin/tools/ws-server.jar, etc...
Diagnostic information:
OpenLiberty Version: [e.g. 24.0.0.1 - 24.0.0.2]
Additional context
Support for wlp/bin as a symbolic link was only recently added in 23.0.0.12, and then it was broken by a change in 24.0.0.1.
Trace from 23.0.0.12 (The BEFORE case - working case):
Describe the bug
This is an edge case where the the wlp/bin directory is a symbolic link. In this case, WLP_INSTALL_DIR might resolve to the parent of the symbolic link (logical path) rather than the real path (physical path) of the wlp directory. It works fine if there is a symbolic link somewhere in the ancestry of the bin directory, but fails in some cases when bin is a symbolic link.
The problem is that we first append "/.." to the bin directory, before trying to resolve the path. At that point, we are now trying to resolve the parent of the symbolic link, which normally won't resolve to anything different unless the parent or another ancestor directory is also a symbolic link.
Steps to Reproduce
Expected behavior
The server should start without error, but since the WLP_INSTALL_DIR is not calculated correctly, the server script might not be able to find etc/server.env, etc/jvm.options, /bin/tools/ws-server.jar, etc...
Diagnostic information:
Additional context
Support for wlp/bin as a symbolic link was only recently added in 23.0.0.12, and then it was broken by a change in 24.0.0.1.
Trace from 23.0.0.12 (The BEFORE case - working case):
Trace from 24.0.0.1 (failing case):
The server script references WLP_INSTALL_DIR to find other files:
${WLP_INSTALL_DIR}/etc/server.env
${WLP_INSTALL_DIR}/java/java.env
${WLP_INSTALL_DIR}/etc/default.env
${WLP_INSTALL_DIR}/etc/jvm.options
${WLP_INSTALL_DIR}/usr/shared/jvm.options
${WLP_INSTALL_DIR}/lib/platform/java/java9.options
${WLP_INSTALL_DIR_QUOTED}/bin/tools/ws-javaagent.jar
${WLP_INSTALL_DIR_QUOTED}/bin/tools/ws-server.jar
${WLP_INSTALL_DIR}/lib/native/zos/s390x/bbgzcsl (zOS only)
${WLP_INSTALL_DIR}/lib/native/zos/s390x/nls/%N.cat (zOS only)
And uses it to set other variables:
WLP_DEFAULT_USER_DIR=${WLP_INSTALL_DIR}/usr which matters if WLP_USER_DIR is not defined.
The text was updated successfully, but these errors were encountered: