Hey all,
I’ve recently been following the Graylog tutorial in an attempt to set up a logging system for my company. After copying the segment below from the tutorial into a docker_compose.yml
file
version: '2'
services:
# MongoDB: https://hub.docker.com/_/mongo/
mongodb:
image: mongo:3
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docker.html
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.4
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
# Graylog: https://hub.docker.com/r/graylog/graylog/
graylog:
image: graylog/graylog:3.0
environment:
# CHANGE ME (must be at least 16 characters)!
- GRAYLOG_PASSWORD_SECRET=somepasswordpepper
# Password: admin
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
- GRAYLOG_HTTP_BIND_ADDRESS=127.0.0.1:9000
- GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9000/
links:
- mongodb:mongo
- elasticsearch
depends_on:
- mongodb
- elasticsearch
ports:
# Graylog web interface and REST API
- 9000:9000
# Syslog TCP
- 514:514
# Syslog UDP
- 514:514/udp
# GELF TCP
- 12201:12201
# GELF UDP
- 12201:12201/udp
I ran docker-compose up
and attempted to view the web UI in mozilla firefox by going to 172.25.0.4:9000/
where 172.25.0.4 is the IP of the docker container which I obtained by doing docker inspect
.
When I run curl -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'X-Requested-By: cli' 'https://172.25.0.4:9000/api/system/sessions' -d '{"username":"admin", "password":"admin", "host":""}'
I get a connection refused error as well. I have also attempted doing all of the above with the 127.0.0.1 ip address too but I haven’t had any success.
I wanted to check if anyone happens to know what’s wrong with the above set-up and what I should do to get Graylog to work.
Thanks!