I think I have seen a similar issue years back. The difference between
launchpad and the feature launcher is that launchpad is invoking
ManagementFactory.getPlatformMBeanServer()
on startup, and I think back then adding that line to the launcher
solved my issue.
But my memory might also play tricks on me...
Regards
Carsten
Am 29.07.2020 um 17:17 schrieb Daniel Klco:
Hey Sling Team,
I'm scratching my head a bit on this one, but I'm seeing strange behavior
with the JMX Mbeans when using the Feature Launcher.
When I connect to the JMX console on an Apache Sling instance running on
the Feature Launcher via JConsole none of the Felix or OSGi MBeans appear
on an instance running via the Sling Launchpad.
https://imgur.com/a/phKS778
It's especially weird since I am seeing log messages indicating that the
JMX MBeans are being registered. I tried creating a custom configuration
for org.apache.felix.hc.core.impl.CompositeHealthCheck:
{
"filter.tags:String[]":[
"systemalive"
],
"hc.name":"alive",
"hc.tags:String[]":[
"slingcmsalive"
],
"hc.mbean.name":"SlingCmsAlive",
"filter.combineTagsWithOr":false
}
And I see the Felix Health Check API registering the Health Check:
29.07.2020 09:59:02.730 *DEBUG* [CM Event Dispatcher (Fire
ConfigurationEvent:
pid=org.apache.felix.hc.core.impl.CompositeHealthCheck.414496fe-8780-4001-9353-21f56df5ab2e)]
org.apache.felix.hc.core.impl.executor.async.AsyncHealthCheckExecutor
Received service event REGISTERED for health check HealthCheck 'alive'
29.07.2020 09:59:02.730 *DEBUG* [CM Event Dispatcher (Fire
ConfigurationEvent:
pid=org.apache.felix.hc.core.impl.CompositeHealthCheck.414496fe-8780-4001-9353-21f56df5ab2e)]
org.apache.felix.hc.core.impl.filter.ServiceUnavailableFilter Service Event
for Health Check: 1
29.07.2020 09:59:02.730 *DEBUG* [CM Event Dispatcher (Fire
ConfigurationEvent:
pid=org.apache.felix.hc.core.impl.CompositeHealthCheck.414496fe-8780-4001-9353-21f56df5ab2e)]
org.apache.felix.hc.core.impl.filter.ServiceUnavailableFilter Reloading HC
references for tags [systemalive]
29.07.2020 09:59:02.730 *TRACE* [CM Event Dispatcher (Fire
ConfigurationEvent:
pid=org.apache.felix.hc.core.impl.CompositeHealthCheck.414496fe-8780-4001-9353-21f56df5ab2e)]
org.apache.felix.hc.core.impl.util.HealthCheckFilter OSGi service filter in
getHealthCheckServiceReferences():
(&(|(objectClass=org.apache.felix.hc.api.HealthCheck)(objectClass=org.apache.sling.hc.api.HealthCheck))(|(hc.tags=systemalive)))
29.07.2020 09:59:02.731 *DEBUG* [CM Event Dispatcher (Fire
ConfigurationEvent:
pid=org.apache.felix.hc.core.impl.CompositeHealthCheck.414496fe-8780-4001-9353-21f56df5ab2e)]
org.apache.felix.hc.core.impl.util.HealthCheckFilter Found 2 HealthCheck
services for filter:
(&(|(objectClass=org.apache.felix.hc.api.HealthCheck)(objectClass=org.apache.sling.hc.api.HealthCheck))(|(hc.tags=systemalive)))
29.07.2020 09:59:02.731 *DEBUG* [CM Event Dispatcher (Fire
ConfigurationEvent:
pid=org.apache.felix.hc.core.impl.CompositeHealthCheck.414496fe-8780-4001-9353-21f56df5ab2e)]
org.apache.felix.hc.core.impl.filter.ServiceUnavailableFilter Found 2
health check service references for tags [systemalive]
29.07.2020 09:59:02.731 *DEBUG* [CM Event Dispatcher (Fire
ConfigurationEvent:
pid=org.apache.felix.hc.core.impl.CompositeHealthCheck.414496fe-8780-4001-9353-21f56df5ab2e)]
org.apache.felix.hc.jmx.impl.HealthCheckMBeanCreator *Registering health
check mbean HealthCheckMBean
[healthCheck=[org.apache.felix.hc.api.HealthCheck]] with name
org.apache.felix.healthcheck:type=HealthCheck,name=SlingCmsAlive*
I can even see the MBean being registered with the Apache Aries MBean
Whiteboard:
29.07.2020 09:59:02.730 *DEBUG* [CM Event Dispatcher (Fire
ConfigurationEvent:
pid=org.apache.felix.hc.core.impl.CompositeHealthCheck.414496fe-8780-4001-9353-21f56df5ab2e)]
org.apache.aries.jmx.whiteboard.JmxWhiteboardSupport unregisterMBean:
Removing MBean HealthCheckMBean
[healthCheck=[org.apache.felix.hc.api.HealthCheck]]
29.07.2020 09:59:02.731 *DEBUG* [CM Event Dispatcher (Fire
ConfigurationEvent:
pid=org.apache.felix.hc.core.impl.CompositeHealthCheck.414496fe-8780-4001-9353-21f56df5ab2e)]
org.apache.aries.jmx.whiteboard.JmxWhiteboardSupport registerMBean: *Adding
MBean HealthCheckMBean [healthCheck=[org.apache.felix.hc.api.HealthCheck]]*
But nonetheless, the MBeans are not showing up via JConsole. As far as I
can tell, dependencies should be identical as I created the Feature Model
based on the Provisioning Model.
Any ideas? Anyone else using the Feature Model seeing anything similar?
Thanks,
Dan
--
--
Carsten Ziegeler
Adobe Research Switzerland
[email protected]