All Apps and Add-ons

JMS Messaging Modular Input 1.5.1: How to troubleshoot error "Unable to initialize modular input "jms"..."?

tawollen
Path Finder

Get the following errors when trying to start Splunk with the JMS Messaging Modular input.

10-10-2016 14:58:25.178 -0700 INFO  SpecFiles - Found external scheme definition for stanza "jms://" with 32 parameters: jndi_initialcontext_factory, jndi_provider_url, jndi_user, jndi_pass, destination_user, destination_pass, jms_connection_factory_name, durable, index_message_properties, index_message_header, message_selector, strip_newlines, init_mode, local_init_mode_resource_factory_impl, local_init_mode_resource_factory_params, message_handler_impl, message_handler_params, client_id, user_jndi_properties, browse_queue_only, browse_frequency, browse_mode, jvm_system_properties, output_type, hec_port, hec_poolsize, hec_token, hec_https, hec_batch_mode, hec_max_batch_size_bytes, hec_max_batch_size_events, hec_max_inactive_time_before_batch_flush
10-10-2016 14:58:25.281 -0700 ERROR ModularInputs - Introspecting scheme=jms: script running failed (exited with code 1).
10-10-2016 14:58:25.281 -0700 ERROR ModularInputs - Unable to initialize modular input "jms"  defined inside the app "jms_ta": Introspecting scheme=jms: script running failed (exited with code 1).
0 Karma
1 Solution

twollenslegel_s
Splunk Employee
Splunk Employee

In order for JMS to run, either java must be defined in the JAVA_HOME environment variable or be in the path.

If you have Java installed in a non-standard path, you must currently modify a line in jms.py.

From

  if (not os.environ.has_key('JAVA_HOME')):
     JAVA_EXECUTABLE = java'

To

  if (not os.environ.has_key('JAVA_HOME')):
     JAVA_EXECUTABLE = '<correct path>/bin/java'

View solution in original post

frodebjerke
New Member

I'm getting this error too. WHen logged in as Splunk user i get this:
[code]
echo $JAVA_HOME
/usr/java

java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
[/code]

I'm at a loss as to what could be wrong.

0 Karma

Damien_Dallimor
Ultra Champion

No where in the documentation does it say to change jms.py. So it is pretty difficult to answer this question as you are basically running your own code now that is not tested in the official release.

My advice , stick to the documentation.

Secondly , you might want to post your inputs.conf configuration , details of the environment, an overview of all steps you have performed to date etc.. , so that I have some context to actually start with for an answer.

alt text

0 Karma

tawollen
Path Finder

That seemed to work until we configured the queue. Now getting the following errors. Not sure if it is related to the non-standard Java or something else.

10-10-2016 16:33:58.785 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/jms_ta/bin/jms.py"        at com.splunk.modinput.jms.JMSModularInput$MessageReceiver.connect(Unknown Source)
10-10-2016 16:33:58.785 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/jms_ta/bin/jms.py"        at com.splunk.modinput.jms.JMSModularInput$MessageReceiver.run(Unknown Source)
10-10-2016 16:33:58.785 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/jms_ta/bin/jms.py" Caused by: java.lang.ClassNotFoundException:
10-10-2016 16:33:58.785 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/jms_ta/bin/jms.py"        at java.lang.Class.forName0(Native Method)
10-10-2016 16:33:58.785 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/jms_ta/bin/jms.py"        at java.lang.Class.forName(Class.java:270)
10-10-2016 16:33:58.785 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/jms_ta/bin/jms.py"        at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:72)
10-10-2016 16:33:58.785 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/jms_ta/bin/jms.py"        at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:61)
10-10-2016 16:33:58.785 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/jms_ta/bin/jms.py"        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)
10-10-2016 16:33:58.785 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/jms_ta/bin/jms.py"        ... 5 more
0 Karma

twollenslegel_s
Splunk Employee
Splunk Employee

In order for JMS to run, either java must be defined in the JAVA_HOME environment variable or be in the path.

If you have Java installed in a non-standard path, you must currently modify a line in jms.py.

From

  if (not os.environ.has_key('JAVA_HOME')):
     JAVA_EXECUTABLE = java'

To

  if (not os.environ.has_key('JAVA_HOME')):
     JAVA_EXECUTABLE = '<correct path>/bin/java'

View solution in original post

.conf21 CFS Extended through 5/20!

Don't miss your chance
to share your Splunk
wisdom in-person or
virtually at .conf21!

Call for Speakers has
been extended through
Thursday, 5/20!