I am trying to add a custom certificate (.pem) to the local trusted certificate store in RPi 4 running buster (headless.)
I have tried the following:
Copy the custom certificate file in:
/usr/local/share/ca-certificates/
/etc/ca-certificates/
/usr/share/ca-certificates-java/
/usr/share/ca-certificates/local/
/etc/ssl/certs/
and run the following commands:
dpkg-reconfigure ca-certificates
sudo update-ca-certificates
In all of the above combinations, I get 0 certs updated and I am unable to use the certificate in a Logstash (part of ELK stack) pipeline with the following error:
Jun 16 01:01:33 HOSTNAME logstash[4912]: /usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:346:in `inputworker'
Jun 16 01:01:33 HOSTNAME logstash[4912]: /usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:337:in `block in start_input'
Jun 16 01:01:34 HOSTNAME logstash[4912]: ....[2020-06-16T01:01:34,263][ERROR][logstash.javapipeline ][main][3ac418918ce70506b0ac53d00cf562268311b9742cc89d6f145f89775a16f11a] A plugin had an unrecoverable error. Will restart this plugin.
Jun 16 01:01:34 HOSTNAME logstash[4912]: Pipeline_id:main
Jun 16 01:01:34 HOSTNAME logstash[4912]: Plugin: <LogStash::Inputs::Elasticsearch password=><password>, hosts=>["192.168.0.2:9200"], query=>"{ \"sort\": [ \"_doc\" ] }", index=>"cloned-logstash-2020.01.07", id=>"3ac418918ce70506b0ac53d00cf562268311b9742cc89d6f145f89775a16f11a", ssl=>true, user=>"elastic", enable_metric=>true, codec=><LogStash::Codecs::JSON id=>"json_4365356d-45ad-4f71-a3ed-d2a0efb03ca0", enable_metric=>true, charset=>"UTF-8">, size=>1000, scroll=>"1m", docinfo=>false, docinfo_target=>"@metadata", docinfo_fields=>["_index", "_type", "_id"]>
***Jun 16 01:01:34 HOSTNAME logstash[4912]: Error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target***
Jun 16 01:01:34 HOSTNAME logstash[4912]: Exception: Manticore::ClientProtocolException
Jun 16 01:01:34 HOSTNAME logstash[4912]: Stack: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:37:in `block in initialize'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:79:in `call'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:274:in `call_once'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:158:in `code'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/http/manticore.rb:84:in `block in perform_request'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/base.rb:262:in `perform_request'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/http/manticore.rb:67:in `perform_request'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/client.rb:131:in `perform_request'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-api-5.0.5/lib/elasticsearch/api/actions/search.rb:183:in `search'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-elasticsearch-4.6.0/lib/logstash/inputs/elasticsearch.rb:321:in `search_request'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-elasticsearch-4.6.0/lib/logstash/inputs/elasticsearch.rb:269:in `do_run_slice'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-elasticsearch-4.6.0/lib/logstash/inputs/elasticsearch.rb:250:in `do_run'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-elasticsearch-4.6.0/lib/logstash/inputs/elasticsearch.rb:238:in `run'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:346:in `inputworker'
Jun 16 01:01:34 HOSTNAME logstash[4912]: /usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:337:in `block in start_input'
Jun 16 01:01:35 HOSTNAME logstash[4912]: .[2020-06-16T01:01:35,359][ERROR][logstash.javapipeline ][main][3ac418918ce70506b0ac53d00cf562268311b9742cc89d6f145f89775a16f11a] A plugin had an unrecoverable error. Will restart this plugin.
Jun 16 01:01:35 HOSTNAME logstash[4912]: Pipeline_id:main
Jun 16 01:01:35 HOSTNAME logstash[4912]: Plugin: <LogStash::Inputs::Elasticsearch password=><password>, hosts=>["192.168.0.2:9200"], query=>"{ \"sort\": [ \"_doc\" ] }", index=>"cloned-logstash-2020.01.07", id=>"3ac418918ce70506b0ac53d00cf562268311b9742cc89d6f145f89775a16f11a", ssl=>true, user=>"elastic", enable_metric=>true, codec=><LogStash::Codecs::JSON id=>"json_4365356d-45ad-4f71-a3ed-d2a0efb03ca0", enable_metric=>true, charset=>"UTF-8">, size=>1000, scroll=>"1m", docinfo=>false, docinfo_target=>"@metadata", docinfo_fields=>["_index", "_type", "_id"]>
**Jun 16 01:01:35 HOSTNAME logstash[4912]: Error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target**
Jun 16 01:01:35 HOSTNAME logstash[4912]: Exception: Manticore::ClientProtocolException
Jun 16 01:01:35 HOSTNAME logstash[4912]: Stack: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:37:in `block in initialize'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:79:in `call'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:274:in `call_once'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:158:in `code'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/http/manticore.rb:84:in `block in perform_request'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/base.rb:262:in `perform_request'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/http/manticore.rb:67:in `perform_request'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/client.rb:131:in `perform_request'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-api-5.0.5/lib/elasticsearch/api/actions/search.rb:183:in `search'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-elasticsearch-4.6.0/lib/logstash/inputs/elasticsearch.rb:321:in `search_request'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-elasticsearch-4.6.0/lib/logstash/inputs/elasticsearch.rb:269:in `do_run_slice'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-elasticsearch-4.6.0/lib/logstash/inputs/elasticsearch.rb:250:in `do_run'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-elasticsearch-4.6.0/lib/logstash/inputs/elasticsearch.rb:238:in `run'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:346:in `inputworker'
Jun 16 01:01:35 HOSTNAME logstash[4912]: /usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:337:in `block in start_input'
Jun 16 01:01:36 HOSTNAME logstash[4912]: [2020-06-16T01:01:36,471][ERROR][logstash.javapipeline ][main][3ac418918ce70506b0ac53d00cf562268311b9742cc89d6f145f89775a16f11a] A plugin had an unrecoverable error. Will restart this plugin.
Jun 16 01:01:36 HOSTNAME logstash[4912]: Pipeline_id:main
Jun 16 01:01:36 HOSTNAME logstash[4912]: Plugin: <LogStash::Inputs::Elasticsearch password=><password>, hosts=>["192.168.0.2:9200"], query=>"{ \"sort\": [ \"_doc\" ] }", index=>"cloned-logstash-2020.01.07", id=>"3ac418918ce70506b0ac53d00cf562268311b9742cc89d6f145f89775a16f11a", ssl=>true, user=>"elastic", enable_metric=>true, codec=><LogStash::Codecs::JSON id=>"json_4365356d-45ad-4f71-a3ed-d2a0efb03ca0", enable_metric=>true, charset=>"UTF-8">, size=>1000, scroll=>"1m", docinfo=>false, docinfo_target=>"@metadata", docinfo_fields=>["_index", "_type", "_id"]>
Jun 16 01:01:36 HOSTNAME logstash[4912]: Error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Jun 16 01:01:36 HOSTNAME logstash[4912]: Exception: Manticore::ClientProtocolException
Jun 16 01:01:36 HOSTNAME logstash[4912]: Stack: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:37:in `block in initialize'
Jun 16 01:01:36 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:79:in `call'
Jun 16 01:01:36 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:274:in `call_once'
Jun 16 01:01:36 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/response.rb:158:in `code'
Jun 16 01:01:36 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/http/manticore.rb:84:in `block in perform_request'
Jun 16 01:01:36 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/base.rb:262:in `perform_request'
Jun 16 01:01:36 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/http/manticore.rb:67:in `perform_request'
Jun 16 01:01:36 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/client.rb:131:in `perform_request'
Jun 16 01:01:36 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/elasticsearch-api-5.0.5/lib/elasticsearch/api/actions/search.rb:183:in `search'
Jun 16 01:01:36 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-elasticsearch-4.6.0/lib/logstash/inputs/elasticsearch.rb:321:in `search_request'
Jun 16 01:01:36 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-elasticsearch-4.6.0/lib/logstash/inputs/elasticsearch.rb:269:in `do_run_slice'
Jun 16 01:01:36 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-elasticsearch-4.6.0/lib/logstash/inputs/elasticsearch.rb:250:in `do_run'
Jun 16 01:01:36 HOSTNAME logstash[4912]: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-elasticsearch-4.6.0/lib/logstash/inputs/elasticsearch.rb:238:in `run'
This is the error Jun 16 01:01:34 HOSTNAME logstash[4912]: Error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I've followed instructions from these two posts: Entrusted Certificates installation https://www.raspberrypi.org/forums/viewtopic.php?t=204129