Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

elasticsearch: handle case when user forgets to set port number #317

Closed
n-riesco opened this issue Dec 13, 2017 · 6 comments
Closed

elasticsearch: handle case when user forgets to set port number #317

n-riesco opened this issue Dec 13, 2017 · 6 comments
Labels

Comments

@n-riesco
Copy link
Contributor

n-riesco commented Dec 13, 2017

See #316 (comment)

@n-riesco n-riesco added the bug label Dec 13, 2017
@n-riesco n-riesco changed the title elasticsearch: handle case when user forgets to set port elasticsearch: handle case when user forgets to set port number Dec 13, 2017
@shannonlal
Copy link
Contributor

Nicolas,
As I mentioned in the original issue (#316 ) there might be an issue with using NGINX infront of Elastic Search. I looked at the code last night and there might be an issue with the port. I can run some tests tonight but I think if we can make the port optional (to support NGINX) this could solve the problem. I will update this a little later tonight.

Thanks

@shannonlal
Copy link
Contributor

Before we go and enforce the port with Elastic Search I think it might be a good idea to leave it as optional. I am working my way through a related ElasticSearch issue (#316 ) and by making the port optional it is allowing me to connect to ElasticSearch cluster behind a NGINX server.

@n-riesco
Copy link
Contributor Author

No, that's not what I mean.

At the moment, when Falcon connects to an elasticsearch server, it requests _cat/indices. Unfortunately, the server replies to this request even if the port number isn't set.

We need a more robust way to confirm the user has given us the right URL (regardless of whether that URL has a port number or not).

@shannonlal
Copy link
Contributor

Ok makes sense. If you want help fixing this let me know. As I mentioned in issue #316 I am currently working my way through Elasticsearch.js to figure out what is causing the 400 error.

@shannonlal
Copy link
Contributor

I was looking back at this issue and I was able to get ElasticSearch back up and running. I wanted to see about solutions to validate the url. Would you be looking for something like performing a regex evaluation of the url string? Or would you like a solution which tries to connect to the ElasticSearch server and validate that it is up and running?

If it is the regex expression, I can throw together a regex expression and a PR pretty quickly

@n-riesco
Copy link
Contributor Author

n-riesco commented Feb 1, 2018

@shannonlal I'm working on this connector in PR #343 (I'll address this issue there).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants