Home > Java > javaTutorial > body text

How to solve the problem of configuring the account and password of the ElasticSearch cluster environment in Java

WBOY
Release: 2023-04-20 12:43:06
forward
2739 people have browsed it

1. Modify the elasticsearch.yml of the main site and add the following line:

xpack.security.enabled: true

2. Generate a security key

Cut to the ES installation directory and execute bin/elasticsearch-certutil ca -out config/elastic-certificates.p12 -pass ""

will generate elastic in the /home/elasticsearch-7.9.3/config directory -certificates.p12

3. Continue to modify the ES yml file

Add the following four lines:

xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates .p12

4. Update the configuration of the cluster node

Copy elastic-certificates.p12 to the config of other nodes, and modify the yml of other nodes at the same time.

5. Restart ES

6. Execute ./elasticsearch-setup-passwords interactive to set the password.

7. Problem handling during the process:

7.1 After executing the third step, execute ./elasticsearch-setup-passwords interactive directly. Always prompts "ERROR: Failed to set password for user [apm_system]"

How to solve the problem of configuring the account and password of the ElasticSearch cluster environment in Java

##8. Effect:

How to solve the problem of configuring the account and password of the ElasticSearch cluster environment in Java

The above is the detailed content of How to solve the problem of configuring the account and password of the ElasticSearch cluster environment in Java. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template