Reputation: 1
Attempted to resurrect connection to dead ES instance, but got an error {:url=>"http://provider:[email protected]:9200/", :exception=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :message=>"Got response code '401' contacting Elasticsearch at URL 'http://192.168.15.29:9200/'"}
Logstash URL is not working. Im trying to transfer data from my mongoDB to elastic. For that the logstash URL should work. Can someone help ?
Upvotes: 0
Views: 430
Reputation: 3690
you are using provider user. Make sure that the user has privileges to write.
you can test it with curl:
curl -XPOST "https://192.168.15.29:9200/test-index/_bulk" -H "Content-Type: application/json" -d'
{ "index":{ } }
{ "@timestamp": "2099-05-06T16:21:15.000Z", "message": "192.0.2.42 - - [06/May/2099:16:21:15 +0000] \"GET /images/bg.jpg HTTP/1.0\" 200 24736"}
' -u provider:password
test with superuser (elastic):
curl "https://localhost:9200" -k -u elastic:password
OR
curl "http://localhost:9200" -k -u elastic:password
if you don't remember the password you can reset the elastic user password.
bin/elasticsearch-reset-password -u elastic -i
Upvotes: 0