Unable to retrieve version from Elasticsearch node

Hello,

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:

curl -XGET http://localhost:9200/_cluster/health?pretty=true
{
** “cluster_name” : “docker-cluster”,**
** “status” : “green”,**
** “timed_out” : false,**
** “number_of_nodes” : 1,**
** “number_of_data_nodes” : 1,**
** “active_primary_shards” : 0,**
** “active_shards” : 0,**
** “relocating_shards” : 0,**
** “initializing_shards” : 0,**
** “unassigned_shards” : 0,**
** “delayed_unassigned_shards” : 0,**
** “number_of_pending_tasks” : 0,**
** “number_of_in_flight_fetch” : 0,**
** “task_max_waiting_in_queue_millis” : 0,**
** “active_shards_percent_as_number” : 100.0**
}

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?

Do you have elasticsearch and Graylog in seperate containers?

And which terminal were you running the curl command from?

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

I connected as root on the server on bash

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.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.