我使用以下命令启动了Elasticsearch Docker容器。然后,我尝试使用https://github.com/Anchormen/sql4es
中的驱动程序进行连接每次,我得到“没有已配置的节点可用[127.0.0.1]”。可能是什么问题?
elasticsearch.yml具有network.host = 0.0.0.0
JDBC URL:jdbc:sql4es://127.0.0.1:9300 / sample?cluster.name = docker-cluster
docker run --name=elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.3.2
curl -XGET http://127.0.0.1:9200/_nodes/http?pretty
{
"_nodes" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"cluster_name" : "docker-cluster",
"nodes" : {
"aTrIrCDtSzmeF1vy6MnUcg" : {
"name" : "aTrIrCD",
"transport_address" : "172.17.0.3:9300",
"host" : "172.17.0.3",
"ip" : "172.17.0.3",
"version" : "6.3.2",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "053779d",
"roles" : [
"master",
"data",
"ingest"
],
"attributes" : {
"ml.machine_memory" : "2076528640",
"xpack.installed" : "true",
"ml.max_open_jobs" : "20",
"ml.enabled" : "true"
},
"http" : {
"bound_address" : [
"0.0.0.0:9200"
],
"publish_address" : "172.17.0.3:9200",
"max_content_length_in_bytes" : 104857600
}
}
}
}