折雨的天空

博客介绍:本博客当前共有文章【968】篇,总阅读量【5,158,458】次,第一篇博客发表于【2011年04月06日 10时34分】,距今已【4978】天,感谢您的使用!

您的位置:折雨的天空 >其他技术> Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log

Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log

docker安装的sonarqube,之前安装后运行一直都正常,今天第二次启动的时候,就会自动关闭。


通过命令查看日志:

docker logs --since 30m da005eba84b7

看到报错信息如标题:


2021.11.12 01:13:05 INFO  es[][o.e.n.Node] initialized
2021.11.12 01:13:05 INFO  es[][o.e.n.Node] starting ...
2021.11.12 01:13:05 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:36579}, bound_addresses {127.0.0.1:36579}
2021.11.12 01:13:07 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log
2021.11.12 01:13:07 INFO  es[][o.e.n.Node] stopping ...
2021.11.12 01:13:07 INFO  es[][o.e.n.Node] stopped
2021.11.12 01:13:07 INFO  es[][o.e.n.Node] closing ...
2021.11.12 01:13:07 INFO  es[][o.e.n.Node] closed
2021.11.12 01:13:07 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78
2021.11.12 01:13:07 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2021.11.12 01:13:07 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2021.11.12 01:18:21 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2021.11.12 01:18:21 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:43899]

文件里面有提示,但是,不知道为什么第一次能够正常运行,第二次就报错了。

现在需要修改文件:

vi /etc/sysctl.d/99-sysctl.conf

在文件末尾加入:

fs.file-max = 2097152
vm.max_map_count = 262144
vm.swappiness = 1

然后,运行命令:


sysctl -p

再重新使用docker start 你的容器ID,运行就正常了

------------正 文 已 结 束, 感 谢 您 的 阅 读 (折雨的天空)--------------------

转载请注明本文标题和链接:《Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log

奖励一下

取消

分享不易,烦请有多多打赏,如您也困难,点击右边关闭即可!

扫码支持
扫码打赏,5元,10元,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

-秒后自动关闭,如已打赏,或者不愿打赏,请点击右上角关闭图标。

发表评论

路人甲 表情
看不清楚?点图切换