mobz / elasticsearch-head

A web front end for an elastic search cluster
http://mobz.github.io/elasticsearch-head/
Other
9.42k stars 2.02k forks source link

cluster health: not connected #335

Open Git-Rajkumar opened 7 years ago

Git-Rajkumar commented 7 years ago

I have build node machine and create a docker container, go to http://10.1.2.20:9100 and see head plugin page with out connect elastic search.

plugin head Image: https://imagebin.ca/v/3OfnafZ6oJkf

My env:

docker 1 ==> efk (10.1.2.10) docker 2 ==> elasticsearch-head(10.1.2.20)

elasticsearech-head command:

   docker run -it -d  -h elasticsearch-head.net --restart=always --name elasticsearch-head -v /vagrant/elasticsearch-head:/elasticsearch-head  -p 9100:9100 --net internet --ip 10.1.2.20  --privileged elasticserarch-head

I pointed docker 1 elasticsearch url to docker 2 elasticsearch-head plugin.

I have find out elasticsearch url based on port(9200) using files and pointed to our elastic search url

I chenaged to elasticsearch Url in below files:

   ./src/app/services/cluster/clusterSpec.js
./src/app/ui/clusterConnect/clusterConnectSpec.js
./src/app/app.js
./proxy/clusters/localhost9200.json
./proxy/clusters/xpack.json
./_site/app.js

Replace http://localhost:9200/ to http://10.1.2.20:9200

but Stil not connected elasticsearch in head plugin, suggest me I need to change any other files and how to fix this.

gogobd commented 7 years ago

I had a "not connected" issue with Firefox and solved it by disabling the Cross Origin Request Security (CORS) with a plugin I found; not sure if that helps...

lazycece commented 6 years ago

I had a "not connected" issue with Firefox and solved it by disabling the Cross Origin Request Security (CORS) with a plugin I found; not sure if that helps...

yes,i find the problem today,and try to add cors-config on elasticsearch.yml, which solve successful