knes1/elktail

won't connect to URL

hexsprite opened this issue · 5 comments

I'm using a URL like: https://whatever/?apikey=foo-bar-baz-etc

And I get:

TRACE: elktail.go:282: Not saving query terms. Total terms: 0
ERROR: elktail.go:73: Could not connect Elasticsearch client to https://whatever/?apikey=foo-bar-baz-etc: no Elasticsearch node available.

I am new to ES in general so forgive me if I'm asking an obvious question.

knes1 commented

Could you try to connect to that URL using curl to make sure that URL is indeed working?

Try executing:
curl -XGET https://whatever/?apikey=foo-bar-baz-etc and report back the results.

Also, I think it's possible that query parameters in the URL might be causing problems. When I initially developed elktail for environment I work in, elastic search was configured on URL that looked like this: https://some.hostname.com/elastic (e.g. it was in sub-folder called elastic and not in the hostname's web root). I could not connect to it due to the library elktail uses to connect to elastic search (at the time) did not support connecting to elastic search at any other URL except the root (I found no reference in elastic search documentation that would imply that elastic search's endpoints shouldn't be anywhere else besides the root, yet the client lib didn't seem to support any other scenario). Which was also the motivation for building the SSH tunneling option.

If that is the case, the client lib did have some updates since then and I will research if new possibilites opened up. Otherwise, I will open an issue there and keep results posted in this issue.

knes1 commented

Other problem could be elastic 5.0 which is not supported at this time (hopefully, I'll roll out support for it in a week or two).

curl output

{
  "name" : "XXX",
  "cluster_name" : "NNN",
  "version" : {
    "number" : "2.3.5",
    "build_hash" : "NNN",
    "build_timestamp" : "2016-07-27T10:36:52Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.0"
  },
  "tagline" : "You Know, for Search"
}

Reporting as Elasticsearch 2.2

knes1 commented

I tested elktail with elasticsearch version 2 and seems to be working, so the version of elasticsearch is not an issue. I believe the issue is the query string part of the URL (e.g. ?apikey=foo-bar-baz-etc). Is this some publicly available service that is hosting your elasticsearch (so I could try to do some test)?

Additionally, could you post the output of
elktail -v3 --url https://whatever/?apikey=foo-bar-baz-etc

Thanks

@knes1 this is hosted by logit.io