WARN "Unable to get Instrumentation. Dynamic Attach failed" while booting SDC service.


Userlevel 3

Issue:

The SDC is showing following error while start the process on sone of the java version however this will not stop the data collector process from booting. This can be seen while booting only.

# WARNING: Unable to get Instrumentation. Dynamic Attach failed. You may add this JAR as -javaagent manually, or supply -Djdk.attach.allowAttachSelf

# WARNING: Unable to attach Serviceability Agent. Unable to attach even with module exceptions: [org.openjdk.jol.vm.sa.SASupportException: Sense failed., org.openjdk.jol.vm.sa.SASupportException: Sense failed., org.openjdk.jol.vm.sa.SASupportException: Sense failed.]

 

Solution:

There are 2 ways to suppress the warning message:

  1. We can added the global variable in linux which will enable this property for all the java process running on linux machine, however the JAVA_TOOL_OPTIONS variable will be unset after the reboot. If you want to enable it, for SDC process only then follow the second solution.
    export JAVA_TOOL_OPTIONS="-Djdk.attach.allowAttachSelf=true" 

     

  2. Add the same java property in the $SDC_HOME//libexec/sdc-env.sh under the "SDC_JAVA_OPTS" section. Setting up the property in sdc-env.sh will enabled the java parameter for the SDC process only. This requires SDC service restart.

0 replies

Be the first to reply!

Reply