Quantcast
Channel: Kafka Timeline
Viewing all articles
Browse latest Browse all 1519

question about jmxtrans to get kafka metrics

$
0
0
Hi, All

I installed jmxtrans and graphite, wish to be able to graph stuff from
kafka, but firstly I start the jmxtrans and getting such errors, (I use the
example graphite json).

./jmxtrans.sh start graphite.json

[07 Jan 2015 17:55:58] [ServerScheduler_Worker-4] 180214 DEBUG
(com.googlecode.jmxtrans.jobs.ServerJob:31) - +++++ Started server job:
Server [host=w2, port=1099,
url=service:jmx:rmi:///jndi/rmi://w2:1099/jmxrmi, cronExpression=null,
numQueryThreads=null]
[07 Jan 2015 17:55:58] [ServerScheduler_Worker-4] 180217 ERROR
(com.googlecode.jmxtrans.jobs.ServerJob:39) - Error
java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.ConfigurationException [Root exception is
java.rmi.UnknownHostException: Unknown host: w2; nested exception is:
java.net.UnknownHostException: w2]
at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:369)
at
javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268)
at
com.googlecode.jmxtrans.util.JmxUtils.getServerConnection(JmxUtils.java:351)
at
com.googlecode.jmxtrans.util.JmxConnectionFactory.makeObject(JmxConnectionFactory.java:31)
at
org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1212)
at com.googlecode.jmxtrans.jobs.ServerJob.execute(ServerJob.java:36)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: javax.naming.ConfigurationException [Root exception is
java.rmi.UnknownHostException: Unknown host: w2; nested exception is:
java.net.UnknownHostException: w2]
at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:118)
at
com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:203)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at
javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1929)
at
javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1896)
at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:286)
... 7 more
Caused by: java.rmi.UnknownHostException: Unknown host: w2; nested
exception is:
java.net.UnknownHostException: w2
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:616)
at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:114)
... 12 more
Caused by: java.net.UnknownHostException: w2
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
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
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:147)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 17 more

The graphite.json

"servers" : [ {
"port" : "1099",
"host" : "w2",
"queries" : [ {
"obj" : "java.lang:type=Memory",
"attr" : [ "HeapMemoryUsage", "NonHeapMemoryUsage" ],
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
"settings" : {
"port" : 2003,
"host" : "10.100.70.128"

} ]
} ]
} ]

Anyone help me to diagnose what this problem is?

thanks

Alec Li

Viewing all articles
Browse latest Browse all 1519

Trending Articles