-
Notifications
You must be signed in to change notification settings - Fork 157
Debugging connection issues
Please try the following steps if you have trouble connecting to your cluster:
Try to curl
your cluster directly, for example
# curl an unprotected cluster
curl -X GET "http://localhost:9200"
# curl a cluster that uses ssl
curl -k -X GET "https://localhost:9200"
# curl a cluster that uses authorization
curl -k -X GET -u elastic:yourpassword "https://localhost:9200"
Proceed to the next step if you see a response similar to this one:
{
"name" : "cars10-thinkpad",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "-KjsfLD2TYC36a4FvviZjA",
"version" : {
"number" : "8.2.2",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "9876968ef3c745186b94fdabd4483e01499224ef",
"build_date" : "2022-05-25T15:47:06.259735307Z",
"build_snapshot" : false,
"lucene_version" : "9.1.0",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}
You can skip this step if you use elasticvue as a browser extension or the desktop version. If you use the web version, the docker version or any other self-hosted style then you have to configure your cluster.
config/elasticsearch.yml
:
http.cors.enabled: true
http.cors.allow-origin: /.*/
# and if your cluster is password protected you also have to add:
http.cors.allow-headers: X-Requested-With,Content-Type,Content-Length,Authorization
Try to open the url of your cluster in the browser. Literally open it as a web page, e.g. https://localhost:9200. The following things could happen now:
-
Security warning. If your browser does not trust the SSL certificate that your cluster uses you will not be able to connect. Please visit Access clusters using SSL to trust the certificate.
-
Login prompt. If you see a login prompt simply enter the credentials of your elasticsearch user. So for example username
elastic
and the related password.
If you got past the security warning & login (or if you didn't even get them) you should see the same json response that you got with curl, for example:
If you can access your cluster in the browser (and provided the necessary configuration) then you can access the cluster in elasticvue. If you still have issues please double-check that you have used the correct url (also make sure to use http
or https
appropriately) and double-check the used credentials.
And if you still have issues you can also try the desktop version of elasticvue or open an issue here to discuss your problem. Please include screenshots of the curl output / browser console when possible.