We see errors in log files and logstash could not able to establish the pipeline. Below are the errors
[2019-02-17T05:19:41,166][ERROR][logstash.outputs.elasticsearch] Invalid setting for elasticsearch output plugin:
output {
elasticsearch {
# This setting must be a path
# File does not exist or cannot be opened /etc/logstash/certs/cert.pem
cacert => "/etc/logstash/certs/cert.pem"
...
}
}
[2019-02-17T05:19:41,172][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Something is wrong with your configuration."}
Please help any one has done TLS/SSL enable at logstash level
After fixing few issues now i see below error in logstash log file
[2019-02-26T03:03:24,541][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"https://logstash_user:xxxxxx@localhost:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [https://logstash_user:xxxxxx@localhost:9200/][Manticore::ClientProtocolException] Received fatal alert: bad_certificate"}
Logstash says that it doesn't like the certificate of Elasticsearch. This can happen for a number of reasons, please share the relevant parts of your Logstash configuration, your Elasticsearch configuration and the elasticsearch logs. Otherwise it's really hard to guess what could be going on
Controls the server’s behavior in regard to requesting a certificate from client connections. Valid values are required , optional , and none . required forces a client to present a certificate, while optional requests a client certificate but the client is not required to present one. Defaults to none .
By setting this to required you declare that Logstash (and anything else that connects to Elasticsearch via http ) should authenticate with a client certificate and key. Is this what you want ?
Because your logstash elasticsearch output plugin configuration seems to imply that you want to authenticate with a username and password, and not with a client certificate.
Can you describe what you want to achieve so that we can help you get there?
I am trying to enable TLS from log stash to Elastic search. Currently am authenticating with user & password and along with that i would like to add SSL certification as well.
Hi, can you add more details? Do you want to protect the communication with TLS ( this provides integrity and confidentiality to the communication between Logstash and Elasticsearch) or do you also want to authenticate Logstash with a client certificate instead of username/password ? Do you have an explicit requirement for the latter?
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.