Problem with logstash output to elastic via ssl

I have the next output config:

output {
        file {
                path => "/var/log/logstash/output"

               elasticsearch {
                        hosts => [""]
                        index => "example-test"
                        ssl => true
                        cacert => "/etc/logstash/keys/logstash-test.key"
                        user => "logstash_system"
                        password => "qwerty"

And logstash do not connected to es. In log, I view next messages:

[WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://elastic:xxxxxx@",
:error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://elastic:xxxxxx@][Manticore::ClientProt
ocolException] failed to respond"}

[WARN ][logstash.licensechecker.licensereader] Marking url as dead. Last error: [LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError] Elast
icsearch Unreachable: [http://elastic:xxxxxx@][Manticore::ClientProtocolException] failed to respond {:url=>http://elastic:xxxxxx@, :error_m
essage=>"Elasticsearch Unreachable: [http://elastic:xxxxxx@][Manticore::ClientProtocolException] failed to respond", :error_class=>"LogStash::Outputs::Elas

[ERROR][logstash.pipeline ] Error registering plugin {:pipeline_id=>"main", :plugin=>"#<LogStash::OutputDelegator:0x158b7b08 @namespaced_metric=#<LogStas
h::Instrument::NamespacedMetric:0x7fcd616e @metric=#<LogStash::Instrument::Metric:0xe43efe9 @collector=#<LogStash::Instrument::Collector:0x4e3e8046 @agent=nil, @metric_store=#<LogStash:
:Instrument::MetricStore:0xa3f1b2 @store=#<Concurrent::map:0x00000000000fb8 entries=3 default_proc=nil>, @structured_lookup_mutex=#<Mutex:0x147

I set hosts => [""] in config,but in logs say taht logstash connected to [http://elastic:xxxxxx@].

I check connect from console:
curl -k -XGET -u logstash_system
and it work!

help please

Have you gone through these settings?

I do these settings and after that I have next error:

:error=>"Host name '' does not match the certificate subject provided by the peer (CN=N4xpr8W)"

I regenerate certs, with ip. and it work. But logstash can not create template

[ERROR][logstash.outputs.elasticsearch] Failed to install template. {:message=>"Got response code '403' contacting Elasticsearch at URL '

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