All Apps and Add-ons

How to resolve the error "java.net.ConnectException: Connection refused:"

akarivaratharaj
Communicator

Hi,

I am very new to the application 'Monitoring of Java Virtual Machines with JMX' and also to JMX concept. For installation and other configuration steps, I go through the below site:
https://splunkbase.splunk.com/app/668/#/details

I have done modifications only in the config.xml file with my localhost as hostname and its corresponding port details. Then created a data input through 'JMX' by entering necessary details. When I check for the index or sourcetype which I specified in the data input, no results are returned. When I check in the splunkd.log, it is writing the error as "java.net.ConnectException: Connection refused:"

I am able to connect to the host through jconsole without any issues. But when I configure the same details in the config file, it is unable to connect to the host.
Note: I have made changes only on config.xml file only added hostname and its port.

Could you let me know if anything I am missing to configure. Please help on this.

0 Karma

Damien_Dallimor
Ultra Champion

I would check your firewalls, that is the reason I see most often for that error message.

0 Karma

akarivaratharaj
Communicator

Hi @Damien,

I have turned off the windows firewall completely in my system. But still throwing the below error;

11-27-2017 14:55:39.385 +0530 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\SPLUNK4JMX\bin\jmx.py"" host=localhost, jmxServiceURL=, jmxport=0, jvmDescription=test, processID=0,stanza=jmx://testjmx,systemErrorMessage="Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:

11-27-2017 14:55:39.385 +0530 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\SPLUNK4JMX\bin\jmx.py"" java.net.ConnectException: Connection refused: connect]"

0 Karma

Damien_Dallimor
Ultra Champion

Does "localhost" resolve correctly? Try 127.0.0.1

0 Karma

akarivaratharaj
Communicator

@Damien,

I have tried with 127.0.0.1, still I am getting the same error on splunkd log.

11-28-2017 11:05:30.541 +0530 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\SPLUNK4JMX\bin\jmx.py"" host=127.0.0.1, jmxServiceURL=, jmxport=0, jvmDescription=test, processID=0,stanza=jmx://testjmx,systemErrorMessage="Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:

11-28-2017 11:05:30.541 +0530 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\SPLUNK4JMX\bin\jmx.py"" java.net.ConnectException: Connection refused: connect]"

I have also made the below changes but no luck.
mbean domain="" properties="" dumpAllAttributes="true"

Could you please help me on this.

0 Karma

akarivaratharaj
Communicator

Hi @Damien,

I have reinstalled the complete setup once again and updated only the config.xml file with the hostname and port details. Now I am getting the below error as failed to initialize the stanza.

ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\SPLUNK4JMX\bin\jmx.py"" The root config object(JMXPoller) failed to initialize, stanza : jmx://helloworld

Could you please help me on this. Due to this I am unable to proceed further on this setup.

0 Karma

Damien_Dallimor
Ultra Champion

The only times I've ever seen that error are when the user has a typo or misconfiguration in the config xml file. The xsd is shipped with the app if you need to validate your config.xml.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...