Issues will configure xpack in cluster

Hi Team,

I am trying to configure a new cluster . it worked fine. before i try to configure xpack. I have followed this article https://www.elastic.co/blog/getting-started-with-elasticsearch-security
If i disable xpack in elasticsearch.yml. it works fine . Elastic search is starting but not able to get localhost:9200 i am not able to generate password. Below is the error of elastic search logs

Kindly guide me .

Regards,
Prem.

Please do not post screenshots of logs. Many people read these forums over email or on mobile devices where screenshots are difficult to read.

The message in your logs is not the cause of your problem.

What happens whe you try to connect to localhost over curl?
What does your elasticsearch.yml look like?

Hi Tim,

Here is the output of curl

[root@ elasticsearch]# curl http://1:9200
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401}

and here is the config elasticsearch.yml

xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: full
xpack.security.transport.ssl.keystore.path: premelastciclustermaster-01.p12
xpack.security.transport.ssl.truststore.path: premelastciclustermaster-01.p12

[root@premtestclustermaster elasticsearch]# bin/elasticsearch-setup-passwords auto

Failed to authenticate user 'elastic' against http://:9200/_security/_authenticate?pretty
Possible causes include:

  • The password for the 'elastic' user has already been changed on this cluster
  • Your elasticsearch node is running against a different keystore
    This tool used the keystore at /etc/elasticsearch/elasticsearch.keystore

ERROR: Failed to verify bootstrap password

Kindly help me solve this issue.

Regards,
Prem.

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