All Apps and Add-ons

Issue connecting to Websphere MQ using the Splunk JMS adapter

rkbask
New Member

MQ had a pre built sample applications that connected to MQ over JMS.I plugged in the same parameters as the bindings file that I generated.

Error:

06-06-2014 10:10:47.165 -0500 INFO ExecProcessor - Ran script: python /splunk/etc/apps/jms_ta/bin/jms.py, took 11.83 seconds to run, 0 bytes read, exited with code 2
06-06-2014 10:10:57.539 -0500 ERROR ModularInputs - Argument validation for scheme=jms: Can't determine browse frequency
06-06-2014 10:10:57.601 -0500 INFO ExecProcessor - New scheduled exec process: python /splunk/etc/apps/jms_ta/bin/jms.py
06-06-2014 10:10:59.240 -0500 ERROR ExecProcessor - message from "python /splunk/etc/apps/jms_ta/bin/jms.py" Stanza jms://queue/middlewarelogging:SPLUNK.LOGGING.PROCESSING : Error connecting : java.lang.ClassCastException: javax.naming.Reference cannot be cast to javax.jms.ConnectionFactory
06-06-2014 10:10:59.240 -0500 ERROR ExecProcessor - message from "python /splunk/etc/apps/jms_ta/bin/jms.py" at com.splunk.modinput.jms.JMSModularInput$MessageReceiver.connect(Unknown Source)
06-06-2014 10:10:59.240 -0500 ERROR ExecProcessor - message from "python /splunk/etc/apps/jms_ta/bin/jms.py" at com.splunk.modinput.jms.JMSModularInput$MessageReceiver.run(Unknown Source)
06-06-2014 10:10:59.784 -0500 ERROR ExecProcessor - message from "python /splunk/etc/apps/jms_ta/bin/jms.py" Can't connect to Splunk REST API with the token [Splunk 607c6a4596d090048a261a1b7fd7311f], either the token is invalid or SplunkD has exited : HTTP 404 -- In handler 'jms': Invalid custom action for this internal handler (handler: jms, custom action: middlewarelogging:SPLUNK.LOGGING.PROCESSING, eai action: list).
06-06-2014 10:11:09.271 -0500 ERROR ExecProcessor - message from "python /splunk/etc/apps/jms_ta/bin/jms.py" Stanza jms://queue/middlewarelogging:SPLUNK.LOGGING.PROCESSING : Error connecting : java.lang.ClassCastException: javax.naming.Reference cannot be cast to javax.jms.ConnectionFactory
06-06-2014 10:11:09.271 -0500 ERROR ExecProcessor - message from "python /splunk/etc/apps/jms_ta/bin/jms.py" at com.splunk.modinput.jms.JMSModularInput$MessageReceiver.connect(Unknown Source)
06-06-2014 10:11:09.271 -0500 ERROR ExecProcessor - message from "python /splunk/etc/apps/jms_ta/bin/jms.py" at com.splunk.modinput.jms.JMSModularInput$MessageReceiver.run(Unknown Source)
06-06-2014 10:11:09.787 -0500 ERROR ExecProcessor - message from "python /splunk/etc/apps/jms_ta/bin/jms.py" It has been determined via the REST API that all inputs have been disabled
06-06-2014 10:11:10.046 -0500 INFO ExecProcessor - Ran script: python /splunk/etc/apps/jms_ta/bin/jms.py, took 11.58 seconds to run, 0 bytes read, exited with code 2

Tags (1)
0 Karma

rajanala
Path Finder

save ATT39575.bindings as .bindings and try again.

0 Karma

rkbask
New Member

hi dallimore, thanks for your response
currently after adding all the jar i am getting the following exception ..

Using IVTRun, I am getting the following exception which is consistent with the error we are getting in Splunk.
C:\Program Files (x86)\IBM\WebSphere MQ\java\bin>IVTRun -url "file:/c:/temp/mqjndii/ATT39575.bindings" -icf com.sun.jndi.fscontext.RefFSContextFactory
[watcher]started

5724-H72, 5655-R36, 5724-L26, 5655-L82 (c) Copyright IBM Corp. 2008. All Rights Reserved.
WebSphere MQ classes for Java(tm) Message Service
Installation Verification Test

Running com.ibm.mq.jms.MQJMSIVT from file:/C:/Program%20Files%20(x86)/IBM/WebSphere%20MQ/java/lib/com.ibm.mqjms.jar
Using administered objects, please ensure that these are available
Cannot create InitialContext! Please check your JNDI settings
javax.naming.NameNotFoundException; remaining name 'c:\temp\mqjndii\ATT39575.bindings'
C:\Program Files (x86)\IBM\WebSphere MQ\java\bin>

0 Karma

Damien_Dallimor
Ultra Champion

It is more or less impossible to figure out what your misconfiguration issue is based on that error dump , but It would appear you have some fundamental errors in your basic setup, either in the JMS settings you have provided or in you MQ setup.

Have you read this and followed the steps verbatim for MQ ?

0 Karma

Damien_Dallimor
Ultra Champion

You require all the jars as documented by way of the screenshot in the blog.

0 Karma

rkbask
New Member

I have followed the procedure in that link.
but i have a doubt , do we need all the jar files mentioned in screen shot or just the 4 jar files.
currently i have added these 4 jar files.
jmsmodinput.jar
jms.jar
splunk.jar
log4j-1.2.16.jar

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...