Graylog2 / graylog-docker

Official Graylog Docker image
https://hub.docker.com/r/graylog/graylog/
Apache License 2.0
361 stars 133 forks source link

Content packs not autoloading (docker compose) #153

Closed j4r3kb closed 3 years ago

j4r3kb commented 3 years ago

Referring to https://github.com/Graylog2/graylog-docker/issues/32

I have the same issue but when using docker-compose.yml Here is my stack:

  mongo:
    image: mongo:4.2
    restart: on-failure:3

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.0
    env_file: .env_elasticsearch
    ulimits:
      memlock:
        soft: -1
        hard: -1
    deploy:
      resources:
        limits:
          memory: 1g
    restart: on-failure:3

  graylog:
    image: graylog/graylog:4.0
    env_file: .env_graylog
    entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 --  /docker-entrypoint.sh
    depends_on:
      - mongo
      - elasticsearch
    ports:
      - 9999:9000
      - 12201:12201/udp
      - 12401:12401/udp
    restart: on-failure:3
    volumes:
      - ./graylog/contentpacks:/usr/share/graylog/data/contentpacks

content packs are linked with volume, the .env_graylog file contents are:

GRAYLOG_CONTENT_PACKS_AUTO_INSTALL=nginx.json
GRAYLOG_CONTENT_PACKS_DIR=data/contentpacks
GRAYLOG_CONTENT_PACKS_LOADER_ENABLED=true

When I log into graylog's panel I only see the nginx pack in the list of available packeges, but need to install it by clicking the button. As you can see I have added depends_on to the yaml so graylog should start after mongo and elastic. What else should I do?

bernd commented 3 years ago

@j4r3kb Thanks for the report. This is a bug in the auto-installer code which will be fixed in https://github.com/Graylog2/graylog2-server/pull/10216.