Access Denied to ES


(Allie Yang Yang) #1

I am trying to use logstash beta version 5.0 to parse data. I also installed Xpacks. However, below is the error code. How could i access ES server (beta version):

[2016-09-23T16:44:28,382][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>["http://localhost:9200"]}}
[2016-09-23T16:44:28,385][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
[2016-09-23T16:44:28,450][ERROR][logstash.outputs.elasticsearch] Failed to install template. {:message=>"Got response code '401' contact Elasticsearch at URL 'http://localhost:9200'", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError"}
[2016-09-23T16:44:28,451][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["localhost:9200"]}
[2016-09-23T16:44:28,452][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>1000}
[2016-09-23T16:44:28,455][INFO ][logstash.pipeline ] Pipeline main started
[2016-09-23T16:44:28,489][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
hello
[2016-09-23T16:44:56,777][ERROR][logstash.outputs.elasticsearch] Got a bad response code from server, but this code is not considered retryable. Request will be dropped {:code=>401}


(Allie Yang Yang) #2

solved. Need to set access in Kibana


#3

Can you clarify what you did the solve the problem? I started hitting this issue once I enabled X-Pack in the cluster. V5.0.0.

[2016-10-27T18:08:26,553][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>["http://logstash:7XcEdf667kNh9C8f9tBt@localhost:9200"]}}
[2016-10-27T18:08:26,555][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
[2016-10-27T18:08:26,745][ERROR][logstash.outputs.elasticsearch] Failed to install template. {:message=>"Got response code '401' contact Elasticsearch at URL 'http://~hidden~:~hidden~@localhost:9200'", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError"}
[2016-10-27T18:08:26,746][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["localhost"]}
[2016-10-27T18:08:26,754][INFO ][logstash.pipeline        ] Starting pipeline {"id"=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>1000}
[2016-10-27T18:08:26,768][INFO ][logstash.pipeline        ] Pipeline main started
[2016-10-27T18:08:26,845][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
[2016-10-27T18:08:27,221][ERROR][logstash.outputs.elasticsearch] Got a bad response code from server, but this code is not considered retryable. Request will be dropped {:code=>401}

Edit: See https://www.elastic.co/guide/en/x-pack/current/logstash.html for instructions on adding logstash_writer role and creating a logstash_internal user in the Management > Roles UI in Kibana


(Generalibm Jang) #4

I 've met the same problem, I just want to how to set access in Kibana!

Could you show more clues???


(Robert Chen) #5

trying to add user and password to logstash, it even does not recognize:


(Robert Chen) #6

Did you find the solution?


(Akash Paradkar) #7

how to do that? i followed the steps on that link and i'm getting this error now


Unable to communicate with Elasticseach
(system) #8