elasticsearch,sonarqube,sonarqube-scan,Docker,elasticsearch,Sonarqube,Sonarqube Scan" /> elasticsearch,sonarqube,sonarqube-scan,Docker,elasticsearch,Sonarqube,Sonarqube Scan" />

Docker Sonarqube Elasticsearch错误-上超出了磁盘低水印[85%]

Docker Sonarqube Elasticsearch错误-上超出了磁盘低水印[85%],docker,elasticsearch,sonarqube,sonarqube-scan,Docker,elasticsearch,Sonarqube,Sonarqube Scan,我在Docker中运行Sonarqube,它使用Elasticsearch,我遇到了低磁盘水印错误。我确实知道错误的含义,此时,释放磁盘空间并想禁用阈值(或提高限制)是不可行的 我尝试使用以下似乎不适用的设置装载elasticsearch.yml配置文件: cluster.routing.allocation.disk.threshold_enabled: false cluster.routing.allocation.disk.watermark.low: 95% cluster.routi

我在Docker中运行Sonarqube,它使用Elasticsearch,我遇到了低磁盘水印错误。我确实知道错误的含义,此时,释放磁盘空间并想禁用阈值(或提高限制)是不可行的

我尝试使用以下似乎不适用的设置装载elasticsearch.yml配置文件:

cluster.routing.allocation.disk.threshold_enabled: false
cluster.routing.allocation.disk.watermark.low: 95%
cluster.routing.allocation.disk.watermark.high: 98%
cluster.routing.allocation.disk.watermark.flood_stage: 99%
这一设置似乎没有生效。我实际上怀疑配置文件是否被使用。Sonarqube似乎没有提供任何关于配置Elasticsearch的文档

Sonarqube确实记录了错误,但表示只需释放空间即可(在从Elasticsearch只读索引恢复下)


如何确保使用
cluster.routing.allocation.disk.threshold\u enabled:false

我进入容器并运行docker ps,它向我显示了使用的配置路径是/opt/sonarqube/temp/conf/es。然而,查看elasticsearch.yml文件,它警告不要更改启动时生成的配置路径。当我挂载其中一个文件或整个文件夹时,会出现访问被拒绝的异常,因为它似乎试图创建文件夹,然后创建文件。我认为这是不可能的。(第145行)你可以找到相关的源代码来开始更多的研究。这里有一个类似的问题,你可以找到我的答案:如果你的问题没有解决,请告诉我。@JeroenHeier,谢谢你给我指出源代码。我可能不会继续这样做了。现在能够腾出足够的空间。“我会设法找其他地方长期使用。”哈米巴亚特,感谢您的指导。我现在可以释放空间,但将尝试curl请求来应用设置。虽然我更喜欢将此配置存储在一个文件中,但这没关系,因为它只用于解决我的磁盘空间问题,不会部署到这样的prod中。
property@hercules:/tmp/sonarqube$ docker-compose logs -f
Attaching to sonarqube
...
sonarqube    | 2019.08.27 14:31:00 INFO  es[][o.e.c.r.a.DiskThresholdMonitor] low disk watermark [85%] exceeded on [EjQrrQMsTOKVujBLRdH89Q][sonarqube][/opt/sonarqube/data/es6/nodes/0] free: 96.5gb[10.9%], replicas will not be assigned to this node

user@server:/tmp/sonarqube$ docker-compose exec sonarqube bash
sonarqube@bf4144c9bba6:/opt/sonarqube$ cat elasticsearch/config/elasticsearch.yml | grep cluster\.routing
cluster.routing.allocation.disk.threshold_enabled: false
cluster.routing.allocation.disk.watermark.low: 95%
cluster.routing.allocation.disk.watermark.high: 98%
cluster.routing.allocation.disk.watermark.flood_stage: 99%