我有这个配置文件
{
"servers": [
{
"url": "service:jmx:rmi:///jndi/rmi://192.168.167.166:6000/jmxrmi ",
"alias": "infinispan",
"username":"admin",
"password": "admin",
"queries": [
{
"obj": "java.lang:type=Memory",
"attr": [
"HeapMemoryUsage",
"NonHeapMemoryUsage"
],
"outputWriters": [
{
"@class": "com.googlecode.jmxtrans.model.output.GraphiteWriterFactory",
"port": 2003,
"host": "127.0.0.1",
"typeNames": [
"name"
]
}
]
}
],
"numQueryThreads": 2
}
]
}
石墨在本地主机上运行,当我与 jconsole 连接时,它可以正常连接并显示指标。
我从 /jmxtrans-jmxtrans-parent-260/jmxtrans 文件夹中运行“./jmxtrans.sh start infinispan.json”。
在 jmxtrans.log 文件中,我不断收到此异常:
[13 Dec 2016 09:27:04] [Stormpot-pool-3-thread-1] 2448 ERROR (com.googlecode.jmxtrans.model.output.support.pool.RetryingAllocator$1:77) - Error allocating slot
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.googlecode.jmxtrans.model.output.support.pool.SocketAllocator.allocate(SocketAllocator.java:61)
at com.googlecode.jmxtrans.model.output.support.pool.SocketAllocator.allocate(SocketAllocator.java:37)
at com.googlecode.jmxtrans.model.output.support.pool.RetryingAllocator$2.call(RetryingAllocator.java:89)
at com.googlecode.jmxtrans.model.output.support.pool.RetryingAllocator$2.call(RetryingAllocator.java:86)
at com.github.rholder.retry.AttemptTimeLimiters$NoAttemptTimeLimit.call(AttemptTimeLimiters.java:78)
at com.github.rholder.retry.Retryer.call(Retryer.java:160)
at com.googlecode.jmxtrans.model.output.support.pool.RetryingAllocator.allocate(RetryingAllocator.java:86)
at stormpot.ReallocatingAdaptor.allocate(ReallocatingAdaptor.java:37)
at stormpot.BAllocThread.alloc(BAllocThread.java:225)
at stormpot.BAllocThread.increaseSizeByAllocating(BAllocThread.java:131)
at stormpot.BAllocThread.replenishPool(BAllocThread.java:106)
at stormpot.BAllocThread.continuouslyReplenishPool(BAllocThread.java:88)
at stormpot.BAllocThread.run(BAllocThread.java:80)
at java.lang.Thread.run(Thread.java:745)