A bit new into SSL/TLS. I do have managed to get Logstash to work with Searchguard/Elasticsearch (elasticsearch output) on a test server but when trying to use the elasticsearch filter plugin I get a ConnectionFailed warning in Logstash but nothing from Elasticsearch.
Thanks. I have tried trial-and-erroring with the following ca_file options (not sure which one to put in, so I just tried each one):
Using self-signed certificates (listed in keystore.jks)
ca_file => "/dir/server.cer"
ca_file => "/dir/server.pem"
And the jks files from the demo
ca_file => "/etc/elasticsearch/trustore.jks"
ca_file => "/etc/elasticsearch/keystore.jks"
ca_file => "/etc/elasticsearch/kirk.jks"
Nothing worked and it just produces similar errors as previously pasted.
Adding in some details:
Elastic Stack - 5.5.0
Ubuntu 16.0.4
ES and Logstash are in the same machine
-I'm also able to curl --insecure 127.0.0.1 without setting a certificate file
Is there a viable workaround for enrichment of data? (Without JDBC) Like, would creating 2-3 translate filters instead as lookup be safe in terms of performance?
Hi @cito.ets , I am facing the same issue with elasticsearch filter. I compiled a gem file from master of logstash-filter-elasticsearch which contains the bug fix.
I used a config with SSL false and ca_file pointing to PEM file of my CA but the configuration still fails with below error [2017-09-27T13:16:01,437][WARN ][logstash.filters.elasticsearch] Failed to query elasticsearch for previous event {:index=>"logstash-XXX-task-his-*", :query=>{"query"=> {"bool"=>{"must_not"=>{"exists"=>{"field"=>"srvr_status"}}, "must"=>[{"match"=> {"srvr_user_name.keyword"=>"XXX"}}]}}, "_source"=>["row_id", "srvr_start_ts", "srvr_end_ts"]}, :event=>2017-09-27T12:16:00.378Z %{host} %{message}, :error=># <Faraday::SSLError>
On ElasticSearch server I get below error [2017-09-27T12:39:01,315][WARN ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [ES-DEV-NODE-1] caught exception while handling client http traffic, closing connection [id: 0x6a69b4ce, L:0.0.0.0/0.0.0.0:9203 ! R:/10.33.15.194:38707] io.netty.handler.codec.DecoderException: javax.net.ssl.SSLException: Received fatal alert: certificate_unknown
Will keep you posted if I make progress on getting it to work.
Hi @cito.ets, my configuration is finally working based on the new GEM file that I used. The SSL error was resolved by setting ca_file to path of .cer file that contained chained cert for my intermediate and root CA. Previously I was using only Intermediate CA.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.