When my cassandra node start i can see the address like this:
localnetwork/192.168.1.1
However when the new relic plugin start is not enable to connect because one of the nodes are without the slash. I also saw in the source code that you remove the slashs, why is that?
INFO: Using configuration file /opt/newrelic_plugin/newrelic_3legs_plugin-0.0.2/config/newrelic.properties
WARNING: Logging is not currently configured. Please add a config/logging.properties file to enable additional logging.
INFO: New Relic monitor started
starting poll cycle
getting ring hosts from discovery_host localnode
getting metrics for hosts [[192.168.1.3, localnetwork192.168.1.1, 192.168.1.2]]...
getting metrics for host [192.168.1.3]...
getting metrics for host [localnetwork192.168.1.1]...
ar.com.threelegs.newrelic.cassandra.jmx.ConnectionException: unable to connect to localnetwork192.168.1.1
at ar.com.threelegs.newrelic.cassandra.jmx.JMXHelper.run(Unknown Source)
at ar.com.threelegs.newrelic.cassandra.CassandraRing.pollCycle(Unknown Source)
at com.newrelic.metrics.publish.Runner$PollAgentsRunnable.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
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)
Caused by: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localnetwork192.168.1.1; nested exception is:
java.net.ConnectException: Connection refused]
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:358)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:227)
... 10 more
Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localnetwork192.168.1.1; nested exception is:
java.net.ConnectException: Connection refused]
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:1925)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1892)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:275)
... 12 more
Caused by: java.rmi.ConnectException: Connection refused to host: localnetwork192.168.1.1; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
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)
... 17 more
Caused by: java.net.ConnectException: Connection refused
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.(Socket.java:425)
at java.net.Socket.(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)
... 22 more
When my cassandra node start i can see the address like this: localnetwork/192.168.1.1
However when the new relic plugin start is not enable to connect because one of the nodes are without the slash. I also saw in the source code that you remove the slashs, why is that?
INFO: Using configuration file /opt/newrelic_plugin/newrelic_3legs_plugin-0.0.2/config/newrelic.properties WARNING: Logging is not currently configured. Please add a config/logging.properties file to enable additional logging. INFO: New Relic monitor started starting poll cycle getting ring hosts from discovery_host localnode getting metrics for hosts [[192.168.1.3, localnetwork192.168.1.1, 192.168.1.2]]... getting metrics for host [192.168.1.3]... getting metrics for host [localnetwork192.168.1.1]... ar.com.threelegs.newrelic.cassandra.jmx.ConnectionException: unable to connect to localnetwork192.168.1.1 at ar.com.threelegs.newrelic.cassandra.jmx.JMXHelper.run(Unknown Source) at ar.com.threelegs.newrelic.cassandra.CassandraRing.pollCycle(Unknown Source) at com.newrelic.metrics.publish.Runner$PollAgentsRunnable.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) 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) Caused by: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localnetwork192.168.1.1; nested exception is: java.net.ConnectException: Connection refused] at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:358) at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268) at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:227) ... 10 more Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localnetwork192.168.1.1; nested exception is: java.net.ConnectException: Connection refused] 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:1925) at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1892) at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:275) ... 12 more Caused by: java.rmi.ConnectException: Connection refused to host: localnetwork192.168.1.1; nested exception is: java.net.ConnectException: Connection refused at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619) 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) ... 17 more Caused by: java.net.ConnectException: Connection refused 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.(Socket.java:425)
at java.net.Socket.(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)
... 22 more