Сбой эластичного поискового соединения. Curl работает только с опцией fsSL. curl -fsSL "http://elasticsearch_client_docker/"
дает следующий вывод:
"name" : "ea241d36b96a",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "kcCzza3iQFWxnCv6Fz4zFg",
"version" : {
"number" : "7.1.1",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "7a013de",
"build_date" : "2019-05-23T14:04:00.380842Z",
"build_snapshot" : false,
"lucene_version" : "8.0.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
, но с опцией out -fsSL я получаю следующий вывод:
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.13.8</center>
</body>
</html>
Теперь я хочу подключиться к этому упругому поиску с использованиемasticsearchAPI в питоне. Я получаю сообщение об ошибке: Ошибка подключения.
elastic_client = Elasticsearch(hosts=["http://elasticsearch_client_docker/"], use_ssl=True, verify_certs=True, ca_certs=certifi.where())
if not elastic_client.ping():
raise ValueError("connection Failed")