How can use property ca_file in Elasticsearch input plugin?

When I use ca_file in Elasticsearch input plugin, A error apper.
The config is :
input {
elasticsearch {
hosts => "elasticsearch:9200"
index => "index-2019-04-07"
size => 1000
scroll => "5m"
docinfo => true
ca_file => "./client.pem"
ssl => true
}
}

the error info :
[2019-04-02T19:11:29,583][ERROR][logstash.pipeline ] A plugin had an unrecoverable error. Will restart this plugin.
Pipeline_id:main
Plugin: <LogStash::Inputs::Elasticsearch size=>1000, ca_file=>"./client.pem", hosts=>["elasticsearch:9200"], scroll=>"5m", index=>"index-2019-04-07", docinfo=>true, id=>"61934748e7064e62318016d251a33a9ee05585079a2b", ssl=>true, enable_metric=>true, codec=><LogStash::Codecs::JSON id=>"json_6-ca99-4b82-a589-90ec4b60eb82", enable_metric=>true, charset=>"UTF-8">, query=>"{ "sort": [ "_doc" ] }", docinfo_target=>"@metadata", docinfo_fields=>["_index", "_type", "_id"]>
Error: [400]

400 No required SSL certificate was sent

400 Bad Request

No required SSL certificate was sent
openresty/1.11.2.4

Exception: Elasticsearch::Transport::Transport::Errors::BadRequest
Stack: /opt/app/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/base.rb:202:in __raise_transport_error' /opt/app/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/base.rb:319:inperform_request'
/opt/app/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/http/faraday.rb:20:in perform_request' /opt/app/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/client.rb:131:inperform_request'
/opt/app/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/elasticsearch-api-5.0.5/lib/elasticsearch/api/actions/search.rb:183:in search' /opt/app/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-elasticsearch-4.2.1/lib/logstash/inputs/elasticsearch.rb:200:indo_run'
/opt/app/logstash-6.5.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-elasticsearch-4.2.1/lib/logstash/inputs/elasticsearch.rb:188:in run' /opt/app/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:409:ininputworker'
/opt/app/logstash-6.5.4/logstash-core/lib/logstash/pipeline.rb:403:in `block in start_input'

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.