How can I suppress java 11 warning about retrofit2 platform for Rundeck 3.4.10 and RD CLI

251 views Asked by At

We have a Windows 2016 server with Rundeck 3.4.10 and recently had to upgrade to Corretto OpenJDK 11. Only now any RD command get's an error of the following which makes it very difficult to see the actual return from the process and is stopping us from continuing to develop a automation to find 'stuck' processes and abort them. Any help would be very much appreciated.

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

I even added these to the rd file but no dice:

# 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"

this is thd rd.conf file:

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"

This is the version of Corretto-

openjdk version "11.0.14" 2022-01-18 LTS OpenJDK Runtime Environment Corretto-11.0.14.9.1 (build 11.0.14+9-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.14.9.1 (build 11.0.14+9-LTS, mixed mode)

1

There are 1 answers

2
MegaDrive68k On BEST ANSWER

The "An illegal reflective access" warnings are inoffensive, you can open a new issue here, in that way the dev team can remove them on further versions.