Configuring logstash-input-jms plugin to read WebSphere JMS queue

I'm trying to connect to a WebSphere JMS. I can connect to it using HermesJMS and below are the steps need to connect to my queue using HermesJMS and then what I tried to connection using logstash-plugin-jms. Please, I really need help to try to consume messages from this queue and couldn't find any documentation about it.

Resumed steps to read messages from WebSphere JMS queue on HermesJMS

  1. I have created a folder and named it as "WASJMS" on my client machine and copied the following files from WebSphere to this folder.

  2. On WebSphere I have key.p12 and trust.p12 files, which I have to convert to jks format so it can be used by Oracle JVM instead of IBM JVM (WebSphere Default JVM)

    keytool -v -importkeystore -srckeystore trust.p12 -destkeystore trust.jks -srcstoretype pkcs12 -deststoretype jks -srcstorepass WebAS -deststorepass WebAS_JKS -alias root2 -srckeypass WebAS -destkeypass WebAS_JKS

    keytool -v -importkeystore -srckeystore key.p12 -destkeystore key.jks -srcstoretype pkcs12 -deststoretype jks -srcstorepass WebAS -deststorepass WebAS_JKS -alias default -srckeypass WebAS -destkeypass WebAS_JKS

Then I copied the new files (key.jks and trust.jks) to my client folder (WASJMS)

  1. Some changes was made on ssl.client.props and sas.client.props file to setup jks files path, passwords and set it to read SUN(Oracle) type.

  2. Then, I changed hermes.bat file to use my ssl.client.props and sas.client.props on startup, pasting the following files before last line.

    set SSL_RMI_DEFS= ^"file:/C:/Users/ranieri/WASJMS/ssl.client.props" ^"file:/C:/Users/ranieri/WASJMS/sas.client.props"

  3. Then I opened HermesJMS, created a new session which I named as was855 and on providers tab I've created a new group (was855sib) and added all jars needed (the 3 jars files I mentioned in step 1)

  1. Then, back in sessions tab I choose hermes.JNDIQueueConnectionFactory as class and choose was855sib to use their jars dependencies. After that, I've added 3 properties and set their values as below:

    binding: jms/RanieriConnectionFactory
    providerURL: iiop://bpm857:9810
    Also, I have informed username and password fields, this is the WebSphere user and pass that has permission to read the queue.

  1. That's all. After this setup all I needed to do is right click on the created session and choose "Discover" option, so it listed all JMS queues and could I choose my jms/RanieriQueue

That's it. I want to read the same queue (jms/RanieriQueue) using logstash-input-jms plugin and I've tried using the following configuration.


input { 
    jms {
        yaml_file => "C:/Users/ranieri/Downloads/logstash-5.2.2/logstash-5.2.2/config/jms.yml"
        yaml_section => "websphere"
        include_header => true
        include_properties => true
        include_body => true
        use_jms_timestamp => false
        destination => "jms/RanieriQueue"
        interval => 3
        runner => async
output {
    stdout { codec => rubydebug }


# Connect to a remote WebSphere JMS Queue
    :jndi_name: jms/RanieriConnectionFactory
    java.naming.provider.url: iiop://bpm857:9810
    java.naming.factory.url.pkgs: bpmadmin bpmadmin
        - C:\Users\ranieri\WASJMS\
        - C:\Users\ranieri\WASJMS\
        - C:\Users\ranieri\WASJMS\

Also, I've changed setup.bat inside logstash-5.2.2/bin to load ssl.client.props and sas.client.props adding the following lines:


When I try to start logstash I'm receiving the following error message.

22:38:29.931 [[main]javax.jms.JMSSecurityException: CWSIA0006E: The authorization for the supplied user name was not successful., :backtrace=>["", "", "java.lang.reflect.Method.invoke(java/lang/reflect/", "RUBY.initialize(C:/Users/ranieri/Downloads/logstash-5.2.2/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/jruby-jms-1.2.0-java/lib/jms/connection.rb:204)", "RUBY.start(C:/Users/ranieri/Downloads/logstash-5.2.2/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/jruby-jms-1.2.0-java/lib/jms/connection.rb:50)", "RUBY.run_async(C:/Users/ranieri/Downloads/logstash-5.2.2/logstash-5.2.2/vendor/bundle/jruby/1.9/gems/logstash-input-jms-3.0.0-java/lib/logstash/inputs/jms.rb:226)", "", "RUBY.inputworker(C:/Users/ranieri/Downloads/logstash-5.2.2/logstash-5.2.2/logstash-core/lib/logstash/pipeline.rb:449)", "RUBY.start_input(C:/Users/ranieri/Downloads/logstash-5.2.2/logstash-5.2.2/logstash-core/lib/logstash/pipeline.rb:443)", ""]}

Any ideas of where is my mistake? Thanks

P.S: I also have a java code that can connect to this queue and read the messages, let me know if you think java code can help you to understand where is the problem.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.