-
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 ssl => true
leads to exception "URI::InvalidURIError: bad URI(is not URI?)"
#102
Comments
The problem appears to be with this line. It replaces URL strings with ruby hashes. In my example, before:
and after this line
|
Currently setting Here's how I intend to make it behave, after this bug fix. it "should accept schema-less hosts"
it "should accept hosts with a schema"
it "should add https to schema-less hosts when specifying ssl true"
it "should log an error and raise, when specifying a schema in at least one host, and setting ssl true"
it "should log an error and raise, when specifying a schema in at least one host, and setting ssl false" Note that the last two are a bit more strict than the behaviour of output-elasticsearch. Specifying any schema in the host list, then setting I don't think we should jump through hoops to try to accomodate this behaviour. The user should either specify schema for all hosts, or not specify them for any. Then if you set If someone needs to specify a mixed set of SSL and not SSL, it's just as simple: specify your http and https schemas in the host list and don't touch the Of course the error will make it clear that they should use one or the other, not both. Same for the documentation for |
I can confirm I've been getting this as well. |
This bug cost me some hours :( One suggestion and one please I have: Suggestion Question Best regards, Nils |
Issue #129 is related to this as well. |
Thank you very much for taking the time to open this issue. I'm closing it as It seems to be already fixed by this PR #156. Please feel free to reopen if the problem still exists. Thanks! |
When specifying
ssl => true
(with or withoutca_cert
param), the URL string is not interpolated correctly. Here's the error raised:Notice the URL string appears to contain the full params hash (
hash.to_s
):https://{:host=>"https://example.us-central1.gcp.cloud.es.io:9243/", :scheme=>"https"}
instead of templating the fields in a string template (e.g."%{scheme}://%{host}" % { scheme: 'https', host: '...' }
)This particular trace was generated by the following configuration (subdomain of the cloud instance changed):
Known workaround
Specify all hosts with their
https://
prefix and do not specify thessl
attribute.Full stack trace
#<URI::InvalidURIError: bad URI(is not URI?): https://{:host=>"https://example.us-central1.gcp.cloud.es.io:9243/", :scheme=>"https"}:https>
The text was updated successfully, but these errors were encountered: