I installed GrayLog on Docker, the installation went well but I don’t understand why it can’t connect to Elasticsearch.
When I test from the terminal everything works:
However, in Console Portainer I get the following error:
2024-02-13 19:42:01,251 ERROR: org.graylog2.storage.versionprobe.VersionProbe - Unable to retrieve version from Elasticsearch node: Failed to connect to /127.0.0.1:9200. - Connection refused.
2024-02-13 19:42:01,251 INFO : org.graylog2.storage.versionprobe.VersionProbe - OpenSearch/Elasticsearch is not available. Retry #155
Do you have any ideas on how to solve this problem?
No!
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e1f9583aac9f graylog/graylog:5.2 “/usr/bin/tini – wa…” 2 days ago Up 2 days (unhealthy) 0.0.0.0:514->514/tcp, :::514->514/tcp, 0.0.0.0:7555->7555/tcp, :::7555->7555/tcp, 0.0.0.0:8514->8514/tcp, 0.0.0.0:8514->8514/udp, :::8514->8514/tcp, :::8514->8514/udp, 0.0.0.0:12201->12201/tcp, :::12201->12201/tcp, 0.0.0.0:12201->12201/udp, :::12201->12201/udp, 9000/tcp graylog-graylog-1
b63b06202f96 docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2 “/tini – /usr/local…” 2 days ago Up 2 days 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9300/tcp
graylog-elasticsearch-1
9f83cb9af413 mongo:6.0 “docker-entrypoint.s…” 2 days ago Up 2 days 27017/tcp
Using 127.0.0.1 in docker can be funny, I would use the name of the docker container running elastic search in your Graylog config. Also since you are running 5.2 highly recommend using Opensearch instead of Elastic as it’s getting near its end of life in support from Graylog.