Jast blog Jast blog
首页
  • 《Ambari自定义开发教程》笔记
  • 《CDH教程》笔记
  • 《ClickHouse教程》笔记
  • 《HDFS教程》笔记
  • 《DolphinScheduler教程》笔记
  • 《Hbase教程》笔记
  • 《Iceberg教程》笔记
  • 《Hive教程》笔记
  • 《Flume教程》笔记
  • 《Kafka教程》笔记
  • 《Impala教程》笔记
  • 《Hue教程》笔记
  • 《Spark教程》笔记
  • 《Flink教程》笔记
  • 《Phoenix教程》笔记
  • 《ElasticSearch教程》笔记
  • 《Kylin教程》笔记
  • 《Storm教程》笔记
  • 《Yarn教程》笔记
  • 《Presto教程》笔记
  • 《图数据库教程》笔记
  • 《Kerberos教程》笔记
  • 《Maxwell教程》笔记
  • 《MinIO教程》笔记
  • 《DataX教程》笔记
  • 《Superset教程》笔记
  • 《IOTDB教程》笔记
  • 《大数据相关》笔记
  • 《PaddleNLP教程》笔记
  • 《Nginx教程》笔记
  • 《Java技术文档》
  • 《Maven教程》笔记
  • 《IDEA使用教程》
  • 学习
  • 面试
  • 心情杂货
  • 实用技巧
  • 友情链接
关于
收藏
  • 分类
  • 标签
  • 归档

Jast-zsh

如果你知道你要去哪里,全世界都会给你让路。
首页
  • 《Ambari自定义开发教程》笔记
  • 《CDH教程》笔记
  • 《ClickHouse教程》笔记
  • 《HDFS教程》笔记
  • 《DolphinScheduler教程》笔记
  • 《Hbase教程》笔记
  • 《Iceberg教程》笔记
  • 《Hive教程》笔记
  • 《Flume教程》笔记
  • 《Kafka教程》笔记
  • 《Impala教程》笔记
  • 《Hue教程》笔记
  • 《Spark教程》笔记
  • 《Flink教程》笔记
  • 《Phoenix教程》笔记
  • 《ElasticSearch教程》笔记
  • 《Kylin教程》笔记
  • 《Storm教程》笔记
  • 《Yarn教程》笔记
  • 《Presto教程》笔记
  • 《图数据库教程》笔记
  • 《Kerberos教程》笔记
  • 《Maxwell教程》笔记
  • 《MinIO教程》笔记
  • 《DataX教程》笔记
  • 《Superset教程》笔记
  • 《IOTDB教程》笔记
  • 《大数据相关》笔记
  • 《PaddleNLP教程》笔记
  • 《Nginx教程》笔记
  • 《Java技术文档》
  • 《Maven教程》笔记
  • 《IDEA使用教程》
  • 学习
  • 面试
  • 心情杂货
  • 实用技巧
  • 友情链接
关于
收藏
  • 分类
  • 标签
  • 归档
  • ElasticSearch单机版安装
  • ElasticSearch7集群安装
  • ElasticSearch-Head浏览器插件离线安装
  • ElasticSearch-SQL浏览器离线插件安装
  • ElasticSearch快照脚本
  • ELasticSearch监控之Cerebro
  • Elasticsearch-SQL
  • ElasticSearch优化指南
  • ElastiSearch Merger
  • Elasticsearch Pipeline 详解
  • ElasticSearch正确的重启方式
  • ElasticSearch查询模板Mustache
  • ElasticSearch索引模板
  • ElasticSearch集群快照
  • ElasticSearch集群修改密码
    • 方法一
    • 方法二
  • 深入理解ElasticSearch慢查询日志
  • ElasticSearch Kibana白金级破解
  • ElasticSearch API查看集群状态
  • ElasticSearch DSL操作
  • ElasticSearch Script操作数据
  • ElasticSearch中副本和分片如何优化?
  • Docker安装ElasticSearchDump备份数据
  • ElasticSearch使用Grafana监控服务状态
  • Grafana配置ElasitcSearch监控-独立部署版本
  • ElasticSearch批量修改报错
  • ElasticSearch数据版本冲突
  • ElasticSearch索引_cat统计数量与_count统计数量不一致
  • Kibana使用Nginx反向代理设置提示404
  • ElasticSearch优化之线程池介绍
  • 当ElasticSearch时间字段设置多个格式到底是用的哪个?
  • 《ElasticSearch教程》笔记
Jast-zsh
2024-04-08
目录

ElasticSearch集群修改密码

[toc]

集群设置密码后通过下面这两个方法都可以进行密码修改

# 方法一

通过发送HTTP请求进行密码修改

$ curl -XPOST -u elastic "bigdata-01:9200/_security/user/elastic/_password" -H 'Content-Type: application/json' -d'{"password" : "123456789"}'
Enter host password for user 'elastic': # 输入我们原密码
1
2

password:123456789 指定的是我们修改后的密码

# 方法二

当我们想通过bin/elasticsearch-setup-passwords interactive修改密码时,发现提示密码已经设置过了,没有办法再次设置。

tip:

echo -e 'y\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n'

这段命令是直接将987654当成密码设置,实现一行命令交互设置密码。

# echo -e 'y\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n' | bin/elasticsearch-setup-passwords interactive
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
Future versions of Elasticsearch will require Java 11; your Java version from [/usr/local/src/jdk1.8.0_151/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.

Failed to authenticate user 'elastic' against http://172.31.0.8: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 /usr/hdp/3.1.5.0-152/elasticsearch/config/elasticsearch.keystore

ERROR: Failed to verify bootstrap password
1
2
3
4
5
6
7
8
9
10
11

删除.security-7索引之后,就可以继续使用上面命令进行密码设置了。

删除索引

curl -X DELETE "http://bigdata-01:9200/.security-7" -u elastic:123456
1

重新设置密码,设置成功。

$ echo -e 'y\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n987654\n' | bin/elasticsearch-setup-passwords interactive
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME
Future versions of Elasticsearch will require Java 11; your Java version from [/usr/local/src/jdk1.8.0_151/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.


Changed password for user [apm_system]
Changed password for user [kibana_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
上次更新: 2024/04/08, 10:55:49
ElasticSearch集群快照
深入理解ElasticSearch慢查询日志

← ElasticSearch集群快照 深入理解ElasticSearch慢查询日志→

最近更新
01
Linux可视化监控
02-26
02
Maven私服搭建
02-26
03
当ElasticSearch时间字段设置多个格式到底是用的哪个?
01-19
更多文章>
Theme by Vdoing | Copyright © 2016-2025 Jast-zsh | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式