i am getting below error when i was trying to connect to Elastic HQ. Local instance of elasticsearch is running. Elastic search version is 2.0.0.
in the elasticsearch.yml, http.cors.enabled: true is set
Received the following error:
ElasticHQ: Unable to Connect to Server! Received Status Code: 0. A status code of 0, could mean the host is unreacheable or nothing is listening on the given port. Did you enable CORS?
am i missing something?
# ---------------------------------- Network -----------------------------------
#
# Set the bind adress to a specific IP (IPv4 or IPv6):
#
network.host: 127.0.0.1
#
# Set a custom port for HTTP:
#
http.port: 9200
http.cors.enabled: true
The browser console says
Inside ErrorMessage
all.min.js:12 http://127.0.0.1:9200
all.min.js:12 Inside ClusterHealth
all.min.js:12 Inside ClusterState
all.min.js:12 Inside IndexStatsModel
all.min.js:12 Inside NodeList
index.html:1 XMLHttpRequest cannot load http://127.0.0.1:9200/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
all.min.js:12 Failed to Connect on Ping!
It works now!. i have to add another entry in elasticsearch.yml
http.cors.allow-origin: "*"
http.cors.enabled: true
node.master: true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With