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》
发表评论