From c4ca357454bb610358c89de7c38819379d9a730a Mon Sep 17 00:00:00 2001 From: emorino Date: Wed, 16 Jun 2021 13:27:47 +0200 Subject: [PATCH] Ajout erreur "Empty reply from server" --- HowtoElasticsearch.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/HowtoElasticsearch.md b/HowtoElasticsearch.md index 95c4d587..49336642 100644 --- a/HowtoElasticsearch.md +++ b/HowtoElasticsearch.md @@ -1070,3 +1070,30 @@ $ curl -XGET 'http://127.0.0.1:9200/_xpack/license' ~~~ > *Note* : si l'authentification est activée, on ajoutera l'option pour préciser un utilisateur `-u jdoe` + + +### Pas de réponse au curl ou erreur "Empty reply from server" + +Si lorsque on tente un curl pour voir l'état du cluster ES, et qu'on a pas de réponse ou alors si en mode verbose on a l'erreur suivante "Empty reply from server" : + +~~~ +# curl -vs 127.0.0.1:9200/_cat/indices +* Expire in 0 ms for 6 (transfer 0x55efb2682530) +* Trying 127.0.0.1... +* TCP_NODELAY set +* Expire in 200 ms for 4 (transfer 0x55efb2682530) +* Connected to 127.0.0.1 (127.0.0.1) port 9200 (#0) +> GET /_cat/indices HTTP/1.1 +> Host: 127.0.0.1:9200 +> User-Agent: curl/7.64.0 +> Accept: */* +> +* Empty reply from server +* Connection #0 to host 127.0.0.1 left intact +~~~ + +C'est probablement que les requêtes au serveur ES doivent se faire en https, avec authentification, on peut se connecter comme ceci avec la commande suivante : + +~~~ +curl -s -k https://127.0.0.1:9200/_cat/indices --user user:password +~~~