Could not set the passworkd after enable the security

ElasticSearch version:7.12

After enable the xpack security with the guide:

To set password, then get the error:

bin/elasticsearch-setup-passwords interactive
future versions of Elasticsearch will require Java 11; your Java version from [/usr/java/jdk1.8.0_221-amd64/jre] does not meet this requirement

Failed to authenticate user 'elastic' against http://127.0.0.1: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 /opt/cloudera/parcels/ELASTICSEARCH/lib/elasticsearch/config/elasticsearch.keystore

ERROR: Failed to verify bootstrap password

The possible causes are listed in the error message. You should start by checking each of those.

How to check if the password for the 'elastic' user has already been changed?
And how to check the elasticsearch node is running against a different keystore

The cluster is build fresh. I never changed the password for elastic.
And I generate the keystore file at /opt/cloudera/parcels/ELASTICSEARCH/lib
/elasticsearch/config/elasticsearch.keystore

but I don't know how to check the es node is running with any keystore

in elasticsearch.yml

xpack.security.transport.ssl.keystore.path: /opt/cloudera/parcels/ELASTICSEARCH/lib/elasticsearch/config/certs/elastic-certificates.p12

generate the file elastic-certificates.p12 without enter any password

I grep the elasticsearch proccess,and get the proccess run with paramater:

cd /opt/cloudera/parcels/ELASTICSEARCH-7.12.1/lib/elasticsearch/bin/ && export ES_PATH_CONF=/opt/cloudera/parcels/ELASTICSEARCH-7.12.1/lib/elasticsearch/config/es-master01 && JAVA_HOME=/opt/cloudera/parcels/ELASTICSEARCH-7.12.1/lib/elasticsearch/jdk/

Then I run it before ./elasticsearch-setup-passwords interactive

The problem resolved.

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