Hello.
I have the next output config:
output { file { path => "/var/log/logstash/output" } elasticsearch { hosts => ["https://127.0.0.1:9200"] 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@127.0.0.1:9200/",
:error_type=>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://elastic:xxxxxx@127.0.0.1:9200/][Manticore::ClientProt
ocolException] 127.0.0.1:9200 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@127.0.0.1:9200/][Manticore::ClientProtocolException] 127.0.0.1:9200 failed to respond {:url=>http://elastic:xxxxxx@127.0.0.1:9200/, :error_m
essage=>"Elasticsearch Unreachable: [http://elastic:xxxxxx@127.0.0.1:9200/][Manticore::ClientProtocolException] 127.0.0.1:9200 failed to respond", :error_class=>"LogStash::Outputs::Elas
ticSearch::HttpClient::Pool::HostUnreachableError"}[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:0x00000000000fb8 entries=3 default_proc=nil>, @structured_lookup_mutex=#<Mutex:0x147
I set hosts => ["https://127.0.0.1:9200"] in config,but in logs say taht logstash connected to [http://elastic:xxxxxx@127.0.0.1:9200/].
I check connect from console:
curl -k -XGET https://127.0.0.1:9200 -u logstash_system
and it work!