Graylog2 / docker-compose

A set of Docker Compose files that allow you to quickly spin up a Graylog instance for testing or demo purposes.
Apache License 2.0
357 stars 134 forks source link

The status of graylog_graylog_1 is unhealthy #22

Closed CherMet90 closed 1 year ago

CherMet90 commented 1 year ago

In docker logs graylog_graylog_1 I see the follow messages:

2023-02-06 07:05:28,363 INFO : org.mongodb.driver.cluster - Cluster description not yet available. Waiting for 30000 ms before timing out
2023-02-06 07:05:38,358 INFO : org.mongodb.driver.cluster - Exception in monitor thread while connecting to server mongodb:27017
com.mongodb.MongoSocketOpenException: Exception opening socket
        at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70) ~[graylog.jar:?]
        at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:180) ~[graylog.jar:?]
        at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:193) [graylog.jar:?]
        at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:157) [graylog.jar:?]
        at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.net.SocketTimeoutException: Connect timed out
        at sun.nio.ch.NioSocketImpl.timedFinishConnect(Unknown Source) ~[?:?]
        at sun.nio.ch.NioSocketImpl.connect(Unknown Source) ~[?:?]
        at java.net.SocksSocketImpl.connect(Unknown Source) ~[?:?]
        at java.net.Socket.connect(Unknown Source) ~[?:?]
        at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:107) ~[graylog.jar:?]
        at com.mongodb.internal.connection.SocketStream.initializeSocket(SocketStream.java:79) ~[graylog.jar:?]
        at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:65) ~[graylog.jar:?]
        ... 4 more
2023-02-06 07:05:58,363 INFO : org.graylog2.bootstrap.preflight.MongoDBPreflightCheck - MongoDB is not available. Retry #1
2023-02-06 07:06:00,364 INFO : org.mongodb.driver.cluster - Cluster description not yet available. Waiting for 30000 ms before timing out
2023-02-06 07:06:30,364 INFO : org.graylog2.bootstrap.preflight.MongoDBPreflightCheck - MongoDB is not available. Retry #2
2023-02-06 07:06:32,365 INFO : org.mongodb.driver.cluster - Cluster description not yet available. Waiting for 30000 ms before timing out

I use docker-compose.yml from enterprise directory without editing. I just created .env file and added values for GRAYLOG_PASSWORD_SECRET and GRAYLOG_ROOT_PASSWORD_SHA2. That's all. What I do wrong?

bernd commented 1 year ago

@CherMet90 Can you please include the full docker compose logs? Thank you!

CherMet90 commented 1 year ago

@bernd Sure! docker-compose.log

bernd commented 1 year ago

@CherMet90 Thanks for the logs. Apart from Graylog logging the MongoDB error, I can't find anything that explains your problem.

I use docker-compose.yml from enterprise directory without editing. I just created .env file and added values for GRAYLOG_PASSWORD_SECRET and GRAYLOG_ROOT_PASSWORD_SHA2. That's all. What I do wrong?

I just tried to reproduce it in a clean environment but I can't reproduce your problem, unfortunately. The Graylog setup in the enterprise directory starts cleanly when running docker compose up.

You could try cleaning your environment with docker compose down -v, pull the latest images with docker compose pull, and then try again.

Since this doesn't look like a bug in the Docker Compose files, I am closing this issue.

Thank you!