graylog-labs / graylog-plugin-mqtt

MQTT Input Plugin for Graylog
https://www.graylog.org/
13 stars 11 forks source link

not starting with graylog 5.1 #12

Open rideckard opened 1 year ago

rideckard commented 1 year ago

The plugin fails to start with graylog 5.1. It logs the following error:

1) [Guice/MissingImplementation]: No implementation for MQTTGELFInput$Factory was bound.

Requested by:
1  : Graylog2Module.installInput(Graylog2Module.java:233)
      \_ installed by: PluginBindings -> MQTTInputModule

Learn more:
  https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION

2) MessageInput$Descriptor is abstract, not a concrete class.  Unable to create AssistedInject factory.
  while locating MessageInput$Descriptor
  at MessageInput$Factory.getDescriptor(MessageInput.java:1)

It can be reproduced with the following docker-compose file (volume and plugin paths need to be adjusted):

version: '3'
services:
  # MongoDB: https://hub.docker.com/_/mongo/
  mongodb:
    image: mongo:6.0
    networks:
      - graylog
    # DB in share for persistence
    volumes:
      - /home/marc_diesse/volumes/mongodb:/data/db
  # Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/docker.html
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
    # data folder in share for persistence
    volumes:
      - /home/marc_diesse/volumes/elasticsearch:/usr/share/elasticsearch/data
    environment:
      - http.host=0.0.0.0
      - transport.host=localhost
      - network.host=0.0.0.0
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    mem_limit: 1g
    networks:
      - graylog
  # Graylog: https://hub.docker.com/r/graylog/graylog/
  graylog:
    image: graylog/graylog:5.1
    # journal and config directories in local NFS share for persistence
    volumes:
      - /home/user_name/volumes/graylog_journal:/usr/share/graylog/data/journal
      - /home/user_name/volumes/graylog_plugins/graylog-plugin-mqtt-1.1.1.jar:/usr/share/graylog/plugin/graylog-plugin-mqtt-1.1.1.jar
    environment:
      # CHANGE ME (must be at least 16 characters)!
      - GRAYLOG_PASSWORD_SECRET=graylogpw11111111
      # Password: admin
      - GRAYLOG_ROOT_PASSWORD_SHA2=70832c7aadf276ad91f07dca82c5da7acf4b9d5e74b5e6d3d6963aa11448fd87
      - GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9000/
    entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh
    networks:
      - graylog
    links:
      - mongodb:mongo
      - elasticsearch
    restart: always
    depends_on:
      - mongodb
      - elasticsearch
    ports:
      # Graylog web interface and REST API
      - 9000:9000
      # Syslog TCP
      - 1514:1514
      # Syslog UDP
      - 1514:1514/udp
      # GELF TCP
      - 12201:12201
      # GELF UDP
      - 12201:12201/udp
# Volumes for persisting data, see https://docs.docker.com/engine/admin/volumes/volumes/
volumes:
  mongo_data:
    driver: local
  es_data:
    driver: local
  graylog_journal:
    driver: local
networks:
  graylog:
    driver: bridge

Can this be solved by building with newer java version?

manuel-sartoni commented 3 months ago

Any news about this issue? I'm using graylog 6.0 and i have the same error.