如何抑制 java 11 关于 Rundeck 3.4.10 和 RD CLI 的 retrofit2 平台的警告
How can I suppress java 11 warning about retrofit2 platform for Rundeck 3.4.10 and RD CLI
我们有一台装有 Rundeck 3.4.10 的 Windows 2016 服务器,最近不得不升级到 Corretto OpenJDK 11。直到现在,任何 RD 命令都会出现以下错误,这使得很难看到实际情况return 从过程中阻止我们继续
开发自动化来查找 'stuck' 进程并中止它们。非常感谢任何帮助。
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by retrofit2.Platform (file://Apache/webapps/rundeck/rundeck/cli/rd-1.3.11/lib/retr
ofit-2.9.0.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of retrofit2.Platform
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
我什至将这些添加到 rd 文件但没有骰子:
# Add default JVM options here. You can also use JAVA_OPTS and RD_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang.invoke=retrofit2"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.lang=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.io=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.util=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens java.base/java.lang.invoke=retrofit2"
这是第一个 rd.conf 文件:
export RD_TOKEN=my_token
# or
#export RD_USER=username
#export RD_PASSWORD=password
export RD_URL=${RD_URL:-http://my-ip:8080/rundeck/}
export RD_INSECURE_SSL_NO_WARN=true
export JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
这是 Corretto 的版本-
openjdk 版本“11.0.14”2022-01-18 LTS
OpenJDK 运行环境 Corretto-11.0.14.9.1 (build 11.0.14+9-LTS)
OpenJDK 64 位服务器 VM Corretto-11.0.14.9.1(构建 11.0.14+9-LTS,混合模式)
“非法反射访问”警告是无害的,您可以打开一个新问题 here,这样开发团队可以在以后的版本中删除它们。
我们有一台装有 Rundeck 3.4.10 的 Windows 2016 服务器,最近不得不升级到 Corretto OpenJDK 11。直到现在,任何 RD 命令都会出现以下错误,这使得很难看到实际情况return 从过程中阻止我们继续 开发自动化来查找 'stuck' 进程并中止它们。非常感谢任何帮助。
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by retrofit2.Platform (file://Apache/webapps/rundeck/rundeck/cli/rd-1.3.11/lib/retr
ofit-2.9.0.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of retrofit2.Platform
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
我什至将这些添加到 rd 文件但没有骰子:
# Add default JVM options here. You can also use JAVA_OPTS and RD_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang.invoke=retrofit2"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
JAVA_OPTS="$JAVA_OPTS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.lang=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.io=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.util=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens java.base/java.lang.invoke=retrofit2"
这是第一个 rd.conf 文件:
export RD_TOKEN=my_token
# or
#export RD_USER=username
#export RD_PASSWORD=password
export RD_URL=${RD_URL:-http://my-ip:8080/rundeck/}
export RD_INSECURE_SSL_NO_WARN=true
export JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
这是 Corretto 的版本-
openjdk 版本“11.0.14”2022-01-18 LTS OpenJDK 运行环境 Corretto-11.0.14.9.1 (build 11.0.14+9-LTS) OpenJDK 64 位服务器 VM Corretto-11.0.14.9.1(构建 11.0.14+9-LTS,混合模式)
“非法反射访问”警告是无害的,您可以打开一个新问题 here,这样开发团队可以在以后的版本中删除它们。