{"action":"created","issue":{"url":"https://api.github.com/repos/olivere/elastic/issues/166","labels_url":"https://api.github.com/repos/olivere/elastic/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/olivere/elastic/issues/166/comments","events_url":"https://api.github.com/repos/olivere/elastic/issues/166/events","html_url":"https://github.com/olivere/elastic/issues/166","id":116802592,"number":166,"title":"TestClientWithBasicAuth fails","user":{"login":"pebbe","id":829557,"avatar_url":"https://avatars.githubusercontent.com/u/829557?v=3","gravatar_id":"","url":"https://api.github.com/users/pebbe","html_url":"https://github.com/pebbe","followers_url":"https://api.github.com/users/pebbe/followers","following_url":"https://api.github.com/users/pebbe/following{/other_user}","gists_url":"https://api.github.com/users/pebbe/gists{/gist_id}","starred_url":"https://api.github.com/users/pebbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pebbe/subscriptions","organizations_url":"https://api.github.com/users/pebbe/orgs","repos_url":"https://api.github.com/users/pebbe/repos","events_url":"https://api.github.com/users/pebbe/events{/privacy}","received_events_url":"https://api.github.com/users/pebbe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-11-13T16:31:38Z","updated_at":"2015-11-26T10:23:21Z","closed_at":"2015-11-13T18:00:57Z","body":"I'm using Elasticsearch 2.0.0\r\n\r\nI have installed shield. I have made a user `user` with password `secret`\r\n\r\nI test with curl, this works:\r\n\r\n```\r\n$curl -XGET 'http://user:secret@127.0.0.1:9200/?pretty'\r\n{\r\n  \"name\" : \"p209327\",\r\n  \"cluster_name\" : \"kleiweg\",\r\n  \"version\" : {\r\n    \"number\" : \"2.0.0\",\r\n    \"build_hash\" : \"de54438d6af8f9340d50c5c786151783ce7d6be5\",\r\n    \"build_timestamp\" : \"2015-10-22T08:09:48Z\",\r\n    \"build_snapshot\" : false,\r\n    \"lucene_version\" : \"5.2.1\"\r\n  },\r\n  \"tagline\" : \"You Know, for Search\"\r\n}\r\n```\r\n\r\nBut elastic fails:\r\n```\r\n$ go test -v -run TestClientWithBasicAuth gopkg.in/olivere/elastic.v3\r\n=== RUN   TestClientWithBasicAuth\r\n--- FAIL: TestClientWithBasicAuth (5.01s)\r\n        client_test.go:124: no Elasticsearch node available\r\nFAIL\r\nexit status 1\r\nFAIL    gopkg.in/olivere/elastic.v3     5.011s\r\n```"},"comment":{"url":"https://api.github.com/repos/olivere/elastic/issues/comments/159869504","html_url":"https://github.com/olivere/elastic/issues/166#issuecomment-159869504","issue_url":"https://api.github.com/repos/olivere/elastic/issues/166","id":159869504,"user":{"login":"olivere","id":134848,"avatar_url":"https://avatars.githubusercontent.com/u/134848?v=3","gravatar_id":"","url":"https://api.github.com/users/olivere","html_url":"https://github.com/olivere","followers_url":"https://api.github.com/users/olivere/followers","following_url":"https://api.github.com/users/olivere/following{/other_user}","gists_url":"https://api.github.com/users/olivere/gists{/gist_id}","starred_url":"https://api.github.com/users/olivere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivere/subscriptions","organizations_url":"https://api.github.com/users/olivere/orgs","repos_url":"https://api.github.com/users/olivere/repos","events_url":"https://api.github.com/users/olivere/events{/privacy}","received_events_url":"https://api.github.com/users/olivere/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T10:23:21Z","updated_at":"2015-11-26T10:23:21Z","body":"@sndaergg Okay. 3.0.6 is the current version for ES 2.x.\r\n\r\nIf you only want to connect to one node of your cluster, you have to disable sniffing and set the URL manually. See the [Wiki](https://github.com/olivere/elastic/wiki/Configuration) for details. But it is almost always more beneficial to have clients use all nodes for load-balancing."}}