All Apps and Add-ons

Splunk Add-on for Java Management Extensions: "cannot create JMXServiceURL" jmx_url seems badly parsed?

bonito
Explorer

Hi

I'm trying to establish a JMX connection to a secured WebSphere instance by use of a direct URL. The final XML config that I'm using is:

    <jmxpoller>
    <formatter className="com.dtdsoftware.splunk.formatter.TokenizedMBeanNameQuotesStrippedFormatter" />
    <cluster name="cluster" description="A cluster">
    <mbean domain="WebSphere" properties="*,type=JVM,j2eeType=JVM" dumpAllAttributes="true" ></mbean>
    <jmxserver jmxServiceURL="service:jmx:iiop://<host>:<port>/jndi/JMXConnector" jmxaccount="_Splunk_TA_jmx_account_#Splunk_TA_jmx#<account>" jvmDescription="A test" />
    </cluster>
    </jmxpoller>

(Host port and account values are all real, just redacted in this post).

A test of this jmxServiceURL is successful using my own quick Java program to verify, but the URL does not work within Splunk_TA_JMX.

It appears to fall down in some kind of URL parsing stage:

2016-04-04 15:08:34,335 - com.splunk.modinput.ModularInput -121182 [Thread-9] ERROR  - cannot create JMXServiceURL for server with description A test - For input string: "<port>/jndi"

The reported input string ( <port>/jndi ) has been stripped down to just the port and stub, missing the rest of the URL.

I understand this URL format is different to that suggested in Splunk WAS addon, but this is for a secured WebSphere instance which will not work with those instructions. This URL format should work with a secured instance as long as the correct SSL/SAS properties are set and -Djmx.remote.protocol.provider.pkgs=com.ibm.websphere.management.remote is also set, which I have done with a change to jmx.py. I'm fairly confident it will work if I can get the correct jmxServiceURL passed into the input.

0 Karma

DomenicTroilo1
Loves-to-Learn Lots

@bonito Hello you noted this in your message:

I understand this URL format is different to that suggested in Splunk WAS addon, but this is for a secured WebSphere instance which will not work with those instructions. This URL format should work with a secured instance as long as the correct SSL/SAS properties are set and -Djmx.remote.protocol.provider.pkgs=com.ibm.websphere.management.remote is also set, which I have done with a change to jmx.py. I'm fairly confident it will work if I can get the correct jmxServiceURL passed into the input.

I am also attempting to get mbeans from a secure WebSphere ND environment.  Did you get this working?

Tags (1)
0 Karma

mreynov_splunk
Splunk Employee
Splunk Employee

can you try the same with iiop or rmi type of entry? I've had issues with "Use URL Directly" option before.

0 Karma

bonito
Explorer

I've tried the IIOP method of entry, which should be the correct way. Unfortunately, no matter what I do with this, I get an error from inside the IBM ORB library that seems to indicate an invalid or null service path in the service URL.

Unfortunately, as Splunk_TA_JMX does not output the final service URL in any log (even on debug log level) I'm not sure if this URL is being constructed correctly (or at least correctly according to IBM).

This is why I prefer using the direct URL if possible as I know what's going on. But for whatever reason this URL is being mangled.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Unlocking Unified Insights: New Gigamon Federated Search App for Splunk

In today’s data-heavy environment, organizations are caught in a data distribution dilemma. As data volumes ...

GA: New Data Management App in Splunk Platform

Streamlining Data Management: Introducing a unified experience in Splunk Managing data at scale shouldn’t feel ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...