All Apps and Add-ons

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

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

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

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

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
Don’t Miss Global Splunk
User Groups Week!

Free LIVE events worldwide 2/8-2/12
Connect, learn, and collect rad prizes and swag!