javax.management.InstanceAlreadyExistsException: cluster1-metrics:name=read-timeouts

DataStax JIRA | Flavian Alexandru | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The phantom scala driver wraps the {{ClusterBuilder}} to produce a final version of a cluster that generates the end session. The link in question is [here|https://github.com/websudos/phantom/blob/develop/phantom-connectors/src/main/scala/com/websudos/phantom/connectors/DefaultSessionProvider.scala#L34], where the final cluster produced is produced with a function from {{ClusterBuilder => ClusterBuilder}} which allows the user to provide their own options, after which we are as an expertiment actively forcing {{.withoutJMXReporting().withoutMetrics()}} on the final builder object. Even with this forced behaviour, the following still occurs: {code} 15:17:12.137 [pool-26-thread-1] DEBUG com.codahale.metrics.JmxReporter - Unable to register counter javax.management.InstanceAlreadyExistsException: cluster1-metrics:name=read-timeouts at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437) ~[na:1.8.0_60] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898) ~[na:1.8.0_60] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966) ~[na:1.8.0_60] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900) ~[na:1.8.0_60] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324) ~[na:1.8.0_60] at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) ~[na:1.8.0_60] at com.codahale.metrics.JmxReporter$JmxListener.onCounterAdded(JmxReporter.java:522) ~[metrics-core-3.0.2.jar:3.0.2] at com.codahale.metrics.MetricRegistry.notifyListenerOfAddedMetric(MetricRegistry.java:346) [metrics-core-3.0.2.jar:3.0.2] at com.codahale.metrics.MetricRegistry.addListener(MetricRegistry.java:187) [metrics-core-3.0.2.jar:3.0.2] at com.codahale.metrics.JmxReporter.start(JmxReporter.java:697) [metrics-core-3.0.2.jar:3.0.2] at com.datastax.driver.core.Metrics.<init>(Metrics.java:114) [cassandra-driver-core-2.2.0-rc3.jar:na] at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1250) [cassandra-driver-core-2.2.0-rc3.jar:na] at com.datastax.driver.core.Cluster.init(Cluster.java:158) [cassandra-driver-core-2.2.0-rc3.jar:na] at com.datastax.driver.core.Cluster.connect(Cluster.java:248) [cassandra-driver-core-2.2.0-rc3.jar:na] at com.websudos.phantom.connectors.DefaultSessionProvider$$anonfun$1.apply(DefaultSessionProvider.scala:56) [phantom-connectors_2.11-1.15.0.jar:1.15.0] at com.websudos.phantom.connectors.DefaultSessionProvider$$anonfun$1.apply(DefaultSessionProvider.scala:56) [phantom-connectors_2.11-1.15.0.jar:1.15.0] at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53) [scala-library-2.11.7.jar:na] at scala.concurrent.package$.blocking(package.scala:123) [scala-library-2.11.7.jar:na] at com.websudos.phantom.connectors.DefaultSessionProvider.createSession(DefaultSessionProvider.scala:55) [phantom-connectors_2.11-1.15.0.jar:1.15.0] at com.websudos.phantom.connectors.DefaultSessionProvider.<init>(DefaultSessionProvider.scala:62) [phantom-connectors_2.11-1.15.0.jar:1.15.0] at com.websudos.phantom.connectors.KeySpaceDef.<init>(Keyspace.scala:63) [phantom-connectors_2.11-1.15.0.jar:1.15.0] at com.websudos.phantom.connectors.KeySpaceBuilder.keySpace(KeySpaceBuilder.scala:39) [phantom-connectors_2.11-1.15.0.jar:1.15.0] {code} Why are metrics settings completely disregarded by the builder? Shouldn't they be disabled at this point? This seems to be a new issue found in {{2.2.0-rc3}}

    DataStax JIRA | 1 year ago | Flavian Alexandru
    javax.management.InstanceAlreadyExistsException: cluster1-metrics:name=read-timeouts
  2. 0

    The phantom scala driver wraps the {{ClusterBuilder}} to produce a final version of a cluster that generates the end session. The link in question is [here|https://github.com/websudos/phantom/blob/develop/phantom-connectors/src/main/scala/com/websudos/phantom/connectors/DefaultSessionProvider.scala#L34], where the final cluster produced is produced with a function from {{ClusterBuilder => ClusterBuilder}} which allows the user to provide their own options, after which we are as an expertiment actively forcing {{.withoutJMXReporting().withoutMetrics()}} on the final builder object. Even with this forced behaviour, the following still occurs: {code} 15:17:12.137 [pool-26-thread-1] DEBUG com.codahale.metrics.JmxReporter - Unable to register counter javax.management.InstanceAlreadyExistsException: cluster1-metrics:name=read-timeouts at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437) ~[na:1.8.0_60] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898) ~[na:1.8.0_60] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966) ~[na:1.8.0_60] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900) ~[na:1.8.0_60] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324) ~[na:1.8.0_60] at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) ~[na:1.8.0_60] at com.codahale.metrics.JmxReporter$JmxListener.onCounterAdded(JmxReporter.java:522) ~[metrics-core-3.0.2.jar:3.0.2] at com.codahale.metrics.MetricRegistry.notifyListenerOfAddedMetric(MetricRegistry.java:346) [metrics-core-3.0.2.jar:3.0.2] at com.codahale.metrics.MetricRegistry.addListener(MetricRegistry.java:187) [metrics-core-3.0.2.jar:3.0.2] at com.codahale.metrics.JmxReporter.start(JmxReporter.java:697) [metrics-core-3.0.2.jar:3.0.2] at com.datastax.driver.core.Metrics.<init>(Metrics.java:114) [cassandra-driver-core-2.2.0-rc3.jar:na] at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1250) [cassandra-driver-core-2.2.0-rc3.jar:na] at com.datastax.driver.core.Cluster.init(Cluster.java:158) [cassandra-driver-core-2.2.0-rc3.jar:na] at com.datastax.driver.core.Cluster.connect(Cluster.java:248) [cassandra-driver-core-2.2.0-rc3.jar:na] at com.websudos.phantom.connectors.DefaultSessionProvider$$anonfun$1.apply(DefaultSessionProvider.scala:56) [phantom-connectors_2.11-1.15.0.jar:1.15.0] at com.websudos.phantom.connectors.DefaultSessionProvider$$anonfun$1.apply(DefaultSessionProvider.scala:56) [phantom-connectors_2.11-1.15.0.jar:1.15.0] at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53) [scala-library-2.11.7.jar:na] at scala.concurrent.package$.blocking(package.scala:123) [scala-library-2.11.7.jar:na] at com.websudos.phantom.connectors.DefaultSessionProvider.createSession(DefaultSessionProvider.scala:55) [phantom-connectors_2.11-1.15.0.jar:1.15.0] at com.websudos.phantom.connectors.DefaultSessionProvider.<init>(DefaultSessionProvider.scala:62) [phantom-connectors_2.11-1.15.0.jar:1.15.0] at com.websudos.phantom.connectors.KeySpaceDef.<init>(Keyspace.scala:63) [phantom-connectors_2.11-1.15.0.jar:1.15.0] at com.websudos.phantom.connectors.KeySpaceBuilder.keySpace(KeySpaceBuilder.scala:39) [phantom-connectors_2.11-1.15.0.jar:1.15.0] {code} Why are metrics settings completely disregarded by the builder? Shouldn't they be disabled at this point? This seems to be a new issue found in {{2.2.0-rc3}}

    DataStax JIRA | 1 year ago | Flavian Alexandru
    javax.management.InstanceAlreadyExistsException: cluster1-metrics:name=read-timeouts
  3. 0

    jmx error while using cassandra driver in multiple wars deployed in same jvm

    Stack Overflow | 2 years ago | Bharath
    javax.management.InstanceAlreadyExistsException: cluster1-metrics:name=open-connections
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 114#242338166

    GitHub | 6 months ago | gquintana
    javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info,id=logstash
  6. 0

    Getting exception while refreshing Spring ApplicationContext in Spring Boot application

    Stack Overflow | 2 years ago | user1514499
    org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [org.springframework.integration.monitor.IntegrationMBeanExporter@16c5464] with key 'integrationMbeanExporter'; nested exception is javax.management.InstanceAlreadyExistsException: org.springframework.integration.monitor:name=integrationMbeanExporter,type=IntegrationMBeanExporter
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. javax.management.InstanceAlreadyExistsException

    cluster1-metrics:name=read-timeouts

    at com.sun.jmx.mbeanserver.Repository.addMBean()
  2. Java RT
    JmxMBeanServer.registerMBean
    1. com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)[na:1.8.0_60]
    2. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)[na:1.8.0_60]
    3. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)[na:1.8.0_60]
    4. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)[na:1.8.0_60]
    5. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)[na:1.8.0_60]
    6. com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)[na:1.8.0_60]
    6 frames
  3. Metrics Core
    JmxReporter.start
    1. com.codahale.metrics.JmxReporter$JmxListener.onCounterAdded(JmxReporter.java:522)[metrics-core-3.0.2.jar:3.0.2]
    2. com.codahale.metrics.MetricRegistry.notifyListenerOfAddedMetric(MetricRegistry.java:346)[metrics-core-3.0.2.jar:3.0.2]
    3. com.codahale.metrics.MetricRegistry.addListener(MetricRegistry.java:187)[metrics-core-3.0.2.jar:3.0.2]
    4. com.codahale.metrics.JmxReporter.start(JmxReporter.java:697)[metrics-core-3.0.2.jar:3.0.2]
    4 frames
  4. DataStax Java Driver for Apache Cassandra - Core
    Cluster.connect
    1. com.datastax.driver.core.Metrics.<init>(Metrics.java:114)[cassandra-driver-core-2.2.0-rc3.jar:na]
    2. com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1250)[cassandra-driver-core-2.2.0-rc3.jar:na]
    3. com.datastax.driver.core.Cluster.init(Cluster.java:158)[cassandra-driver-core-2.2.0-rc3.jar:na]
    4. com.datastax.driver.core.Cluster.connect(Cluster.java:248)[cassandra-driver-core-2.2.0-rc3.jar:na]
    4 frames
  5. com.websudos.phantom
    DefaultSessionProvider$$anonfun$1.apply
    1. com.websudos.phantom.connectors.DefaultSessionProvider$$anonfun$1.apply(DefaultSessionProvider.scala:56)[phantom-connectors_2.11-1.15.0.jar:1.15.0]
    2. com.websudos.phantom.connectors.DefaultSessionProvider$$anonfun$1.apply(DefaultSessionProvider.scala:56)[phantom-connectors_2.11-1.15.0.jar:1.15.0]
    2 frames
  6. Scala
    package$.blocking
    1. scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)[scala-library-2.11.7.jar:na]
    2. scala.concurrent.package$.blocking(package.scala:123)[scala-library-2.11.7.jar:na]
    2 frames
  7. com.websudos.phantom
    KeySpaceBuilder.keySpace
    1. com.websudos.phantom.connectors.DefaultSessionProvider.createSession(DefaultSessionProvider.scala:55)[phantom-connectors_2.11-1.15.0.jar:1.15.0]
    2. com.websudos.phantom.connectors.DefaultSessionProvider.<init>(DefaultSessionProvider.scala:62)[phantom-connectors_2.11-1.15.0.jar:1.15.0]
    3. com.websudos.phantom.connectors.KeySpaceDef.<init>(Keyspace.scala:63)[phantom-connectors_2.11-1.15.0.jar:1.15.0]
    4. com.websudos.phantom.connectors.KeySpaceBuilder.keySpace(KeySpaceBuilder.scala:39)[phantom-connectors_2.11-1.15.0.jar:1.15.0]
    4 frames