2

I have to monitor my vertx server installed on a linux machine from JProfiler remote profiling installed on a windows machine. On my linux machine, to make the JVM ready for profiling, I did the following to run jpenable:

  1. Downloaded https://download-gcdn.ej-technologies.com/jprofiler/jprofiler_linux_9_2_1.tar.gz.
  2. Extracted it tar -zxvf jprofiler_linux_9_2_1.tar.gz
  3. Executed jprofiler9/bin/jpenable. Since there is only once process running which is my vertx server, it was auto selected. It prompted to select the profiling mode as shown below:

    Please select the profiling mode:
    GUI mode (attach with JProfiler GUI) [1, Enter]
    Offline mode (use config file to set profiling settings) [2]

  4. When I choose 1 and press Enter, it throws the following exception:

    java.lang.ExceptionInInitializerError
     at java.net.ServerSocket.setImpl(ServerSocket.java:303)
     at java.net.ServerSocket.(ServerSocket.java:245)
     at java.net.ServerSocket.(ServerSocket.java:143)
     at com.ejt.framework.g.ab.b(ejt:30)
     at com.ejt.framework.g.ab.a(ejt:13)
     at com.jprofiler.cli.EnableApplication.l(ejt:141)
     at com.jprofiler.cli.EnableApplication.a(ejt:131)
     at com.jprofiler.cli.EnableApplication.h(ejt:95)
     at com.jprofiler.cli.b.a(ejt:26)
     at com.jprofiler.cli.EnableApplication.main(ejt:272)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:498)
     at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)
     at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57)
    Caused by: java.lang.NullPointerException
     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1847)
     at java.lang.Runtime.loadLibrary0(Runtime.java:871)
     at java.lang.System.loadLibrary(System.java:1124)
     at java.net.AbstractPlainSocketImpl$1.run(AbstractPlainSocketImpl.java:84)
     at java.net.AbstractPlainSocketImpl$1.run(AbstractPlainSocketImpl.java:82)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.AbstractPlainSocketImpl.(AbstractPlainSocketImpl.java:81)
     ... 16 more

No clue what is causing this exception. I googled for it and no where I came across anybody facing the same issue and resolution for the same. Can anybody help figure out what causes this exception.

Note: Java installed on linux machine:
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)

saikamesh
  • 4,569
  • 11
  • 53
  • 93

1 Answers1

3

This exception is caused by a change in 8u242 that was backed out again for 8u252. With older versions of JProfiler, you have to use a JRE other than 8u242. You can do that by defining the environment variable INSTALL4J_JAVA_HOME_OVERRIDE.

JProfiler 11.1.1+ also works with 8u242.

Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102