es扩容问题
来源:10-1 生产环境部署建议

慕娘7328627
2020-07-13
老师好,
- es集群admin密码找不到了,有什么好的办法找回或者修改吗?没有admin密码改不了下面问题的cluster配置。。。
- 集群扩容,需要把cluster.routing.allocation.disk.include_relocations设置为false,提升shard分配速度吗,或者还有其他地方需要修改,防止占用太多资源吗?
写回答
1回答
-
需要先增加个本地超级用户,然后再改,参考下面的链接
https://discuss.elastic.co/t/i-lost-the-password-that-has-been-changed/91867/2
Reseting the password for the elastic user To do this, you need to create an alternate superuser and then authenticate as that user in order to change the password for elastic. This requires a number of steps. (1) Stop your elasticsearch node (2) Ensure that the file realm is available on your elasticsearch node. If you are using a default X-Pack configuration for authentication, then the file realm is available and you don't need to do anything. However, if you have explicitly configured the authentication realms 332 in your elasticsearch.yml file, then you need to add a file realm 391 to the list of realms. (3) Use the bin/x-pack/users command to create a new file-based 198 superuser: bin/x-pack/users useradd my_admin -p my_password -r superuser (4) Start your elasticsearch node (5) Using curl, reset the password 245 for the elastic user: curl -u my_admin -XPUT 'http://localhost:9200/_xpack/security/user/elastic/_password?pretty' -H 'Content-Type: application/json' -d' { "password" : "new_password" } ' (6) Verify the new password curl -u elastic 'http://localhost:9200/_xpack/security/_authenticate?pretty' (7) If you wish, stop elasticsearch and then remove the file realm from your elasticsearch.yml and/or remove 113 the my_admin user from the file realm.
改relocations 没有用,可以改如下配置:
PUT _cluster/settings { "persistent": { "cluster": { "routing": { "allocation": { "cluster_concurrent_rebalance": "30", "node_concurrent_recoveries": "20" } } }, "indices": { "recovery": { "max_bytes_per_sec": "200m" } } } }
rebalance /recoveries 值越小,同时迁移的分片数就小
max_bytes_per_sec 值越小,对网络带宽占用就小,那么迁移的就慢,消耗资源也小
012020-08-18
相似问题