javax.management.InstanceAlreadyExistsException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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}}
    via by Flavian Alexandru,
  • 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}}
    via by Flavian Alexandru,
  • GitHub comment 114#242338166
    via GitHub by gquintana
    ,
  • GitHub comment 227#163426201
    via GitHub by TabberGit
    ,
    • 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]

    Users with the same issue

    batwalrus76
    1247 times, last one,
    Handemelindo
    3 times, last one,
    kjhdofjosvs
    3 times, last one,
    tvrmsmith
    2 times, last one,
    davidvanlaatum
    54 times, last one,
    24 more bugmates