报错信息如下:
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: 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 /home/sonar/sonarqube-8.6.0.39
解决方法
编辑配置文件vim /etc/sysctl.d/99-sysctl.conf,添加
fs.file-max = 2097152 vm.max_map_count = 262144 vm.swappiness = 1
让配置生效
sudo sysctl -p
启动成功日志