question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question on configuration variable passing

See original GitHub issue

I think its possibly a bug or my configuration mistake

I tried setting host as remote ip address

$ head -1 /app/config.yml
host: 10.42.10.34:7199

On starting it still tries to connect to localhost, here are the logs:

$ java -Dorg.slf4j.simpleLogger.defaultLogLevel=trace -jar cassandra_exporter-1.0.1-all.jar /app/config.yml
[main] INFO com.criteo.nosql.cassandra.exporter.Config - Loading yaml config from /app/config.yml
[main] TRACE com.criteo.nosql.cassandra.exporter.Config - com.criteo.nosql.cassandra.exporter.Config@42dafa95
[main] ERROR com.criteo.nosql.cassandra.exporter.Main - Scrapper stopped due to uncaught exception
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
	java.net.ConnectException: Connection refused (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.invoke(UnicastRef.java:129)
	at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
	at javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2430)
	at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:308)
	at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
	at com.criteo.nosql.cassandra.exporter.JmxScraper.run(JmxScraper.java:104)
	at com.criteo.nosql.cassandra.exporter.Main.main(Main.java:36)
Caused by: java.net.ConnectException: Connection refused (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 java.net.Socket.connect(Socket.java:538)
	at java.net.Socket.<init>(Socket.java:434)
	at java.net.Socket.<init>(Socket.java:211)
	at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
	at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:148)
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
erebecommented, Apr 13, 2018

You need to enable remote access, you only have local access configured

-Dcassandra.jmx.local.port=7199
-Dcom.sun.management.jmxremote.authenticate=false

Notice the jmx.local.port

You can try out with those JMX options when starting cassandra (in cassandra-env.sh file in the config directory)

-Dcom.sun.management.jmxremote.port=7199
-Dcom.sun.management.jmxremote.rmi.port=7199 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false

Let me know it change anything

0reactions
chhetripradeepcommented, Apr 18, 2018

Works as expected. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Passing the configuration variable on teamcity - Stack Overflow
I have a Job A and Job B in teamcity, Job B is a dependency for Job A(continuous build and deployment job). I...
Read more >
Pass Record Producer variables questions and answe...
Hi, I have created a Record Producer form for our incident table. They don't want the variable editor on the Incident form, so...
Read more >
How to best pass along global configurations such as login ...
I have a lot of "global" configuration files, for example the URL, login, and password of the webservice I'm communicating with (this changes ......
Read more >
Frequently Asked Questions — Ansible Documentation
How do I see all the inventory variables defined for my host? How do I see all the variables specific to my host?...
Read more >
Config Variables | DevSpace | Documentation
command means DevSpace will not ask the user a question and instead execute a command to determine the value of the variable. Pass...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found