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

rajanala
Path Finder

Thank you.
Worked after switching to Splunk Heavy Forwarder

0 Karma

MuS
Legend

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
Legend

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
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...