Authentication Error After Configuring SSL

I'm trying to configure ssl and basic authentication in an Amazon EC2 instance. I've installed the elasticsearch, opened authentication by setting to true, and set a password to built-in users with bin/elasticsearch-setup-passwords interactive. It was working nicely, I could access to elasticsearch with my password without any problem. But when I configured the ssl to elastic, it started to not accepting the same password!

I can still access to the elastic if i disable the authentication with ssl. But i also need the authentication.

Moreover, I can authenticate with this curl with http protocol:
curl -u elastic ''

But when I use https, it's giving authentication error:
curl -u elastic ''

{ "type" : "security_exception", "reason" : "failed to authenticate user [elastic]", "header" : { "WWW-Authenticate" : [ "Bearer realm=\"security\"", "ApiKey", "Basic realm=\"security\" charset=\"UTF-8\"" ] } }

What's going on? Do you have any ideas? How can i fix it?

My yml settings below:


  • discovery.seed_hosts: []

  • discovery.type: single-node

  • true

  • true

  • /etc/elasticsearch/ssl/

  • /etc/elasticsearch/ssl/

Any suggestions here?

Found the problem. Just added certificate to the elasticsearch.yml and voila! It's working now.

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