Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jms plugin not staritng with activemq-all-5.16 and jruby 2.50 #44

Open
qubusp opened this issue Oct 14, 2020 · 0 comments
Open

jms plugin not staritng with activemq-all-5.16 and jruby 2.50 #44

qubusp opened this issue Oct 14, 2020 · 0 comments

Comments

@qubusp
Copy link

qubusp commented Oct 14, 2020

  • Version: 7.9.1
  • Operating System: Linux
  • Config File (if you have sensitive info, please remove it):
    docker-compose.yml
YAML
version: '3.2'

services:
  elasticsearch:
    build:
      context: elasticsearch/
      args:
        ELK_VERSION: $ELK_VERSION
    volumes:
      - type: bind
        source: ./elasticsearch/config/elasticsearch.yml
        target: /usr/share/elasticsearch/config/elasticsearch.yml
        read_only: true
      - type: volume
        source: elasticsearch
        target: /usr/share/elasticsearch/data
    ports:
      - "9200:9200"
      - "9300:9300"
    environment:
      ES_JAVA_OPTS: "-Xmx256m -Xms256m"
      ELASTIC_PASSWORD: changeme
      # Use single node discovery in order to disable production mode and avoid bootstrap checks.
      # see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
      discovery.type: single-node
    networks:
      - elk

  logstash:
    build:
      context: logstash/
      args:
        ELK_VERSION: $ELK_VERSION
    volumes:
      - type: bind
        source: ./logstash/config/logstash.yml
        target: /usr/share/logstash/config/logstash.yml
        read_only: true
      - type: bind
        source: ./logstash/pipeline
        target: /usr/share/logstash/pipeline
        read_only: true
    ports:
      - "5000:5000/tcp"
      - "5000:5000/udp"
      - "9600:9600"
    environment:
      LS_JAVA_OPTS: "-Xmx2048m -Xms2048m"
    networks:
      - elk
    depends_on:
      - elasticsearch

  kibana:
    build:
      context: kibana/
      args:
        ELK_VERSION: $ELK_VERSION
    volumes:
      - type: bind
        source: ./kibana/config/kibana.yml
        target: /usr/share/kibana/config/kibana.yml
        read_only: true
    ports:
      - "5601:5601"
    networks:
      - elk
    depends_on:
      - elasticsearch

  activemq:
    image: webcenter/activemq:5.14.3
    ports:
      # mqtt
      - "1883:1883"
      # amqp
      - "5672:5672"
      # ui
      - "8161:8161"
      # stomp
      - "61613:61613"
      # ws
      - "61614:61614"
      # jms
      - "61616:61616"
    volumes: ["activemq-data:/opt/activemq/conf", "activemq-data:/data/activemq", "activemq-data:/var/log/activemq"]
    environment:
      ACTIVEMQ_REMOVE_DEFAULT_ACCOUNT: "true"
      ACTIVEMQ_ADMIN_LOGIN: admin
      ACTIVEMQ_ADMIN_PASSWORD: password
      ACTIVEMQ_WRITE_LOGIN: write
      ACTIVEMQ_WRITE_PASSWORD: password
      ACTIVEMQ_READ_LOGIN: read
      ACTIVEMQ_READ_PASSWORD: password
      ACTIVEMQ_JMX_LOGIN: jmx
      ACTIVEMQ_JMX_PASSWORD: password
      ACTIVEMQ_STATIC_TOPICS: static-topic-1;static-topic-2
      ACTIVEMQ_STATIC_QUEUES: static-queue-1;static-queue-2
      ACTIVEMQ_ENABLED_SCHEDULER: "true"
      ACTIVEMQ_MIN_MEMORY: 512
      ACTIVEMQ_MAX_MEMORY: 2048

networks:
  elk:
    driver: bridge


volumes:
  elasticsearch:
  activemq-data: 
YAML

10-jms.conf

input {
    jms {
        broker_url => '(tcp://activemq:61616)/?initialReconnectDelay=100' 
        destination => 'myqueue' 
        factory => 'org.apache.activemq.ActiveMQConnectionFactory' 
        pub_sub => false 
        use_jms_timestamp => false 
        # JMS provider credentials if needed 
        username => 'admin'
        password => 'password'
        # JMS provider keystore and truststore details 
        # Parts of the JMS message to be included 
        include_header => false
        include_properties => false
        include_body => true
        # Message selector
        selector => "string_property = 'this' OR int_property < 3" 
        # Connection factory specific settings
        factory_settings => { 
                              exclusive_consumer => true
        }
        # Jar Files to include
        require_jars => ['./apache-activemq-5.16.0/activemq-all-5.16.0.jar'] 
    }
  }

elasticsearch.yml

---
## Default Elasticsearch configuration from Elasticsearch base image.
## https://github.com/elastic/elasticsearch/blob/master/distribution/docker/src/docker/config/elasticsearch.yml
#
cluster.name: "docker-cluster"
network.host: 0.0.0.0

## X-Pack settings
## see https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-xpack.html
#
xpack.license.self_generated.type: trial
xpack.security.enabled: true
xpack.monitoring.collection.enabled: true

elasticsearch-dockerfile:

ARG ELK_VERSION

# https://www.docker.elastic.co/
FROM docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION}

# Add your elasticsearch plugins setup here
# Example: RUN elasticsearch-plugin install analysis-icu

logstash-dockerfile

ARG ELK_VERSION

# https://www.docker.elastic.co/
FROM docker.elastic.co/logstash/logstash:${ELK_VERSION}

# Add your logstash plugins setup here
# Example: RUN logstash-plugin install logstash-filter-json
RUN logstash-plugin install logstash-input-jms

kibana docker file

ARG ELK_VERSION

# https://www.docker.elastic.co/
FROM docker.elastic.co/kibana/kibana:${ELK_VERSION}

# Add your kibana plugins setup here
# Example: RUN kibana-plugin install <name|url>

  • Sample Data:
    error:
logstash_1       | [2020-10-14T10:07:34,294][WARN ][logstash.inputs.jms      ][main][6caea5b1c27bc513c32667c0e6728a17c4bb15a93628c08d260d8b58fb25ea56] JMS Consumer Died {:exception=>"NameError", :exception_message=>"cannot load Java class javax.jms.DeliveryMode", :backtrace=>["org/jruby/javasupport/JavaClass.java:292:in `for_name'", "org/jruby/javasupport/JavaClass.java:288:in `for_name'", "org/jruby/javasupport/JavaUtilities.java:39:in `get_proxy_class'", "uri:classloader:/jruby/java/core_ext/object.rb:44:in `block in java_import'", "org/jruby/RubyArray.java:2577:in `map'", "uri:classloader:/jruby/java/core_ext/object.rb:37:in `java_import'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/imports.rb:3:in `<module:JMS>'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/imports.rb:2:in `<main>'", "org/jruby/RubyKernel.java:974:in `require'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/connection.rb:100:in `fetch_dependencies'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/connection.rb:158:in `initialize'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jms-3.1.2-java/lib/logstash/inputs/jms.rb:225:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:378:in `inputworker'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:369:in `block in start_input'"]}
logstash_1       | [2020-10-14T10:07:39,322][WARN ][logstash.inputs.jms      ][main][6caea5b1c27bc513c32667c0e6728a17c4bb15a93628c08d260d8b58fb25ea56] JMS Consumer Died {:exception=>"NameError", :exception_message=>"cannot load Java class javax.jms.DeliveryMode", :backtrace=>["org/jruby/javasupport/JavaClass.java:292:in `for_name'", "org/jruby/javasupport/JavaClass.java:288:in `for_name'", "org/jruby/javasupport/JavaUtilities.java:39:in `get_proxy_class'", "uri:classloader:/jruby/java/core_ext/object.rb:44:in `block in java_import'", "org/jruby/RubyArray.java:2577:in `map'", "uri:classloader:/jruby/java/core_ext/object.rb:37:in `java_import'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/imports.rb:3:in `<module:JMS>'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/imports.rb:2:in `<main>'", "org/jruby/RubyKernel.java:974:in `require'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/connection.rb:100:in `fetch_dependencies'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/connection.rb:158:in `initialize'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jms-3.1.2-java/lib/logstash/inputs/jms.rb:225:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:378:in `inputworker'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:369:in `block in start_input'"]}
logstash_1       | [2020-10-14T10:07:44,335][WARN ][logstash.inputs.jms      ][main][6caea5b1c27bc513c32667c0e6728a17c4bb15a93628c08d260d8b58fb25ea56] JMS Consumer Died {:exception=>"NameError", :exception_message=>"cannot load Java class javax.jms.DeliveryMode", :backtrace=>["org/jruby/javasupport/JavaClass.java:292:in `for_name'", "org/jruby/javasupport/JavaClass.java:288:in `for_name'", "org/jruby/javasupport/JavaUtilities.java:39:in `get_proxy_class'", "uri:classloader:/jruby/java/core_ext/object.rb:44:in `block in java_import'", "org/jruby/RubyArray.java:2577:in `map'", "uri:classloader:/jruby/java/core_ext/object.rb:37:in `java_import'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/imports.rb:3:in `<module:JMS>'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/imports.rb:2:in `<main>'", "org/jruby/RubyKernel.java:974:in `require'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/connection.rb:100:in `fetch_dependencies'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/connection.rb:158:in `initialize'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jms-3.1.2-java/lib/logstash/inputs/jms.rb:225:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:378:in `inputworker'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:369:in `block in start_input'"]}
logstash_1       | [2020-10-14T10:07:49,371][WARN ][logstash.inputs.jms      ][main][6caea5b1c27bc513c32667c0e6728a17c4bb15a93628c08d260d8b58fb25ea56] JMS Consumer Died {:exception=>"NameError", :exception_message=>"cannot load Java class javax.jms.DeliveryMode", :backtrace=>["org/jruby/javasupport/JavaClass.java:292:in `for_name'", "org/jruby/javasupport/JavaClass.java:288:in `for_name'", "org/jruby/javasupport/JavaUtilities.java:39:in `get_proxy_class'", "uri:classloader:/jruby/java/core_ext/object.rb:44:in `block in java_import'", "org/jruby/RubyArray.java:2577:in `map'", "uri:classloader:/jruby/java/core_ext/object.rb:37:in `java_import'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/imports.rb:3:in `<module:JMS>'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/imports.rb:2:in `<main>'", "org/jruby/RubyKernel.java:974:in `require'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/connection.rb:100:in `fetch_dependencies'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/connection.rb:158:in `initialize'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jms-3.1.2-java/lib/logstash/inputs/jms.rb:225:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:378:in `inputworker'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:369:in `block in start_input'"]}
logstash_1       | [2020-10-14T10:07:54,385][WARN ][logstash.inputs.jms      ][main][6caea5b1c27bc513c32667c0e6728a17c4bb15a93628c08d260d8b58fb25ea56] JMS Consumer Died {:exception=>"NameError", :exception_message=>"cannot load Java class javax.jms.DeliveryMode", :backtrace=>["org/jruby/javasupport/JavaClass.java:292:in `for_name'", "org/jruby/javasupport/JavaClass.java:288:in `for_name'", "org/jruby/javasupport/JavaUtilities.java:39:in `get_proxy_class'", "uri:classloader:/jruby/java/core_ext/object.rb:44:in `block in java_import'", "org/jruby/RubyArray.java:2577:in `map'", "uri:classloader:/jruby/java/core_ext/object.rb:37:in `java_import'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/imports.rb:3:in `<module:JMS>'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/imports.rb:2:in `<main>'", "org/jruby/RubyKernel.java:974:in `require'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/connection.rb:100:in `fetch_dependencies'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/jruby-jms-1.3.0-java/lib/jms/connection.rb:158:in `initialize'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jms-3.1.2-java/lib/logstash/inputs/jms.rb:225:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:378:in `inputworker'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:369:in `block in start_input'"]}
logstash_1       | [2020-10-14T10:07:59,408][WARN ][logstash.inp```

- Steps to Reproduce:
docker-compose up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant