How to authenticate?

What's going on with my Elasticsearch in my app?

My app is RoR and deployed to Heroku.

I get this error:
Faraday::ConnectionFailed (Failed to open TCP connection to localhost:9200 (Connection refused - connect(2) for "localhost" port 9200))

And I try to access my FOUNDELASTICSEARCH_URL, which is
... I'm being asked for login.
I then try to login with my Elasticsearch login info, but the login box just appears again.

Then I click 'Cancel' and met by the JSON which you see in the image in the link below. "unable to authenticate user for REST request [/]""

Also I saw in other topics that I have to visit to find the answer.
But when I visit that URL, I get this error: "
Sorry, you don't have access to that topic!"

What's really going on here? :slight_smile:

Thank you

  • Jonas

If you are looking for Elastic Cloud support please see

Please also see

Hi warklom

Thanks but I'm not looking for support for the cloud.

I'm looking for support regarding the Elasticsearch function in Ruby on Rails app deployed on Heroku.

Thank you

I found the answer. Should run the following commands:

heroku addons:create bonsai

heroku config:set ELASTICSEARCH_URL=heroku config:get BONSAI_URL

heroku run rake searchkick:reindex CLASS=PutYourClassHere

heroku run rake db:migrate

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