0

I am new to jmxtrans

I used this blog to setup jmxtrans monitoring for kafka: http://blogs.impetus.com/big_data/big_data_technologies/kafka-monitoring-using-jmx-jmxtrans.do

But I get the below error. At the very bottom is my json file

[

20 Nov 2013 09:44:18] [ServerScheduler_Worker-6] 300560 DEBUG (com.googlecode.jmxtrans.util.JmxUtils:102) - ----- Creating 1 query threads
[20 Nov 2013 09:44:18] [pool-6-thread-1] 300573 DEBUG (com.googlecode.jmxtrans.util.JmxUtils:195) - Executing queryName: kafka:type=kafka.SocketServerStats from query: Query [obj=kafka:type=kafka.SocketServerStats, resultAlias=kafka.socketServerStats, attr=[AvgFetchRequestMs, AvgProduceRequestMs, BytesReadPerSecond, BytesWrittenPerSecond, FetchRequestsPerSecond, MaxFetchRequestMs, MaxProduceRequestMs, NumFetchRequests, NumProduceRequests, ProduceRequestsPerSecond, TotalBytesRead, TotalBytesWritten, TotalFetchRequestMs, TotalProduceRequestMs]]
[20 Nov 2013 09:44:21] [pool-5-thread-1] 303976 ERROR (com.googlecode.jmxtrans.util.JmxUtils$ProcessQueryThread:163) - Error executing query
java.net.ConnectException: Connection timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:579)
    at java.net.Socket.connect(Socket.java:528)
    at java.net.Socket.<init>(Socket.java:425)
    at java.net.Socket.<init>(Socket.java:208)
    at com.googlecode.jmxtrans.util.SocketFactory.makeObject(SocketFactory.java:28)
    at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1212)
    at com.googlecode.jmxtrans.model.output.GraphiteWriter.doWrite(GraphiteWriter.java:105)
    at com.googlecode.jmxtrans.util.JmxUtils.runOutputWritersForQuery(JmxUtils.java:336)
    at com.googlecode.jmxtrans.util.JmxUtils.processQuery(JmxUtils.java:206)
    at com.googlecode.jmxtrans.util.JmxUtils$ProcessQueryThread.run(JmxUtils.java:161)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)
[20 Nov 2013 09:44:21] [ServerScheduler_Worker-5] 303989 DEBUG (com.googlecode.jmxtrans.jobs.ServerJob:50) - +++++ Finished server job: Server [host=127.0.0.1, port=9999, url=service:jmx:rmi:///jndi/rmi://127.0.0.1:9999/jmxrmi, cronExpression=null, numQueryThreads=2]


{
  "servers" : [ {
    "host" : "127.0.0.1",
    "port" : "9999",
    "alias" : "<%=node.name%>",
    "queries" : [
 {
         "obj" : "kafka:type=kafka.SocketServerStats",
          "resultAlias": "kafka.socketServerStats",
          "attr" : [ "AvgFetchRequestMs", "AvgProduceRequestMs", "BytesReadPerSecond", "BytesWrittenPerSecond", "FetchRequestsPerSecond", "MaxFetchRequestMs", "MaxProduceRequestMs" , "NumFetchRequests" , "NumProduceRequests" , "ProduceRequestsPerSecond", "TotalBytesRead", "TotalBytesWritten", "TotalFetchRequestMs", "TotalProduceRequestMs" ],
     "outputWriters" : [ {
          "@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
          "settings" : {
            "host" : "<%=@monitor_host%>",
            "port" : "2003"
          }
        } ]
      }
    ],
    "numQueryThreads": "2"
  } ]
}
Tampa
  • 75,446
  • 119
  • 278
  • 425
  • the exception says you have a connection error, so check your connection parameters and make sure that there are no other parties involved like firewall or anything else which might prevent the connection. But I'm not an expert here though – mamdouh alramadan Nov 20 '13 at 03:26
  • Could you explain the NW topology in a greater detail. What do you mean by "kafka is on local host"? – erbdex Nov 20 '13 at 05:09

0 Answers0