Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60571

Prometheus Metrics Plugin installed failed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • prometheus-plugin
    • Jenkins 2.176.2
      Prometheus metrics plugin 2.0.6

      plugging installed failed.

      create jenkins as a deployment in namespace kubesphere.

      install Prometheus Metrics Plugin with following error log

      ```

      WARNING: Failed to instantiate Key[type=org.jenkinsci.plugins.prometheus.service.PrometheusAsyncWorker, annotation=[none]]; skipping this componentWARNING: Failed to instantiate Key[type=org.jenkinsci.plugins.prometheus.service.PrometheusAsyncWorker, annotation=[none]]; skipping this componentcom.google.inject.ProvisionException: Unable to provision, see the following errors:
      1) Error injecting constructor, java.lang.IllegalArgumentException: Invalid metric name: kubesphere-devops-system_jenkins_builds_duration_milliseconds_summary  at org.jenkinsci.plugins.prometheus.service.DefaultPrometheusMetrics.<init>(DefaultPrometheusMetrics.java:24)  while locating org.jenkinsci.plugins.prometheus.service.DefaultPrometheusMetrics  at org.jenkinsci.plugins.prometheus.context.Context.configure(Context.java:13)  while locating org.jenkinsci.plugins.prometheus.service.PrometheusMetrics    for parameter 0 at org.jenkinsci.plugins.prometheus.service.PrometheusAsyncWorker.setPrometheusMetrics(PrometheusAsyncWorker.java:26)
      1 error at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:439) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012) at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:401) at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:392) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:339) at hudson.ExtensionList.load(ExtensionList.java:381) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:317) at hudson.ExtensionList.iterator(ExtensionList.java:172) at hudson.ExtensionList.get(ExtensionList.java:149) at jenkins.metrics.api.Metrics$HealthCheckMetricsProvider.getMetricSet(Metrics.java:359) at jenkins.metrics.api.MetricProviderListener.onChange(MetricProviderListener.java:91) at jenkins.metrics.api.MetricProviderListener.attach(MetricProviderListener.java:77) at jenkins.metrics.api.Metrics.afterExtensionsAugmented(Metrics.java:313) 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 hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104) at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296) at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)Caused by: java.lang.IllegalArgumentException: Invalid metric name: kubesphere-devops-system_jenkins_builds_duration_milliseconds_summary at io.prometheus.client.Collector.checkMetricName(Collector.java:182) at io.prometheus.client.SimpleCollector.<init>(SimpleCollector.java:164) at io.prometheus.client.Summary.<init>(Summary.java:88) at io.prometheus.client.Summary$Builder.create(Summary.java:136) at org.jenkinsci.plugins.prometheus.JobCollector.collect(JobCollector.java:79) at io.prometheus.client.CollectorRegistry.collectorNames(CollectorRegistry.java:100) at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:50) at org.jenkinsci.plugins.prometheus.service.DefaultPrometheusMetrics.<init>(DefaultPrometheusMetrics.java:26) at org.jenkinsci.plugins.prometheus.service.DefaultPrometheusMetrics$$FastClassByGuice$$af5295cb.newInstance(<generated>) at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105) at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32) at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115) at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:566) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126) at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267) at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38) at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62) at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:84) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114) at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32) at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115) at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:566) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126) at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ... 30 more
      Dec 23, 2019 4:34:46 AM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 errorWARNING: Failed to instantiate Key[type=org.jenkinsci.plugins.prometheus.rest.PrometheusAction, annotation=[none]]; skipping this componentcom.google.inject.ProvisionException: Unable to provision, see the following errors:
      1) Error injecting constructor, java.lang.IllegalArgumentException: Invalid metric name: kubesphere-devops-system_jenkins_builds_duration_milliseconds_summary  at org.jenkinsci.plugins.prometheus.service.DefaultPrometheusMetrics.<init>(DefaultPrometheusMetrics.java:24)  while locating org.jenkinsci.plugins.prometheus.service.DefaultPrometheusMetrics  at org.jenkinsci.plugins.prometheus.context.Context.configure(Context.java:13)  while locating org.jenkinsci.plugins.prometheus.service.PrometheusMetrics    for parameter 0 at org.jenkinsci.plugins.prometheus.rest.PrometheusAction.setPrometheusMetrics(PrometheusAction.java:23)
      1 error at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:439) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012) at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:401) at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:392) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:339) at hudson.ExtensionList.load(ExtensionList.java:381) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:317) at hudson.ExtensionList.iterator(ExtensionList.java:172) at hudson.ExtensionList.get(ExtensionList.java:149) at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.get(ScriptApproval.java:100) at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApprovalLink.getUrlName(ScriptApprovalLink.java:45) at io.jenkins.plugins.casc.RootElementConfigurator.all(RootElementConfigurator.java:30) at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:656) at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:702) at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:686) at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:585) at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:280) at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java: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 hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104) at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296) at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)Caused by: java.lang.IllegalArgumentException: Invalid metric name: kubesphere-devops-system_jenkins_builds_duration_milliseconds_summary at io.prometheus.client.Collector.checkMetricName(Collector.java:182) at io.prometheus.client.SimpleCollector.<init>(SimpleCollector.java:164) at io.prometheus.client.Summary.<init>(Summary.java:88) at io.prometheus.client.Summary$Builder.create(Summary.java:136) at org.jenkinsci.plugins.prometheus.JobCollector.collect(JobCollector.java:79) at io.prometheus.client.CollectorRegistry.collectorNames(CollectorRegistry.java:100) at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:50) at org.jenkinsci.plugins.prometheus.service.DefaultPrometheusMetrics.<init>(DefaultPrometheusMetrics.java:26) at org.jenkinsci.plugins.prometheus.service.DefaultPrometheusMetrics$$FastClassByGuice$$af5295cb.newInstance(<generated>) at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105) at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32) at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115) at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:566) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126) at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267) at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38) at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62) at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:84) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114) at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32) at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115) at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:566) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126) at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ... 35 more
      Dec 23, 2019 4:34:50 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh

      ```

            jequals5 Marky Jackson
            zhuxiaoyang zhu xiaoyang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: