Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Could not successfully connect to ElasticSearch. Check that your cluster state is not RED and that ElasticSearch is running properly

Tags:

graylog2

I've referred to Setup a graylog2 server with elasticsearch in a vagrant machine and I have the correct version of ElasticSearch.

I've also added the right options for Graylog2 and ElasticSearch as per the tutorial.

ERROR: Could not successfully connect to ElasticSearch. Check that your cluster state is not RED and that ElasticSearch is running properly.

Need help?

* Official documentation: http://support.torch.sh/help/kb
* Mailing list: http://support.torch.sh/help/kb/general/forums-mailing-list
* Issue tracker: http://support.torch.sh/help/kb/general/issue-trackers
* Commercial support: http://www.torch.sh/

But we also got some specific help pages that might help you in this case:

* http://support.torch.sh/help/kb/graylog2-server/configuring-and-tuning-elasticsearch-for-graylog2-v0200

Terminating. :(

I'm still getting that error when I run:

sudo java -jar /opt/graylog2-server/graylog2-server.jar --debug

I've also checked that ElasticSearch is running properly -

central@central:~$ curl -XGET 'http://127.0.0.1:9200/_cluster/health?pretty=true'
{
  "cluster_name" : "graylog2",
  "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
}

Any suggestions on what I should do? I'm not understanding what the problem is.

like image 288
A23 Avatar asked Aug 30 '14 11:08

A23


2 Answers

I got the setup to run with the following additions -

# /etc/elasticsearch/elasticsearch.yml
cluster.name: graylog2
node.master: true
node.data: true
bootstrap.mlockall: true
ES_HEAP_SIZE: 8192 (@ 16GB memory)
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicasts.hosts: [“127.0.0.1”, "SERVER IP"]

# /etc/graylog2.conf
elasticsearch_discovery_zen_ping_multicast_enabled = false
elasticsearch_discovery_zen_ping_unicast_hosts = IP_ARR:9300
like image 199
A23 Avatar answered Oct 14 '22 14:10

A23


I'm not sure why A23's question is being downvoted. I too was unable to get graylog2-server running. The key seems to be setting the elasticsearch_discovery_zen_ping_unicast_hosts to a valid IP set.

This of course is not mentioned in the graylog docs as a setting that should be changed in the graylog2.conf file:

http://www.graylog2.org/resources/documentation/setup/server

Which is a bit annoying.

like image 30
letsgoyeti Avatar answered Oct 14 '22 14:10

letsgoyeti