logstash icon indicating copy to clipboard operation
logstash copied to clipboard

Connectivity between logstsash server and elasticsearch

Open himmatb opened this issue 8 years ago • 8 comments

Component version's :

Elasticsearch version: 2.4.4 Searchguard version: 2.4.4 Logstash version: 5.6.9

OS: RHEL 7

I choose this logstash 5.6.9 version after confirming with compatibilty with elasticsearch version https://www.elastic.co/support/matrix#matrix_compatibility

Below is logstash configuration:

output {
  elasticsearch {
    hosts => ["logging-es:9200"]
    cacert => '/etc/logstash/conf.d/keys/admin-ca.crt'
    ssl => true
    ssl_certificate_verification => false
    index => "logstash-%{+YYYY.MM.dd}"
    manage_template => false
    document_type => "%{[@metadata][type]}"
   }
  stdout { codec => rubydebug }
}

I am getting below error :

11:45:44.093 [Ruby-0-Thread-5: /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-7.4.2-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:228] WARN logstash.outputs.elasticsearch - Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://logging-es:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://logging-es:9200/][Manticore::ClientProtocolException] logging-es:9200 failed to respond"}

himmatb avatar May 31 '18 11:05 himmatb

Please help me on this..

himmatb avatar Jun 01 '18 15:06 himmatb

can you try with hosts => ["https://logging-es:9200"] ?

jsvd avatar Jun 01 '18 17:06 jsvd

Getting same error.. I am not sure whether this issue with elasticsearch logstash outputplugin or with my configuration.. I tried with truststore configuration.. Getting same error.. Please help me on this..

himmatb avatar Jun 03 '18 04:06 himmatb

can you confirm you can connect to ES with curl https://logging-es:9200 from that machine?

jsvd avatar Jun 04 '18 09:06 jsvd

I have elasticsearch configuration which using TLSv1.2 SSL protocol so Logstash must use TLSv1.2 or later to talk to Elasticsearch .I am not sure where to make configuration to make Logstsash output plugin to send logs using TLSv1.2 protocol.

how can I achieve this .. Please help me to resolve this ..

himmatb avatar Jun 05 '18 09:06 himmatb

Please let me know if you have aby workarounds to fix this issue..

himmatb avatar Jun 05 '18 20:06 himmatb

Is there anyway I can use certificate like below to connect with elasticsaerch:

 ssl_certificate => "/etc/logstash/ssl/logstash.crt"
  ssl_key => "/etc/logstash/ssl/logstash.key"

and ca certificate ?

himmatb avatar Jun 06 '18 07:06 himmatb

@himmatb I believe this is one ideally raised on the discuss forum. As my first note would be to review the SG LS v5 docs, for example here

Jymit avatar Jun 09 '18 17:06 Jymit