Hi all, I am relatively new to ActiveMQ and JMS.
I have tried reading all the documentation (http://activemq.apache.org/jndi-support.html) and support forums, but I am still unable to figure out what went wrong.
I am trying to poll from a queue using JMS Messaging Modular Input.
The following was done:
1) Created jndi.properties and placed it (a) as a jar file in $SPLUNK_HOME\etc\apps\jms_ta\bin\lib\ (jndi.properties is in the root) and (b) at apache-activemq-5.13.3\conf
java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url = tcp://192.168.99.2:61616
connectionFactoryNames = connectionFactory
queue.MyQueue = foo.bar
2) Included activemq-all-5.13.3.jar in $SPLUNK_HOME\etc\apps\jms_ta\bin\lib\
3) Configured inputs.conf in launcher app
[jms://queue/:MyQueue]
browse_frequency = -1
browse_mode = all
browse_queue_only = 1
durable = 0
hec_batch_mode = 0
hec_https = 0
host = 192.168.99.2
index = main
index_message_header = 1
index_message_properties = 1
init_mode = jndi
jms_connection_factory_name = connectionFactory
jndi_initialcontext_factory = org.apache.activemq.jndi.ActiveMQInitialContextFactory
jndi_provider_url = tcp://192.168.99.2:61616
output_type = stdout
sourcetype = jms
strip_newlines = 1
4) Rebooted Splunk service.
However, I am getting the following error from the logs.
09-14-2016 00:41:25.009 +0800 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\jms_ta\bin\jms.py"" Stanza jms://queue/:MyQueue : Error connecting : javax.naming.NameNotFoundException: connectionFactory
09-14-2016 00:41:25.009 +0800 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\jms_ta\bin\jms.py"" at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:235)
09-14-2016 00:41:25.009 +0800 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\jms_ta\bin\jms.py"" at javax.naming.InitialContext.lookup(Unknown Source)
09-14-2016 00:41:25.009 +0800 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\jms_ta\bin\jms.py"" at com.splunk.modinput.jms.JMSModularInput$MessageReceiver.connect(Unknown Source)
09-14-2016 00:41:25.009 +0800 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\jms_ta\bin\jms.py"" at com.splunk.modinput.jms.JMSModularInput$MessageReceiver.run(Unknown Source)
Can anyone advise me on what went wrong? Thank you!
↧