Hi All ,
Keep on getting below error while connecting to elasticsearch
2020-02-06T17:12:19,846][INFO ][logstash.outputs.elasticsearch][main] Using default mapping template
[2020-02-06T17:12:20,150][ERROR][logstash.outputs.elasticsearch][main] Failed to install template. {:message=>"Got response code '401' contacting Elasticsearch at URL 'https://search-z2-dev-elasticsearch-1-timer54qzb7fbe2kxivrrtuwj.us-east-2.es.amazonaws.com:443/_xpack'", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError", :backtrace=>["/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/http_client/manticore_adapter.rb:80:in `perform_request'", "/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:291:in `perform_request_to_url'", "/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:278:in `block in perform_request'", "/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:373:in `with_connection'", "/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:277:in `perform_request'", "/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/http_client/pool.rb:285:in `block in Pool'", "/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/http_client.rb:162:in `get'", "/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/http_client.rb:378:in `get_xpack_info'", "/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/ilm.rb:57:in `ilm_ready?'", "/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/ilm.rb:28:in `ilm_in_use?'", "/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/template_manager.rb:14:in `install_template'", "/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/common.rb:130:in `install_template'", "/Users/znrind-a0053/elasticsearch/logstash-7.4.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-10.1.0-java/lib/logstash/outputs/elasticsearch/common.rb:51:in `block in setup_after_successful_connection'"]}
warning: thread "Ruby-0-Thread-5: :1" terminated with exception (report_on_exception is true):
LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError: Got response code '401' contacting Elasticsearch at URL 'https://search-z2-dev-elasticsearch-1-timer54qzb7fbe2kxivrrtuwj.us-east-2.es.amazonaws.com:443/_xpack'
below is my logstash output
output{
elasticsearch {
hosts => "search-z2-dev-elasticsearch-1-timer54qzb7fbe2kxivrrtuwj.us-east-2.es.amazonaws.com:443"
ssl => true
}
stdout{codec => rubydebug}
}
Don't understand why _xpack appending to URL.
Below URL is working without _xpack extension
https://search-z2-dev-elasticsearch-1-timer54qzb7fbe2kxivrrtuwj.us-east-2.es.amazonaws.com:443/_xpack