引导检查失败 [1] 的 [1]:弹性搜索过程的最大文件描述符 [4096] 太低
Posted
技术标签:
【中文标题】引导检查失败 [1] 的 [1]:弹性搜索过程的最大文件描述符 [4096] 太低【英文标题】:bootstrap check failure [1] of [1]: max file descriptors [4096] for elasticsearch process is too low 【发布时间】:2022-01-01 20:03:50 【问题描述】:CentOS 7
SonarQube 9.1
我成功地由用户opencm
运行 sonarqube,如下所示:
./sonar.sh start
不错。
现在我想在重启 linux 后自动启动声纳。
所以我创建了文件etc/systemd/system/sonar.service
:
[Unit]
Description=Gilat R&D Sonarqube Server Daemon
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/home/opencm/sonarqube-9.1.0.47736/bin/linux-x86-64/sonar.sh start
ExecReload=/home/opencm/sonarqube-9.1.0.47736/bin/linux-x86-64/sonar.sh restart
ExecStop=/home/opencm/sonarqube-9.1.0.47736/bin/linux-x86-64/sonar.sh stop
Restart=on-failure
RestartSec=10
User=opencm
Group=opencm
[Install]
WantedBy=multi-user.target
# systemctl enable sonar.service
但是重启 linux 后我得到下一个 sonarqube 错误:
2021.11.23 12:00:09 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
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 file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
ERROR: Elasticsearch did not exit normally - check the logs at /opt/opencm/sonarqube-9.1.0.47736/logs/sonarqube.log
2021.11.23 12:00:45 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78
2021.11.23 12:00:45 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
2021.11.23 12:00:45 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped
还有这个:
2021.11.23 12:00:45 INFO es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2021.11.23 12:00:45 ERROR es[][o.e.b.Bootstrap] node validation exception
[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 file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
2021.11.23 12:00:45 INFO es[][o.e.n.Node] stopping ...
2021.11.23 12:00:45 INFO es[][o.e.n.Node] stopped
2021.11.23 12:00:45 INFO es[][o.e.n.Node] closing ...
2021.11.23 12:00:45 INFO es[][o.e.n.Node] closed
【问题讨论】:
【参考方案1】:这个帮助:
这个帮助:Doc
如果您使用 systemd 启动 SonarQube,则必须在 [service] 部分的单元文件中指定这些限制:
[Service]
…
LimitNOFILE=131072
LimitNPROC=8192
【讨论】:
以上是关于引导检查失败 [1] 的 [1]:弹性搜索过程的最大文件描述符 [4096] 太低的主要内容,如果未能解决你的问题,请参考以下文章
如何修复弹性beantalk实例上的“使用这些代码失败的健康检查:”?
弹性beantalk上的spring boot应用程序-健康检查失败
如何在亚马逊弹性豆茎上强制 https 而不会失败健康检查 [重复]
如何在亚马逊弹性豆茎上强制 https 而不会失败健康检查 [重复]