Hello,
We're using ES6.2.4 stack over mesos platform.
We use marathon and marathon-lb (GitHub - mesosphere/marathon-lb: Marathon-lb is a service discovery & load balancing tool for DC/OS) project in order to orchestrate and publish ES624 cross search instances and using official ES docker images.
Elasticsearch Cross Search is registered to Marathon-LB with this settings:
"labels": {
"HAPROXY_0_VHOST": "elasticsearch-cross-search.SUFFIXDNS"
Kibana service is launched setting this environment variable:
ELASTICSEARCH_URL": "http://elasticsearch-cross-search.SEFFIXDNS",
It seems a simple configuration but this is not working fine, in fact, Kibana can not connect to ES.
{"type":"log","@timestamp":"2018-05-20T06:41:22Z","tags":["status","plugin:elasticsearch@6.2.4","info"],"pid":15,"state":"yellow","message":"Status changed from uninitialized to yellow - Waiting for Elasticsearch","prevState":"uninitialized","prevMsg":"uninitialized"}
....
{"type":"log","@timestamp":"2018-05-20T06:41:22Z","tags":["error","elasticsearch","admin"],"pid":15,"message":"Request error, retrying\nHEAD http://elasticsearch-cross-search.SUFFIXDNS:9200/ => connect ECONNREFUSED 10.B.C.D:9200"}
{"type":"log","@timestamp":"2018-05-20T06:41:22Z","tags":["warning","elasticsearch","admin"],"pid":15,"message":"Unable to revive connection: http://elasticsearch-cross-search.SUFFIXDNS:9200/"}
{"type":"log","@timestamp":"2018-05-20T06:41:22Z","tags":["warning","elasticsearch","admin"],"pid":15,"message":"No living connections"}
....
{"type":"log","@timestamp":"2018-05-20T06:41:22Z","tags":["status","plugin:elasticsearch@6.2.4","error"],"pid":15,"state":"red","message":"Status changed from yellow to red - Unable to connect to Elasticsearch at http://elasticsearch-cross-search.SUFFIXDNS.","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
The first step was modify ELASTICSEARCH_URL environment using IP and PORT of ES instance and it was working fine.
This is not working well due to the published port by elasticsearch is 9200 instead 80
The fix has been specify the port in ELASTICSEARCH_URL environment variable.
ELASTICSEARCH_URL": "http://elasticsearch-cross-search.SUFFIXDNS:80",
Kibana traces was these
{"type":"log","@timestamp":"2018-05-20T07:10:02Z","tags":["status","plugin:elasticsearch@6.2.4","info"],"pid":15,"state":"yellow","message":"Status changed from uninitialized to yellow - Waiting for Elasticsearch","prevState":"uninitialized","prevMsg":"uninitialized"}
....
{"type":"log","@timestamp":"2018-05-20T07:10:02Z","tags":["status","plugin:elasticsearch@6.2.4","info"],"pid":15,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
I think Kibana should modify the code in order to use the default ports from the protocol instead the port 9200