I am trying to bringup a open-core setup given here : docker-compose/open-core at main · Graylog2/docker-compose · GitHub
THe graylog service fails with the error shown in image : logFails27017.jpeg
Also attached is the screenshot of docker containers running on the vm.
I have tried adding “expose 27017” and ports to mogodb service defnition. Still same error.
Can someone help me to overcome this issue… ?
Hello,
Showing you YAML file configuration will help.
version: "3.8"
services:
mongodb:
image: "mongo:5.0"
volumes:
- "mongodb_data:/data/db"
restart: "on-failure"
elasticsearch:
environment:
ES_JAVA_OPTS: "-Xms1g -Xmx1g -Dlog4j2.formatMsgNoLookups=true"
bootstrap.memory_lock: "true"
discovery.type: "single-node"
http.host: "0.0.0.0"
action.auto_create_index: "false"
image: "docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2"
ulimits:
memlock:
hard: -1
soft: -1
volumes:
- "es_data:/usr/share/elasticsearch/data"
restart: "on-failure"
graylog:
image: "graylog/graylog:4.2"
depends_on:
elasticsearch:
condition: "service_started"
mongodb:
condition: "service_started"
entrypoint: "/usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh"
environment:
GRAYLOG_NODE_ID_FILE: "/usr/share/graylog/data/config/node-id"
GRAYLOG_PASSWORD_SECRET: ${GRAYLOG_PASSWORD_SECRET:?Please configure GRAYLOG_PASSWORD_SECRET in the .env file}
GRAYLOG_ROOT_PASSWORD_SHA2: ${GRAYLOG_ROOT_PASSWORD_SHA2:?Please configure GRAYLOG_ROOT_PASSWORD_SHA2 in the .env file}
GRAYLOG_HTTP_BIND_ADDRESS: "0.0.0.0:9000"
GRAYLOG_HTTP_EXTERNAL_URI: "http://localhost:9000/"
GRAYLOG_ELASTICSEARCH_HOSTS: "http://elasticsearch:9200"
GRAYLOG_MONGODB_URI: "mongodb://mongodb:27017/graylog"
ports:
- "5044:5044/tcp" # Beats
- "5140:5140/udp" # Syslog
- "5140:5140/tcp" # Syslog
- "5555:5555/tcp" # RAW TCP
- "5555:5555/udp" # RAW TCP
- "9000:9000/tcp" # Server API
- "12201:12201/tcp" # GELF TCP
- "12201:12201/udp" # GELF UDP
#- "10000:10000/tcp" # Custom TCP port
#- "10000:10000/udp" # Custom UDP port
- "13301:13301/tcp" # Forwarder data
- "13302:13302/tcp" # Forwarder config
volumes:
- "graylog_data:/usr/share/graylog/data/data"
- "graylog_journal:/usr/share/graylog/data/journal"
restart: "on-failure"
volumes:
mongodb_data:
es_data:
graylog_data:
graylog_journal:
Hello & thanks
I get a better idea whats going on.
links:
- mongodb:mongo
- elasticsearch
depends_on:
- mongodb
- elasticsearch
For a better understanding here is mine. Perhaps you can spot what the issue is.
Click_Me
version: '3'
services:
# MongoDB: https://hub.docker.com/_/mongo/
mongodb:
image: mongo:4.4
network_mode: bridge
# DB in share for persistence
volumes:
- mongo_data:/data/db
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/6.6/docker.html
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2-amd64
network_mode: bridge
#data folder in share for persistence
volumes:
- es_data:/usr/share/elasticsearch/data
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
#- network.publish_host=192.168.1.28
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
# Graylog: https://hub.docker.com/r/graylog/graylog/
graylog:
image: graylog/graylog-enterprise:4.3-jre11
network_mode: bridge
dns:
- 192.168.2.15
- 192.168.2.16
# journal and config directories in local NFS share for persistence
volumes:
#- graylog_journal:/usr/share/graylog/data/journal
- graylog_bin:/usr/share/graylog/bin
- graylog_data:/usr/share/graylog/data/config
- graylog_log:/usr/share/graylog/data/log
- graylog_plugin:/usr/share/graylog/data/plugin
- graylog_content:/usr/share/graylog/data/contentpacks
# Mount local configuration directory into Docker container
#- ./graylog/data/journal:/usr/share/graylog/data/journal
#- ./graylog/config:/usr/share/graylog/data/config
environment:
# Container time Zone
- TZ=America/Chicago
# CHANGE ME (must be at least 16 characters)!
- GRAYLOG_PASSWORD_SECRET=pJod1TRZAckHmqM2oQIjWgMtnwZf6Q79HW2nonDhN
# Password: admin
- GRAYLOG_ROOT_PASSWORD_SHA2=ef92b778bafe771e89245b896659911881f383d4473e94f
- GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
- GRAYLOG_HTTP_EXTERNAL_URI=http://192.168.1.28:9000/
- GRAYLOG_ROOT_TIMEZONE=America/Chicago
- GRAYLOG_ROOT_EMAIL=greg.smith@domain.com
- GRAYLOG_HTTP_PUBLISH_URI=http://192.168.1.28:9000/
- GRAYLOG_TRANSPORT_EMAIL_PROTOCOL=smtp
- GRAYLOG_HTTP_ENABLE_CORS=true
- GRAYLOG_TRANSPORT_EMAIL_WEB_INTERFACE_URL=http://192.168.1.28:9000/
- GRAYLOG_TRANSPORT_EMAIL_HOSTNAME=192.168.1.28
- GRAYLOG_TRANSPORT_EMAIL_ENABLED=true
- GRAYLOG_TRANSPORT_EMAIL_PORT=25
- GRAYLOG_TRANSPORT_EMAIL_USE_AUTH=false
- GRAYLOG_TRANSPORT_EMAIL_USE_TLS=false
- GRAYLOG_TRANSPORT_EMAIL_USE_SSL=false
- GRAYLOG_TRANSPORT_FROM_EMAIL=root@localhost
- GRAYLOG_TRANSPORT_SUBJECT_PREFIX=[graylog]
- GRAYLOG_REPORT_DISABLE_SANDBOX=true
- GRAYLOG_REPORT_RENDER_URI=http://192.168.1.28:9000
# - GRAYLOG_REPORT_USER=graylog-report
- GRAYLOG_REPORT_RENDER_ENGINE_PORT=9515
links:
- mongodb:mongo
- elasticsearch
depends_on:
- mongodb
- elasticsearch
ports:
# Graylog web interface and REST API
- 9000:9000
# Syslog TCP
- 8514:8514
# Elasticsearch
- 9200:9200
- 9300:9300
# Syslog UDP
- 8514:8514/udp
# GELF TCP
#- 12201:12201
# GELF UDP
#- 12201:12201/udp
# Reports
- 9515:9515
- 9515:9515/udp
# beats
- 5044:5044
# email
- 25:25
- 25:25/udp
# web
- 80:80
- 443:443
- 21:21
# Forwarder
- 13302:13302
- 13301:13301
# keycloak
- 8443:8443
# packetbeat
- 5055:5055
# CEF Messages
- 5555:5555
#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
graylog_bin:
driver: local
graylog_data:
driver: local
graylog_log:
driver: local
graylog_plugin:
driver: local
graylog_content:
driver: local
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.