Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13441

Metrics endpoint is broken

XMLWordPrintable

      Attempt to retrieve metrics from metrics endpoint results in Internal server error. Server seems to have issue initializing metrics on startup:

      $ curl -i --digest -u admin:admin http://localhost:11222/metrics
      HTTP/1.1 401 Unauthorized
      WWW-Authenticate: Digest realm="default", nonce="AAAAAQAAB/M2ox6HWnoSeosyc+uL6TT/goVKalEKmxSQqgo2sRUjFCo1JC4=", opaque="00000000000000000000000000000000", algorithm=MD5, qop=auth
      content-length: 0
      
      HTTP/1.1 500 Internal Server Error
      content-length: 0
      

      Server debug stacktrace:

      11:55:30,194 DEBUG (ForkJoinPool.commonPool-worker-3) [org.infinispan.rest.resources.MetricsResource] Failed to initialize base and vendor metrics from platform's JMX MBeans java.lang.IllegalArgumentException: SRMET00009: Gauge with id MetricID{name='classloader.loadedClasses.count', tags=[]} already exists
      	at io.smallrye.metrics.MetricsRegistryImpl.register(MetricsRegistryImpl.java:124)
      	at io.smallrye.metrics.setup.JmxRegistrar.register(JmxRegistrar.java:74)
      	at io.smallrye.metrics.setup.JmxRegistrar.register(JmxRegistrar.java:58)
      	at io.smallrye.metrics.setup.JmxRegistrar.init(JmxRegistrar.java:50)
      	at org.infinispan.rest.resources.MetricsResource.registerBaseMetrics(MetricsResource.java:57)
      	at org.infinispan.rest.resources.MetricsResource.<init>(MetricsResource.java:51)
      	at org.infinispan.rest.RestServer.startInternal(RestServer.java:132)
      	at org.infinispan.server.core.AbstractProtocolServer.start(AbstractProtocolServer.java:116)
      	at org.infinispan.server.SecurityActions.lambda$startProtocolServer$3(SecurityActions.java:88)
      	at org.infinispan.security.Security.doPrivileged(Security.java:56)
      	at org.infinispan.server.SecurityActions.doPrivileged(SecurityActions.java:40)
      	at org.infinispan.server.SecurityActions.startProtocolServer(SecurityActions.java:87)
      	at org.infinispan.server.Server.lambda$run$3(Server.java:432)
      	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
      	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
      	at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
      	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
      	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
      	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
      	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
      	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
      	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
      

              ttarrant@redhat.com Tristan Tarrant
              pdrobek@redhat.com Pavel Drobek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: