All Apps and Add-ons

jms_ta app and Python vs Python3

rajanala
Path Finder

I have the following setup:-
Splunk Universal Forwarder 6.1.6
OS - AIX
jms_ta - 1.3.8
python3
Java 1.7.0

When we run the jms..py --scheme command, we see this

./splunk cmd /opt/bin/python3 ../etc/apps/jms_ta/bin/jms.py --scheme
Traceback (most recent call last):
File "../etc/apps/jms_ta/bin/jms.py", line 122, in
do_scheme()
File "../etc/apps/jms_ta/bin/jms.py", line 52, in do_scheme
run_java()
File "../etc/apps/jms_ta/bin/jms.py", line 71, in run_java
if (not os.environ.has_key('JAVA_HOME')):

AttributeError: '_Environ' object has no attribute 'has_key'

When we restart splunk service we see this:

ERROR ModularInputs - Unable to initialize modular input "jms" defined inside the app "jms_ta": Introspecting scheme=jms: Unable to run "python /opt/splunkforwarder/etc/apps/jms_ta/bin/jms.py --scheme": child failed to start: No such file or directory
ERROR ModularInputs - Introspecting scheme=jms: Unable to run "python /opt/splunkforwarder/etc/apps/jms_ta/bin/jms.py --scheme": child failed to start: No such file or directory
INFO SpecFiles - Found external scheme definition for stanza "jms://" with 23 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


JAVA_HOME
SPLUNK_HOME
and CLASSPATH are all set

Any thoughts ??

0 Karma
1 Solution

Damien_Dallimor
Ultra Champion

You should use python 2.7

View solution in original post

Damien_Dallimor
Ultra Champion

You should use python 2.7

View solution in original post

rajanala
Path Finder

Thank you.
Worked after switching to Splunk Heavy Forwarder

0 Karma

MuS
SplunkTrust
SplunkTrust

Hi @rajanala, please accept the answer 🙂

cheers, MuS

0 Karma

rajanala
Path Finder

Thank you for the information.

We are migrating the app to new AIX servers that can run python3 only.
Is there any version of jms_ta compatible with python3 ?
Appreciate any recommendations you might have.

0 Karma

Damien_Dallimor
Ultra Champion

Splunk runs python 2.7 , try pointing to Splunk's shipped python 2.7 runtime.

0 Karma

MuS
SplunkTrust
SplunkTrust

It's an universal forwarder which does not ship python 😉 But they could install a full Splunk instance https://www.splunk.com/page/previous_releases#ppcaix and have it run the input and forward the results .... if that is possible on this server ¯\_(ツ)_/¯

cheers, MuS

0 Karma

Damien_Dallimor
Ultra Champion

Heavy Forwarder implied.

0 Karma

rajanala
Path Finder

Got it working with Splunk Heavy Forwarder .
Thank you

0 Karma
.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!