我在我的开发机器(单个笔记本)中使用Elasticsearch 1.4.4.一切都设置为默认值,因为我从未更改过任何设置.
当我启动它时,我通常会收到以下消息:
[2015-10-27 09:38:31,588][INFO ][node ] [Milan] version[1.4.4], pid[33932], build[c88f77f/2015-02-19T13:05:36Z]
[2015-10-27 09:38:31,588][INFO ][node ] [Milan] initializing ...
[2015-10-27 09:38:31,592][INFO ][plugins ] [Milan] loaded [], sites []
[2015-10-27 09:38:34,665][INFO ][node ] [Milan] initialized
[2015-10-27 09:38:34,665][INFO ][node ] [Milan] starting ...
[2015-10-27 09:38:34,849][INFO ][transport ] [Milan] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.81.1.108:9300]}
[2015-10-27 09:38:35,022][INFO ][discovery ] [Milan] elasticsearch/DZqnmWIZRpapZY_TPkkMBw
[2015-10-27 09:38:38,787][INFO ][cluster.service ] [Milan] new_master [Milan][DZqnmWIZRpapZY_TPkkMBw][THINKANDACT1301][inet[/10.81.1.108:9300]], reason: zen-disco-join (elected_as_master)
[2015-10-27 09:38:38,908][INFO ][http ] [Milan] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/10.81.1.108:9200]}
[2015-10-27 09:38:38,908][INFO ][node ] [Milan] started
[2015-10-27 09:38:39,220][INFO ][gateway ] [Milan] recovered [4] indices into cluster_state
[2015-10-27 09:39:08,801][INFO ][cluster.routing.allocation.decider] [Milan] low disk watermark [15%] exceeded on [DZqnmWIZRpapZY_TPkkMBw][Milan] free: 58.6gb[12.6%], replicas will not be assigned to this node
[2015-10-27 09:39:38,798][INFO ][cluster.routing.allocation.decider] [Milan] low disk watermark [15%] exceeded on [DZqnmWIZRpapZY_TPkkMBw][Milan] free: 58.6gb[12.6%], replicas will not be assigned to this node
[2015-10-27 09:40:08,801][INFO ][cluster.routing.allocation.decider] [Milan] low disk watermark [15%] exceeded on [DZqnmWIZRpapZY_TPkkMBw][Milan] free: 58.6gb[12.6%], replicas will not be assigned to this node
....
Run Code Online (Sandbox Code Playgroud)
我看到很多这些"低磁盘水印......超出......"的消息.我的情况出了什么问题?怎么解决?谢谢!
UPDATE
在这篇文章之前,我搜索了SO的相关帖子.我发现一个与"高水印......"有关,在这种情况下,磁盘空间很小.在我的情况下,我检查了,我的磁盘上还剩56GB.
UPDATE
根据Andrei Stefan的意见,我需要更改设置.我应该这样做:
curl -XPUT localhost:9200/_cluster/settings -d '{
"transient" : {
"cluster.routing.allocation.disk.threshold_enabled" : false
}
}'
Run Code Online (Sandbox Code Playgroud)
或者我可以编辑任何设置文件来设置它吗?
sas*_*rsl 66
如果你喜欢我有很多磁盘你可以调整水印设置:
cluster.routing.allocation.disk.watermark.low
控制磁盘使用的低水位线.它默认为85%,这意味着一旦使用超过85%的磁盘,ES将不会为节点分配新的分片.它也可以设置为绝对字节值(如500mb),以防止ES在小于配置的可用空间量时分配分片.
和
cluster.routing.allocation.disk.watermark.high
控制高水印.默认为90%,这意味着如果节点磁盘使用率超过90%,ES将尝试将分片重定位到另一个节点.它也可以设置为绝对字节值(类似于低水印),以便重新定位分片,一旦小于节点上可用的配置空间量.
https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html
请注意:
百分比值是指已用磁盘空间,而字节值是指可用磁盘空间.这可能令人困惑,因为它颠覆了高低的含义.例如,将低水印设置为10gb,将高水印设置为5gb是有意义的,但不是相反.
在我的5TB磁盘上,我设置了:
# /etc/elasticsearch/elasticsearch.yml
cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.flood_stage: 5gb
cluster.routing.allocation.disk.watermark.low: 30gb
cluster.routing.allocation.disk.watermark.high: 20gb
Run Code Online (Sandbox Code Playgroud)
小智 25
我知道这是老帖子,但我的评论可以让别人开心.要以字节值(gb或mb)指定水印,您必须将cluster.routing.allocation.disk.watermark.flood_stage添加到elasticsearch设置文件 - elasticsearch.yml.完整的例子:
cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.flood_stage: 200mb
cluster.routing.allocation.disk.watermark.low: 500mb
cluster.routing.allocation.disk.watermark.high: 300mb
Run Code Online (Sandbox Code Playgroud)
注意:如果没有指定cluster.routing.allocation.disk.watermark.flood_stage,它将无法使用字节值(gb或mb)
小智 16
就我而言 - 我只需要关闭阈值:
运行弹性搜索:
elasticsearch
Run Code Online (Sandbox Code Playgroud)
在其他选项卡上运行:
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings -d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
Run Code Online (Sandbox Code Playgroud)
macOS Catalina、ElasticSearch 通过 Brew 安装。
我在我的elasticsearch.yaml
文件 (elastic_search_folder\config) 中添加了以下几行:
cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.low: 93%
cluster.routing.allocation.disk.watermark.high: 95%
Run Code Online (Sandbox Code Playgroud)
出于某种原因,像在另一个答案中一样在 gb 中指定水印对我不起作用。另外,请确保您watermark.high
的水印小于或等于洪水水印(通常设置为 95%)。
归档时间: |
|
查看次数: |
55443 次 |
最近记录: |