Health check 'Java Flight Recorder (JFR)' failed

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Health check 'Java Flight Recorder (JFR)' fails with the following error:

1 2 3 4 5 6 Name: Java Flight Recorder (JFR) NodeId: null Is healthy: false Failure reason: Exception during health check invocation java.lang.IllegalAccessError: class jdk.jfr.internal.SecuritySupport$$Lambda$4294/0x0000000804b14c40 (in module jdk.jfr) cannot access class com.singularity.ee.agent.appagent.entrypoint.bciengine.FastMethodInterceptorDelegatorBoot (in unnamed module @0x57fa26b7) because module jdk.jfr does not read unnamed module @0x57fa26b7 Severity: MAJOR Additional links: []

Environment

Jira 9.x and above

Diagnosis

  • Jira admins are notified of this healthcheck failure on the UI

  • In the logs you see an error like the following:

1 2022-09-27 14:14:04,992+0200 Caesium-1-3 ERROR ServiceRunner [c.a.t.healthcheck.concurrent.SupportHealthCheckProcess] Health check 'Java Flight Recorder (JFR)' failed with severity 'major': 'Exception during health check invocation java.lang.IllegalAccessError: class jdk.jfr.internal.SecuritySupport$$Lambda$4294/0x0000000804b14c40 (in module jdk.jfr) cannot access class com.singularity.ee.agent.appagent.entrypoint.bciengine.FastMethodInterceptorDelegatorBoot (in unnamed module @0x57fa26b7) because module jdk.jfr does not read unnamed module @0x57fa26b7'

Cause

This error can be caused if you have Appdynamics agents added which involves adding this bootloader parameter to be added:

1 -Datlassian.org.osgi.framework.bootdelegation

As mentioned in Adding classes to OSGi boot class loader (BootDelegation) this parameter is unsupported and you need to use the following parameter instead:

1 -Datlassian.org.osgi.framework.bootdelegation.extra

Solution

Change the existing parameter to:

1 -Datlassian.org.osgi.framework.bootdelegation.extra=com.mycompany.myapp.*,com.mycompany.myotherapp.*

Additional Note:

It may happen that you're also using Adaptavist ScriptRunner plugin and you might see the following in the logs:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 2022-10-13 13:34:41,430+0200 http-nio-8080-exec-24 url: /rest/projects/1.0/project/XXXXX/lastVisited; user: XXXXX WARN XXXXXX 814x928327x2 1cn8gl4 1.1.1.1,2.2.2.2 /rest/projects/1.0/project/XXXX/lastVisited [c.a.s.jfr.events.EventWrapper] Error initializing JFR event: java.lang.NoClassDefFoundError: Could not initialize class com.adaptavist.scriptrunner.jfr.events.feature.fragments.FragmentConditionExecutedEvent at jdk.internal.reflect.GeneratedConstructorAccessor724.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72) at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:59) at org.codehaus.groovy.runtime.callsite.ConstructorSite.callConstructor(ConstructorSite.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:286) at com.onresolve.scriptrunner.fragments.ScriptCondition$_shouldDisplay_closure2.doCall(ScriptCondition.groovy:72) at com.onresolve.scriptrunner.fragments.ScriptCondition$_shouldDisplay_closure2.doCall(ScriptCondition.groovy) at jdk.internal.reflect.GeneratedMethodAccessor1029.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035) at groovy.lang.Closure.call(Closure.java:412) at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:50) at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:112) at com.sun.proxy.$Proxy4994.get(Unknown Source) at com.adaptavist.scriptrunner.jfr.events.EventWrapper.<init>(EventWrapper.java:27) at com.adaptavist.scriptrunner.jfr.events.EventWrapper.forEvent(EventWrapper.java:37) at jdk.internal.reflect.GeneratedMethodAccessor934.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrap.invoke(StaticMetaMethodSite.java:131) at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:89) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139) at com.onresolve.scriptrunner.fragments.ScriptCondition.shouldDisplay(ScriptCondition.groovy:71) at com.onresolve.scriptrunner.fragments.JiraScriptCondition.super$2$shouldDisplay(JiraScriptCondition.groovy)

In this case, you'd also need to add the following in the startup parameters and restart jira:

1 --add-reads jdk.jfr=ALL-UNNAMED

Updated on March 12, 2025

Still need help?

The Atlassian Community is here for you.