Skip to content

v5 connect panic: no Elasticsearch node available #387

@zplzpl

Description

@zplzpl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions