Centos6.5部署Sonar6.7.1备注

1、一定要用非root账号登录(自己建立账号),建立Sonar目录并部署,因为使用了Elasticsearch 5.6.3做搜索服务器,而它不允许用root账号启动服务,会报如下错误:

  Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root

2、启动时如果有错误,可以去sonarqube-6.7.1logs目录下打开生成的日志进行排查,我碰到的问题几乎全是因为Elasticsearch的错误引起的,所以我主要查看的是es.log,关于es错误的排查,可以参数如下地址或自行根据错误日志搜索,还比较好解决:

  https://www.jianshu.com/p/4c6f9361565b

  http://blog.csdn.net/u012371450/article/details/51776505

  http://blog.csdn.net/gebitan505/article/details/54709515

3、对于出现的System call filter check错误,Seccomp是Centos7才支持的新特性,而6.5不支持,所以需要关闭掉,不需要去修改elasticsearch.yml文件,应该直接修改sonar.properties文件,里边找到sonar.search.javaAdditionalOpts,修改成sonar.search.javaAdditionalOpts=-Dbootstrap.system_call_filter=false就好了。参考资料如下:

https://docs.sonarqube.org/display/SONAR/Requirements

https://stackoverflow.com/questions/47210302/sonarqube-6-7-failed-to-start-because-config-seccomp-not-compiled-into-kernel?rq=1

基本上比较要注意的就这些,其他配置的在网上都可以搜索到,就不记录了。

原文地址:https://www.cnblogs.com/Rocky_/p/8377411.html