<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Error in Kafka startup with the JMX exporter - java.lang.IllegalArgumentException: Collector already registered that provides name: jmx_scrape_duration_seconds in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Kafka-startup-with-the-JMX-exporter-java-lang/m-p/176548#M64435</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10969/mqureshi.html" nodeid="10969"&gt;@mqureshi, &lt;/A&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14128/nahumliran.html" nodeid="14128"&gt;@liran nahum&lt;/A&gt; - loopig you in, any ideas on this ? &lt;/P&gt;</description>
    <pubDate>Fri, 07 Jul 2017 07:58:10 GMT</pubDate>
    <dc:creator>karan_alang1</dc:creator>
    <dc:date>2017-07-07T07:58:10Z</dc:date>
    <item>
      <title>Error in Kafka startup with the JMX exporter - java.lang.IllegalArgumentException: Collector already registered that provides name: jmx_scrape_duration_seconds</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Kafka-startup-with-the-JMX-exporter-java-lang/m-p/176547#M64434</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to integrate Prometheus to collect Kafka metrics.&lt;/P&gt;&lt;P&gt;I'm getting error in starting up Kafka, with the JMX exporter passed as java agent.
Error is as shown below, any ideas ?&lt;/P&gt;&lt;P&gt;---------------------------------------------------&lt;/P&gt;&lt;P&gt;
[root@nwk2-bdp-kafka-06 kafka]# KAFKA_OPTS="$KAFKA_OPTS -javaagent:/usr/hdp/2.5.3.0-37/prometheus/jmx_prometheus_javaagent-0.9.jar=7071:/usr/hdp/2.5.3.0-37/prometheus/jmx_exporter.yaml" ./bin/kafka-server-start.sh config/server.properties 
2017-07-07 00:44:31.781:INFO:ipjsoejs.Server:jetty-8.y.z-SNAPSHOT
2017-07-07 00:44:31.866:INFO:ipjsoejs.AbstractConnector:Started &lt;A href="http://SelectChannelConnector@0.0.0.0:7071"&gt;SelectChannelConnector@0.0.0.0:7071&lt;/A&gt;
Exception in thread "main" java.lang.reflect.InvocationTargetException
  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 sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
  at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
&lt;STRONG&gt;Caused by: java.lang.IllegalArgumentException: Collector already registered that provides name: jmx_scrape_duration_seconds  at io.prometheus.jmx.shaded.io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:54)
  at io.prometheus.jmx.shaded.io.prometheus.client.Collector.register(Collector.java:128)
  at io.prometheus.jmx.shaded.io.prometheus.client.Collector.register(Collector.java:121)
  at io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:38)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 07:56:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Kafka-startup-with-the-JMX-exporter-java-lang/m-p/176547#M64434</guid>
      <dc:creator>karan_alang1</dc:creator>
      <dc:date>2017-07-07T07:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Kafka startup with the JMX exporter - java.lang.IllegalArgumentException: Collector already registered that provides name: jmx_scrape_duration_seconds</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Kafka-startup-with-the-JMX-exporter-java-lang/m-p/176548#M64435</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10969/mqureshi.html" nodeid="10969"&gt;@mqureshi, &lt;/A&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14128/nahumliran.html" nodeid="14128"&gt;@liran nahum&lt;/A&gt; - loopig you in, any ideas on this ? &lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 07:58:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Kafka-startup-with-the-JMX-exporter-java-lang/m-p/176548#M64435</guid>
      <dc:creator>karan_alang1</dc:creator>
      <dc:date>2017-07-07T07:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Kafka startup with the JMX exporter - java.lang.IllegalArgumentException: Collector already registered that provides name: jmx_scrape_duration_seconds</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Kafka-startup-with-the-JMX-exporter-java-lang/m-p/176549#M64436</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14047/karanalang.html" nodeid="14047"&gt;@Karan Alang&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have not done this but it seems like that collector is already there, at least by that name. Can you change the name and try it?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 10:55:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Kafka-startup-with-the-JMX-exporter-java-lang/m-p/176549#M64436</guid>
      <dc:creator>mqureshi</dc:creator>
      <dc:date>2017-07-07T10:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Kafka startup with the JMX exporter - java.lang.IllegalArgumentException: Collector already registered that provides name: jmx_scrape_duration_seconds</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Kafka-startup-with-the-JMX-exporter-java-lang/m-p/176550#M64437</link>
      <description>&lt;P&gt;this was fixed, there possibly seemed duplicate processes started, i killed all the services &amp;amp; restarted.&lt;/P&gt;&lt;P&gt;That fixed the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 03:31:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Kafka-startup-with-the-JMX-exporter-java-lang/m-p/176550#M64437</guid>
      <dc:creator>karan_alang1</dc:creator>
      <dc:date>2017-07-13T03:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Kafka startup with the JMX exporter - java.lang.IllegalArgumentException: Collector already registered that provides name: jmx_scrape_duration_seconds</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Kafka-startup-with-the-JMX-exporter-java-lang/m-p/176551#M64438</link>
      <description>&lt;P&gt;&lt;A href="https://community.cloudera.com/users/14047/karanalang.html"&gt;@Karan Alang&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It's probably because -javaagent config was loaded twice or more in env loading.&lt;/P&gt;&lt;P&gt;It happens when a variable is set like this in env config : KAFKA_OPT="$KAFKA_OPTS -java-agent:..." or JAVA_OPT="$JAVA_OPTS -java-agent:..."&lt;/P&gt;&lt;P&gt;And variable is loaded twice during startup.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 00:18:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Kafka-startup-with-the-JMX-exporter-java-lang/m-p/176551#M64438</guid>
      <dc:creator>b_rousseau</dc:creator>
      <dc:date>2018-01-15T00:18:04Z</dc:date>
    </item>
  </channel>
</rss>

