ElasticHQ: Unable to Connect to Server! Received Status Code: 0

Selvakumar Esra

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?

Elasticsearch Configuration

    # ---------------------------------- 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

Browser Console Message

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!
Selvakumar Esra

It works now!. i have to add another entry in elasticsearch.yml

http.cors.allow-origin: "*"
http.cors.enabled: true 
node.master: true

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Received status code 407 from server: Proxy Authentication Required

Genymotion error :Unable to create the virtual device server returned HTTP status code 0

status: Unable to connect to Upstart:

fatal: unable to access 'x.git': Received HTTP code 404 from proxy after CONNECT

Android Studio: Gradle sync failed: Could not HEAD '...'. Received status code 502 from server: Bad Gateway

Android Studio gradle Received status code 400 from server: Bad Request

Gradle Could not GET. Received status code 502 from server: Bad Gateway

Failed to install map box in my android app with Received status code 403 from server: Forbidden

InfluxDB v2.0 running in docker - ERR: received status code 401 from server

EF Code First: Unable to connect to local SQL server DB

Unable to connect Microsoft SQL-Server and Visual Studio code

Error: Response not successful: Received status code 400

Http response error.status received as 0 but not actual status

Unable to connect to MSSQL Server

Unable To Connect To RADIUS Server

Unable to connect to a ssh server

unable to connect to centos server

Unable to connect to SQL Server

How to connect to NodeJS server(No Express) with nativescript code.("status code: Unknown Error")

Kubectl command throwing error: Unable to connect to the server: getting credentials: exec: exit status 2

Unable to connect to Azure Cosmos Db Account using Microsoft.EntityFrameworkCore.Cosmos - Response status code

Invalid certificate received from server. Error code: 0xffffffff800b010a Mono

Could not GET 'https://jcenter.bintray.com/com/google/' Received status code 502 from server: Bad Gateway

Gradle build fails for Received status code 407 from server: Proxy Authentication Required, but another project's with similar deps succeeds

Could not GET 'play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

Not able to connect to server through java code. Getting javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

Visual Studio Code mssql extention: SQL Server (mssql) - Unable to connect to server

mssql_connect(): Unable to connect to server

PHP - mssql_connect(): Unable to connect to server