Logstash restarts continuously with below error when enabling ilm

Hello,

Am working on ilm settings in elasticsearch output plugin(logstash plugin) and I see Logstash restarts continuously with below error.

[2020-08-21T16:35:08,665][FATAL][logstash.runner ] An unexpected error occurred! {:error=>#<LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError: LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.3.3-java/lib/logstash/outputs/elasticsearch/http_client/manticore_adapter.rb:80:in perform_request'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.3.3-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:332:in perform_request_to_url'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.3.3-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:319:in block in perform_request'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.3.3-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:414:in with_connection'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.3.3-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:318:in perform_request'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.3.3-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:326:in block in Pool'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.3.3-java/lib/logstash/outputs/elasticsearch/http_client.rb:341:in exists?'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.3.3-java/lib/logstash/outputs/elasticsearch/http_client.rb:386:in ilm_policy_exists?'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.3.3-java/lib/logstash/outputs/elasticsearch/ilm.rb:86:in maybe_create_ilm_policy'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.3.3-java/lib/logstash/outputs/elasticsearch/ilm.rb:11:in setup_ilm'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.3.3-java/lib/logstash/outputs/elasticsearch/common.rb:54:in block in setup_after_successful_connection'"]}`

My logstash and template files are attached below :

Logstash Conf :

    input{
            udp {
                   port => 6571
           }
    }
    output {
            if [type] == "ilm_rollover" {
                    elasticsearch {
                                    template => "/etc/logstash/es_templates/ilm_rollover.json"
                                    template_name => "ilm_rollover.json"
                                    template_overwrite => true
                                    ilm_enabled => true
                                    ilm_rollover_alias => "ilm_rollover"
                                    ilm_pattern => "{now/d}-1"
                                    ilm_policy => "ilm_rollover"
                                    hosts => ["***es_hosts***"]
                                    ssl => true
                                    cacert => "es.pem"
                            }
            }
    }

Template ilm_rollover.json file :

     {
       "order": 0,
       "template": "ilm_rollover*",
       "settings": {
         "codec": "best_compression",
         "number_of_shards": "1",
         "number_of_replicas": "1",
         "index.routing.allocation.require.data": "hot"
     },
       "mappings": {
           "properties": {
                           "type": {
                                   "type": "keyword"
                           }
           }
       },
       "aliases": {}
   }

Thanks in advance..!

Regards,
Sai

Could that be this issue?

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