elastic: v5 connect panic: no Elasticsearch node available
Please use the following questions as a guideline to help me answer your issue/question without further inquiry. Thank you.
Which version of Elastic are you using?
[ ] elastic.v5 (for Elasticsearch 5.x)
Please describe the expected behavior
panic: no Elasticsearch node available
Please describe the actual behavior
// Create a client
client, err := elastic.NewClient(elastic.SetURL("http://192.168.33.10:9200"))
if err != nil {
panic(err)
}
curl -s -XGET 'http://192.168.33.10:9200/_nodes/http?pretty=1'
{
"_nodes" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"cluster_name" : "es-search",
"nodes" : {
"qoa_gnFlTtSPjUiQWH_I9g" : {
"name" : "node-1",
"transport_address" : "10.0.2.15:9300",
"host" : "10.0.2.15",
"ip" : "10.0.2.15",
"version" : "5.0.0",
"build_hash" : "253032b",
"roles" : [
"master",
"data",
"ingest"
],
"http" : {
"bound_address" : [
"[::]:9200"
],
"publish_address" : "10.0.2.15:9200",
"max_content_length_in_bytes" : 104857600
}
}
}
}
Any steps to reproduce the behavior?
Run the code above
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (8 by maintainers)
@478682649 Thinking of making this the official slogan of the library: “elastic.SetSniff(false) is a Go library for Elasticsearch” 😉