Description of your problem
I’m trying to get a local docker install running of the graylog stack. I’ve followed the instructions (I believe), using the scripts/packages/instructions in the documentation. The Graylog UI comes up at localhost:9000 but I get the message saying it cannot connect to the API. I’m at a loss on what to do next. Would appreciate the help from someone who’s done it.
Description of steps you’ve taken to attempt to solve the issue
I’ve run this script and all containers seem to be fine - no errors that I can see in the logs. Final line shows Graylog started succesfully. Is there any additional configuration I need to do to get the API to connect in Docker? (I xxxx’d out the http as I could only put in two links). Thank you!
docker run --name mongo -d mongo:4.2
docker run --name elasticsearch -e "xxxx.host=0.0.0.0" -e "discovery.type=single-node" -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" -d docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
docker run --name graylog --link mongo --link elasticsearch -p 9000:9000 -p 12201:12201 -p 1514:1514 -p 5555:5555 -e GRAYLOG_HTTP_EXTERNAL_URI="xxxx://127.0.0.1:9000/" -d graylog/graylog:4.0
When I go to localhost 9000, the UI is there, but I get the following error still:
We are experiencing problems connecting to the Graylog server running on xxxx://127.0.0.1:9000/api/ . Please verify that the server is healthy and working correctly.
Here’s the tail end of my docker container log for Graylog. I don’t see any errors or anything, and what’s before this seems like it may be irrrelvent - it does show it connects to mongo and elastic serach OK:
11 13:53:28,554 INFO : org.graylog2.periodical.Periodicals - Starting [org.graylog.plugins.collector.periodical.PurgeExpiredCollectorsThread] periodical in [0s], polling every [3600s].
2021-09-11 13:53:46,938 INFO : org.glassfish.grizzly.http.server.NetworkListener - Started listener bound to [0.0.0.0:9000]
2021-09-11 13:53:46,939 INFO : org.glassfish.grizzly.http.server.HttpServer - [HttpServer] Started.
2021-09-11 13:53:46,939 INFO : org.graylog2.shared.initializers.JerseyService - Started REST API at <0.0.0.0:9000>
2021-09-11 13:53:46,939 INFO : org.graylog2.shared.initializers.ServiceManagerListener - Services are healthy
2021-09-11 13:53:46,940 INFO : org.graylog2.shared.initializers.InputSetupService - Triggering launching persisted inputs, node transitioned from Uninitialized [LB:DEAD] to Running [LB:ALIVE]
2021-09-11 13:53:46,940 INFO : org.graylog2.bootstrap.ServerBootstrap - Services started, startup times in ms: {GracefulShutdownService [RUNNING]=0, InputSetupService [RUNNING]=0, BufferSynchronizerService [RUNNING]=0, UrlWhitelistService [RUNNING]=0, JobSchedulerService [RUNNING]=0, OutputSetupService [RUNNING]=0, EtagService [RUNNING]=0, JournalReader [RUNNING]=0, KafkaJournal [RUNNING]=2, UserSessionTerminationService [RUNNING]=4, ConfigurationEtagService [RUNNING]=6, LookupTableService [RUNNING]=6, StreamCacheService [RUNNING]=8, MongoDBProcessingStatusRecorderService [RUNNING]=10, PeriodicalsService [RUNNING]=28, JerseyService [RUNNING]=18413}
2021-09-11 13:53:46,946 INFO : org.graylog2.bootstrap.ServerBootstrap - Graylog server up and running.
Environmental information
Docker 4.0.0 running linux containers
Operating system information
on a Windows 10 machine via Docker Desktop
Package versions
- Graylog 4.0
- MongoDB 4.2
- Elasticsearch 7.10.2
- Service logs, configuration, and environment variables - Nothing additional set that wasn’t set on docker run script above