Elastic Cloud Heroku REST not allowed

Hii,

I am getting the following error while trying to setup a RoR application. What am I missing?

Elasticsearch::Transport::Transport::Errors::Unauthorized: [401] {"error":{"root_cause":[{"type":"security_exception","reason":"unable to authenticate user [maplenest_rw] for REST request [/products]","header":{"WWW-Authenticate":"Basic realm="shield" charset="UTF-8""}}],"type":"security_exception","reason":"unable to authenticate user [maplenest_rw] for REST request [/products]","header":{"WWW-Authenticate":"Basic realm="shield" charset="UTF-8""}},"status":401}

Cluster ID: e41aa1....

Hi @Shirsendu_Karmakar,

the user "maplenest_rw" cannot be authenticated. Did you double-check your configuration in Elastic Cloud and in your Rails application?

Please try first whether you can connect to the cluster with curl. Something along those lines should produce a HTTP 200:

curl --user maplenest_rw:CHANGE_THIS_TO_YOUR_PASSWORD https://CHANGE_THIS_TO_YOUR_CLOUD_CLUSTER_URL:9243

Daniel

Hii Daniel,

Thanks for the quick reply. maplenest_rw doesn't seem to have access maplenest_admin however does. What change needs to be made in the following to allow it access?

readwrite:
cluster: monitor
indices:
'*': all

Hii Daniel,

Nevermind. I fixed it. Not sure how but I am guessing I wasn't copying the username and passwords correctly :confused:

Sorry about that.

Thanks.

Hi @Shirsendu_Karmakar,

no worries. Great that it works now. :slight_smile:

Daniel

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