Dear All, hi!
would you please advise, i have Whois server running, but can’t use the jmx, on entering the “./whois.init jmx” getting:
=======================
root@RIPE:/home/maxim/whois# ./whois.init start
Starting whois…
root@RIPE:/home/maxim/whois# ./whois.init jmx
Delete /root/.jmxterm_history if you encounter error right after launching me.
Exception in thread “main” java.lang.reflect.UndeclaredThrowableException
at jdk.proxy2/jdk.proxy2.$Proxy6.getAllVirtualMachines(Unknown Source)
at org.cyclopsgroup.jmxterm.jdk6.Jdk6JavaProcessManager.get(Jdk6JavaProcessManager.java:28)
at org.cyclopsgroup.jmxterm.SyntaxUtils.getUrl(SyntaxUtils.java:41)
at org.cyclopsgroup.jmxterm.boot.CliMain.execute(CliMain.java:135)
at org.cyclopsgroup.jmxterm.boot.CliMain.main(CliMain.java:41)
Caused by: java.lang.IllegalAccessException: class org.cyclopsgroup.jmxterm.utils.WeakCastUtils$2 cannot access class sun.tools.jconsole.LocalVirtualMachine (in module jdk.jconsole) because module jdk.jconsole does not export sun.tools.jconsole to unnamed module @34252efb
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
at java.base/java.lang.reflect.Method.invoke(Method.java:560)
at org.cyclopsgroup.jmxterm.utils.WeakCastUtils$2.invoke(WeakCastUtils.java:136)
… 5 more
root@RIPE:/home/maxim/whois#
=======================
and the JMX about is like:
=======================
$>about
“software.name” = “jmxterm”;
“software.description” = “Command line based interactive JMX client softare”;
“softawre.url” = “http://www.cyclopsgroup.org/projects/jmxterm”;
“release.version” = “0.2”;
“release.date” = “2007-07-27”;
“release.note” = “The second release”;
“author.id” = “jiaqi”;
“author.jiaqi.name” = “Jiaqi Guo”;
“author.jiaqi.email” = “jiaqi.guo@gmail.com”;
“org.id” = “cyclopsgroup”;
“org.cyclopsgroup.name” = “CyclopsGroup”;
“org.cyclopsgroup.url” = “http://www.cyclopsgroup.org”;
“java.specification.version=17” = “17”;
“java.class.path=jmxterm-1.0.2-uber.jar” = “jmxterm-1.0.2-uber.jar”;
“java.vm.vendor=Private Build” = “Private Build”;
“java.vendor.url=Unknown” = “Unknown”;
“java.vm.specification.version=17” = “17”;
“java.specification.vendor=Oracle Corporation” = “Oracle Corporation”;
“java.version.date=2023-04-18” = “2023-04-18”;
“java.home=/usr/lib/jvm/java-17-openjdk-amd64” = “/usr/lib/jvm/java-17-openjdk-amd64”;
“java.vm.compressedOopsMode=32-bit” = “32-bit”;
“java.vm.specification.vendor=Oracle Corporation” = “Oracle Corporation”;
“java.specification.name=Java Platform API Specification” = “Java Platform API Specification”;
“java.runtime.version=17.0.7+7-Ubuntu-0ubuntu122.04.2” = “17.0.7+7-Ubuntu-0ubuntu122.04.2”;
“java.runtime.name=OpenJDK Runtime Environment” = “OpenJDK Runtime Environment”;
“java.vm.name=OpenJDK 64-Bit Server VM” = “OpenJDK 64-Bit Server VM”;
“java.vendor.url.bug=Unknown” = “Unknown”;
“java.io.tmpdir=/tmp” = “/tmp”;
“java.version=17.0.7” = “17.0.7”;
“java.vm.specification.name=Java Virtual Machine Specification” = “Java Virtual Machine Specification”;
“java.library.path=/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib” = “/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib”;
“java.vm.info=mixed mode, sharing” = “mixed mode, sharing”;
“java.vendor=Private Build” = “Private Build”;
“java.vm.version=17.0.7+7-Ubuntu-0ubuntu122.04.2” = “17.0.7+7-Ubuntu-0ubuntu122.04.2”;
“java.class.version=61.0” = “61.0”;
=====================================
it seems the problem is Java 17, JMX can’t work with it, but the Whois server “insisted” on Java 17 during installation.
the only discussion i found is here: jmx - How do I give jmxterm access to sun.tools.jconsole.LocalVirtualMachine in Java 17? - Stack Overflow
which is a bit strange, because the issue seem lasts since the beginning of the year at least…
Do you probably know, how to handle this, may be there are some recomendations or hints already elaborated? Many thanks in advance!