-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifying a schema (http/https) as part of a host definition will override the default port #110
Labels
Comments
I've filed a bug on the Elasticsearch Ruby Client (elastic/elasticsearch-ruby#625), since their use of Since this project is pinned to 5.x I'm going to look into
|
yaauie
added a commit
to yaauie/logstash-filter-elasticsearch
that referenced
this issue
Mar 26, 2019
An upstream bug in the Elasticsearch Ruby Client's handling of `String` host arguments that begin with a schema (e.g., `https://localhost`) causes it to default to port 80 or 443, depending on the schema, instead of Elasticsearch's port 9200. Since the Elasticsearch Ruby Client will accept a `URI` in this case, and will correctly handle falling through to appropriate defaults, we normalise to `URI::Generic`, which does not have a default port. We absorb the `ssl => true` case into this normalisation, as its previous implementation prevented the use of non-default ports in the array provided to `hosts`. Supersedes: logstash-plugins#104 Resolves: logstash-plugins#110
yaauie
added a commit
to yaauie/logstash-filter-elasticsearch
that referenced
this issue
Mar 26, 2019
An upstream bug in the Elasticsearch Ruby Client's handling of `String` host arguments that begin with a schema (e.g., `https://localhost`) causes it to default to port 80 or 443, depending on the schema, instead of Elasticsearch's port 9200. Since the Elasticsearch Ruby Client will accept a `URI` in this case, and will correctly handle falling through to appropriate defaults, we normalise to `URI::Generic`, which does not have a default port. We absorb the `ssl => true` case into this normalisation, as its previous implementation prevented the use of non-default ports in the array provided to `hosts`. We also add support for IPv6 addresses, requiring a square-bracketed notation (see: RFC2732) Supersedes: logstash-plugins#104 Resolves: logstash-plugins#110 Resolves: logstash-plugins#111
yaauie
added a commit
to yaauie/logstash-filter-elasticsearch
that referenced
this issue
Mar 27, 2019
An upstream bug in the Elasticsearch Ruby Client's handling of `String` host arguments that begin with a schema (e.g., `https://localhost`) causes it to default to port 80 or 443, depending on the schema, instead of Elasticsearch's port 9200. Since the Elasticsearch Ruby Client will accept a `URI` in this case, and will correctly handle falling through to appropriate defaults, we normalise to `URI::Generic`, which does not have a default port. We absorb the `ssl => true` case into this normalisation, as its previous implementation prevented the use of non-default ports in the array provided to `hosts`. We also add support for IPv6 addresses, requiring a square-bracketed notation when used in conjunction with a specified port. (see: RFC-3986) Supersedes: logstash-plugins#104 Resolves: logstash-plugins#110 Resolves: logstash-plugins#111
yaauie
added a commit
to yaauie/logstash-filter-elasticsearch
that referenced
this issue
Mar 27, 2019
An upstream bug in the Elasticsearch Ruby Client's handling of `String` host arguments that begin with a schema (e.g., `https://localhost`) causes it to default to port 80 or 443, depending on the schema, instead of Elasticsearch's port 9200. Since the Elasticsearch Ruby Client will accept a `URI` in this case, and will correctly handle falling through to appropriate defaults, we normalise to `URI::Generic`, which does not have a default port. We absorb the `ssl => true` case into this normalisation, as its previous implementation prevented the use of non-default ports in the array provided to `hosts`. We also add support for IPv6 addresses, requiring a square-bracketed notation when used in conjunction with a specified port. (see: RFC-3986) Supersedes: logstash-plugins#104 Resolves: logstash-plugins#110 Resolves: logstash-plugins#111
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested on:
logstash-filter-elasticsearch (3.6.0)
Defining a connection schema will override the default port (
9200
) for a given host.Scenario: Elasticsearch node bound to loopback/localhost:
hosts => ["localhost:9200"]
- workshosts => ["localhost"]
- workshosts => ["http://localhost"]
- doesn't workThe text was updated successfully, but these errors were encountered: