Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[io.metrics] Installing breaks WebUI (REST API) #10640

Closed
moritzj29 opened this issue May 3, 2021 · 2 comments · Fixed by #10644
Closed

[io.metrics] Installing breaks WebUI (REST API) #10640

moritzj29 opened this issue May 3, 2021 · 2 comments · Fixed by #10644
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@moritzj29
Copy link

Hello,

first of all, thanks to @pravussum for adding metrics functionality! Great to have this available as an official add-on! I tried using the the new add-on today, but was not successful. Since I was not able to track down an existing issue here or at openhab-core (or the forum), I'm opening one myself.

Expected Behavior

Installing via "Misc", Metrics should be available at specified endpoint, everything else should work as before.

Current Behavior

Installing the metrics add-on makes the WebUI disappear. The browser gets 404 error codes when trying to access the (original) REST API.
The /metrics/prometheus endpoint is working then.
When restarting the container, the WebUI comes back but the metrics endpoint is gone. Also the add-on does not show as "installed". Reinstalling results in the same behavior as described before.

Log output during installation. I don't see any critical stuff here.

07:04:52.380 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController] : BundleComponentActivator : ComponentHolder created.
07:04:52.388 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService] : BundleComponentActivator : ComponentHolder created.
07:04:52.407 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController] : Dependency Manager created MeterRegistryProviderinterface=org.openhab.core.io.monitor.MeterRegistryProvider, filter=null, policy=static, cardinality=1..1, bind=setMeterRegistryProvider, unbind=null, updated=null, field=null, field-option=null, collection-type=null, parameter=null
07:04:52.418 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController] : Component created: DS=DS13, implementation=org.openhab.io.metrics.MetricsRestController, immediate=true, default-enabled=true, factory=null, configuration-policy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[org.openhab.io.metrics.MetricsRestController]
07:04:52.456 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController] : Component Services: scope=singleton, services=[org.openhab.io.metrics.MetricsRestController]
07:04:52.472 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController] : Component Properties: {osgi.jaxrs.application.select=(osgi.jaxrs.name=Metrics), osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), osgi.jaxrs.resource=true}
07:04:52.489 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController] : Querying state disabled
07:04:52.524 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController] : Querying state disabled
07:04:52.534 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController] : Component can not be activated since it is in state disabled
07:04:52.549 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController] : Querying state disabled
07:04:52.566 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Updating target filters
07:04:52.577 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : No change in target property for dependency MeterRegistryProvider: currently registered: false
07:04:52.589 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] :  No existing service listener to unregister for dependency MeterRegistryProvider
07:04:52.607 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Setting target property for dependency MeterRegistryProvider to null
07:04:52.621 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : New service tracker for MeterRegistryProvider, initial active: false, previous references: {}, classFilter: (objectClass=org.openhab.core.io.monitor.MeterRegistryProvider), initialReferenceFilter (objectClass=org.openhab.core.io.monitor.MeterRegistryProvider)
07:04:52.635 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : dm MeterRegistryProvider tracker reset (closed)
07:04:52.646 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : dm MeterRegistryProvider tracking 1 SingleStatic added {org.openhab.core.io.monitor.MeterRegistryProvider}={service.id=335, service.bundleid=174, service.scope=bundle, component.name=org.openhab.core.io.monitor.internal.DefaultMetricsRegistration, component.id=76} (enter)
07:04:52.663 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : dm MeterRegistryProvider tracking 1 SingleStatic active: false trackerOpened: false optional: false
07:04:52.671 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : dm MeterRegistryProvider tracking 1 SingleStatic added {org.openhab.core.io.monitor.MeterRegistryProvider}={service.id=335, service.bundleid=174, service.scope=bundle, component.name=org.openhab.core.io.monitor.internal.DefaultMetricsRegistration, component.id=76} (exit)
07:04:52.675 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : dm MeterRegistryProvider tracker opened
07:04:52.678 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : registering service listener for dependency MeterRegistryProvider
07:04:52.684 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Changed state from disabled to unsatisfiedReference
07:04:52.688 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Component enabled
07:04:52.692 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : ActivateInternal
07:04:52.696 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Querying state unsatisfiedReference
07:04:52.699 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Querying state unsatisfiedReference
07:04:52.702 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Activating component from state unsatisfiedReference
07:04:52.705 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Querying state unsatisfiedReference
07:04:52.709 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Querying state unsatisfiedReference
07:04:52.713 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Changed state from unsatisfiedReference to satisfied
07:04:52.717 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : registration change queue [registered]
07:04:52.737 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Checking constructor public org.openhab.io.metrics.MetricsRestController()
07:04:52.740 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Found constructor with 0 arguments : public org.openhab.io.metrics.MetricsRestController()
07:04:52.744 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : getting bind: setMeterRegistryProvider
07:04:52.748 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Locating method setMeterRegistryProvider in class org.openhab.io.metrics.MetricsRestController
07:04:52.751 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : doFindMethod: Looking for method org.openhab.io.metrics.MetricsRestController.setMeterRegistryProvider
07:04:52.756 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Declared Method org.openhab.io.metrics.MetricsRestController.setMeterRegistryProvider([interface org.osgi.framework.ServiceReference]) not found
07:04:52.760 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Declared Method org.openhab.io.metrics.MetricsRestController.setMeterRegistryProvider([interface org.osgi.service.component.ComponentServiceObjects]) not found
07:04:52.764 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : getReferenceClass: Looking for interface class org.openhab.core.io.monitor.MeterRegistryProvider through loader of org.openhab.io.metrics.MetricsRestController
07:04:52.768 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : getParameterClass: Found class org.openhab.core.io.monitor.MeterRegistryProvider
07:04:52.773 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : doFindMethod: No method taking ServiceReference found, checking method taking org.openhab.core.io.monitor.MeterRegistryProvider
07:04:52.780 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : doFindMethod: Found Method public void org.openhab.io.metrics.MetricsRestController.setMeterRegistryProvider(org.openhab.core.io.monitor.MeterRegistryProvider)
07:04:52.788 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Found bind method: public void org.openhab.io.metrics.MetricsRestController.setMeterRegistryProvider(org.openhab.core.io.monitor.MeterRegistryProvider)
07:04:52.798 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : This thread collected dependencies
07:04:52.810 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : getService (single component manager) dependencies collected.
07:04:52.817 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Querying state satisfied
07:04:52.828 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Querying state satisfied
07:04:52.832 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : For dependency MeterRegistryProvider, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.io.monitor.MeterRegistryProvider}={service.id=335, service.bundleid=174, service.scope=bundle, component.name=org.openhab.core.io.monitor.internal.DefaultMetricsRegistration, component.id=76}] service: [org.openhab.core.io.monitor.internal.DefaultMetricsRegistration@594f9e75]]]
07:04:53.015 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : invoking bind: setMeterRegistryProvider: parameters [org.openhab.core.io.monitor.internal.DefaultMetricsRegistration]
07:04:53.273 [DEBUG] [nhab.io.metrics.MetricsRestController] - Core metrics registry retrieved and Prometheus registry added successfully.
07:04:53.279 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : invoked bind: setMeterRegistryProvider
07:04:53.285 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : getting activate: activate
07:04:53.287 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Locating method activate in class org.openhab.io.metrics.MetricsRestController
07:04:53.290 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Declared Method org.openhab.io.metrics.MetricsRestController.activate([interface org.osgi.service.component.ComponentContext]) not found
07:04:53.291 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Locating method activate in class java.lang.Object
07:04:53.293 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Declared Method java.lang.Object.activate([interface org.osgi.service.component.ComponentContext]) not found
07:04:53.295 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : activate method [activate] not found, ignoring
07:04:53.297 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Set implementation object for component
07:04:53.298 [DEBUG] [nhab.io.metrics.MetricsRestController] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsRestController(327)] : Changed state from satisfied to active
07:04:53.309 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService] : Dependency Manager created MeterRegistryProviderinterface=org.openhab.core.io.monitor.MeterRegistryProvider, filter=null, policy=static, cardinality=1..1, bind=setMeterRegistryProvider, unbind=null, updated=null, field=null, field-option=null, collection-type=null, parameter=null
07:04:53.312 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService] : Dependency Manager created metricsinterface=org.openhab.io.metrics.MetricsRestController, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=metrics, field-option=replace, collection-type=null, parameter=null
07:04:53.315 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService] : Component created: DS=DS13, implementation=org.openhab.io.metrics.MetricsService, immediate=true, default-enabled=true, factory=null, configuration-policy=optional, activate=activate, deactivate=deactivate, modified=modified configuration-pid=[org.openhab.io.metrics.MetricsService]
07:04:53.317 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService] : Component Services: scope=singleton, services=[org.openhab.io.metrics.MetricsService]
07:04:53.318 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService] : Component Properties: {service.config.label=Metrics service, service.config.category=io, service.config.description.uri=io:metrics, service.config.factory=false}
07:04:53.320 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService] : Querying state disabled
07:04:53.324 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService] : Querying state disabled
07:04:53.326 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService] : Component can not be activated since it is in state disabled
07:04:53.327 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService] : Querying state disabled
07:04:53.328 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Updating target filters
07:04:53.339 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : No change in target property for dependency MeterRegistryProvider: currently registered: false
07:04:53.347 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] :  No existing service listener to unregister for dependency MeterRegistryProvider
07:04:53.351 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Setting target property for dependency MeterRegistryProvider to null
07:04:53.355 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : New service tracker for MeterRegistryProvider, initial active: false, previous references: {}, classFilter: (objectClass=org.openhab.core.io.monitor.MeterRegistryProvider), initialReferenceFilter (objectClass=org.openhab.core.io.monitor.MeterRegistryProvider)
07:04:53.358 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : dm MeterRegistryProvider tracker reset (closed)
07:04:53.361 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : dm MeterRegistryProvider tracking 1 SingleStatic added {org.openhab.core.io.monitor.MeterRegistryProvider}={service.id=335, service.bundleid=174, service.scope=bundle, component.name=org.openhab.core.io.monitor.internal.DefaultMetricsRegistration, component.id=76} (enter)
07:04:53.370 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : dm MeterRegistryProvider tracking 1 SingleStatic active: false trackerOpened: false optional: false
07:04:53.372 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : dm MeterRegistryProvider tracking 1 SingleStatic added {org.openhab.core.io.monitor.MeterRegistryProvider}={service.id=335, service.bundleid=174, service.scope=bundle, component.name=org.openhab.core.io.monitor.internal.DefaultMetricsRegistration, component.id=76} (exit)
07:04:53.384 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : dm MeterRegistryProvider tracker opened
07:04:53.386 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : registering service listener for dependency MeterRegistryProvider
07:04:53.394 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : No change in target property for dependency metrics: currently registered: false
07:04:53.396 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] :  No existing service listener to unregister for dependency metrics
07:04:53.407 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Setting target property for dependency metrics to null
07:04:53.419 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : New service tracker for metrics, initial active: false, previous references: {}, classFilter: (objectClass=org.openhab.io.metrics.MetricsRestController), initialReferenceFilter (objectClass=org.openhab.io.metrics.MetricsRestController)
07:04:53.421 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : dm metrics tracker reset (closed)
07:04:53.430 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : dm metrics tracking 2 SingleStatic added {org.openhab.io.metrics.MetricsRestController}={osgi.jaxrs.resource=true, service.id=588, service.bundleid=277, service.scope=bundle, osgi.jaxrs.application.select=(osgi.jaxrs.name=Metrics), osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), component.name=org.openhab.io.metrics.MetricsRestController, component.id=327} (enter)
07:04:53.437 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : dm metrics tracking 2 SingleStatic active: false trackerOpened: false optional: false
07:04:53.446 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : dm metrics tracking 2 SingleStatic added {org.openhab.io.metrics.MetricsRestController}={osgi.jaxrs.resource=true, service.id=588, service.bundleid=277, service.scope=bundle, osgi.jaxrs.application.select=(osgi.jaxrs.name=Metrics), osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), component.name=org.openhab.io.metrics.MetricsRestController, component.id=327} (exit)
07:04:53.453 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : dm metrics tracker opened
07:04:53.459 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : registering service listener for dependency metrics
07:04:53.465 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Changed state from disabled to unsatisfiedReference
07:04:53.467 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Component enabled
07:04:53.474 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : ActivateInternal
07:04:53.482 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Querying state unsatisfiedReference
07:04:53.484 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Querying state unsatisfiedReference
07:04:53.494 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Activating component from state unsatisfiedReference
07:04:53.505 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Querying state unsatisfiedReference
07:04:53.510 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Querying state unsatisfiedReference
07:04:53.513 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Changed state from unsatisfiedReference to satisfied
07:04:53.516 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : registration change queue [registered]
07:04:53.524 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Checking constructor public org.openhab.io.metrics.MetricsService()
07:04:53.526 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Found constructor with 0 arguments : public org.openhab.io.metrics.MetricsService()
07:04:53.530 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : getting bind: setMeterRegistryProvider
07:04:53.536 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Locating method setMeterRegistryProvider in class org.openhab.io.metrics.MetricsService
07:04:53.541 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : doFindMethod: Looking for method org.openhab.io.metrics.MetricsService.setMeterRegistryProvider
07:04:53.544 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Declared Method org.openhab.io.metrics.MetricsService.setMeterRegistryProvider([interface org.osgi.framework.ServiceReference]) not found
07:04:53.546 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Declared Method org.openhab.io.metrics.MetricsService.setMeterRegistryProvider([interface org.osgi.service.component.ComponentServiceObjects]) not found
07:04:53.548 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : getReferenceClass: Looking for interface class org.openhab.core.io.monitor.MeterRegistryProvider through loader of org.openhab.io.metrics.MetricsService
07:04:53.562 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : getParameterClass: Found class org.openhab.core.io.monitor.MeterRegistryProvider
07:04:53.563 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : doFindMethod: No method taking ServiceReference found, checking method taking org.openhab.core.io.monitor.MeterRegistryProvider
07:04:53.565 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : doFindMethod: Found Method public void org.openhab.io.metrics.MetricsService.setMeterRegistryProvider(org.openhab.core.io.monitor.MeterRegistryProvider)
07:04:53.567 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Found bind method: public void org.openhab.io.metrics.MetricsService.setMeterRegistryProvider(org.openhab.core.io.monitor.MeterRegistryProvider)
07:04:53.570 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : getting field: metrics
07:04:53.574 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Locating field metrics in class org.openhab.io.metrics.MetricsService
07:04:53.578 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : getReferenceClass: Looking for interface class org.openhab.io.metrics.MetricsRestController through loader of org.openhab.io.metrics.MetricsService
07:04:53.586 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : getParameterClass: Found class org.openhab.io.metrics.MetricsRestController
07:04:53.591 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Found field: protected org.openhab.io.metrics.MetricsRestController org.openhab.io.metrics.MetricsService.metrics
07:04:53.597 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : This thread collected dependencies
07:04:53.602 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : getService (single component manager) dependencies collected.
07:04:53.608 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Querying state satisfied
07:04:53.610 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Querying state satisfied
07:04:53.612 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : For dependency MeterRegistryProvider, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.io.monitor.MeterRegistryProvider}={service.id=335, service.bundleid=174, service.scope=bundle, component.name=org.openhab.core.io.monitor.internal.DefaultMetricsRegistration, component.id=76}] service: [org.openhab.core.io.monitor.internal.DefaultMetricsRegistration@594f9e75]]]
07:04:53.614 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : For dependency metrics, optional: false; to bind: [[RefPair: ref: [{org.openhab.io.metrics.MetricsRestController}={osgi.jaxrs.resource=true, service.id=588, service.bundleid=277, service.scope=bundle, osgi.jaxrs.application.select=(osgi.jaxrs.name=Metrics), osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), component.name=org.openhab.io.metrics.MetricsRestController, component.id=327}] service: [org.openhab.io.metrics.MetricsRestController@4c04b4f6]]]
07:04:53.616 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : invoking bind: setMeterRegistryProvider: parameters [org.openhab.core.io.monitor.internal.DefaultMetricsRegistration]
07:04:53.619 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : invoked bind: setMeterRegistryProvider
07:04:53.621 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : getting activate: activate
07:04:53.622 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Locating method activate in class org.openhab.io.metrics.MetricsService
07:04:53.625 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Declared Method org.openhab.io.metrics.MetricsService.activate([interface org.osgi.service.component.ComponentContext]) not found
07:04:53.628 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Found activate method: protected void org.openhab.io.metrics.MetricsService.activate(java.util.Map)
07:04:53.631 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : invoking activate: activate: parameters [org.apache.felix.scr.impl.helper.ReadOnlyDictionary]
07:04:54.062 [INFO ] [org.openhab.io.metrics.MetricsService] - Metrics service available under /metrics.
07:04:54.073 [DEBUG] [org.openhab.io.metrics.MetricsService] - Configuration: MetricsConfiguration{influxMetricsEnabled=false, influxURL='http://localhost:8086', influxDB='openhab', influxPassword='null', influxUsername='null', influxUpdateIntervalInSeconds=300}
07:04:54.075 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : invoked activate: activate
07:04:54.077 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Set implementation object for component
07:04:54.079 [DEBUG] [org.openhab.io.metrics.MetricsService] - bundle org.openhab.io.metrics:3.1.0.202104301725 (277)[org.openhab.io.metrics.MetricsService(328)] : Changed state from satisfied to active

Possible Solution

no idea...

Steps to Reproduce (for Bugs)

  1. install io.metrics

Context

also observed here, but unrelated to the thread: https://community.openhab.org/t/oh-3-1-snapshot-2354-error-downloading-mvn-com-zsmartsystems-zigbee-com-zsmartsystems-zigbee-console-telegesis-1-3-10/121559/14?u=moritz29

Your Environment

openHAB in Docker, 3.1.0 M4 and Snapshot Build 2361 tested

If there is anything I can do to help track down the issue further, I'm happy to help!

@moritzj29 moritzj29 added the bug An unexpected problem or unintended behavior of an add-on label May 3, 2021
@pravussum
Copy link
Contributor

Hey @moritzj29, thanks for reporting that. I can confirm the behavior, with some slight differences:

  • the Main UI didn't "disappear" for me, but the REST API definitely broke
  • after restarting both the REST API as well as the Prometheus metrics endpoint worked (still got data under /metrics/prometheus) - but the Metrics Service didn't show up in the Main UI anymore, just as you reported

pravussum pushed a commit to pravussum/openhab-addons that referenced this issue May 3, 2021
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
pravussum pushed a commit to pravussum/openhab-addons that referenced this issue May 4, 2021
…of the single metric resource (Prometheus) openhab#10640

Signed-off-by: Robert Bach <openhab@mortalsilence.net>
kaikreuzer pushed a commit that referenced this issue May 4, 2021
* [io.metrics] Fix MetricsService breaking REST API #10640

Signed-off-by: Robert Bach <openhab@mortalsilence.net>
@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/openhab-3-1-milestone-discussion/116025/155

themillhousegroup pushed a commit to themillhousegroup/openhab2-addons that referenced this issue May 10, 2021
…hab#10644)

* [io.metrics] Fix MetricsService breaking REST API openhab#10640

Signed-off-by: Robert Bach <openhab@mortalsilence.net>
Signed-off-by: John Marshall <john.marshall.au@gmail.com>
computergeek1507 pushed a commit to computergeek1507/openhab-addons that referenced this issue Jul 13, 2021
…hab#10644)

* [io.metrics] Fix MetricsService breaking REST API openhab#10640

Signed-off-by: Robert Bach <openhab@mortalsilence.net>
frederictobiasc pushed a commit to frederictobiasc/openhab-addons that referenced this issue Oct 26, 2021
…hab#10644)

* [io.metrics] Fix MetricsService breaking REST API openhab#10640

Signed-off-by: Robert Bach <openhab@mortalsilence.net>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this issue Nov 7, 2021
…hab#10644)

* [io.metrics] Fix MetricsService breaking REST API openhab#10640

Signed-off-by: Robert Bach <openhab@mortalsilence.net>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this issue May 5, 2022
…hab#10644)

* [io.metrics] Fix MetricsService breaking REST API openhab#10640

Signed-off-by: Robert Bach <openhab@mortalsilence.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants