sonar6.7.2启动报错;错误信息如下:
es.log
java.lang.RuntimeException: can not run elasticsearch as root
sonar.log
2018.03.05 21:16:48 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.03.05 21:16:49 INFO app[][o.e.p.PluginsService] no modules loaded
2018.03.05 21:16:49 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.03.05 21:16:50 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
2018.03.05 21:16:50 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.03.05 21:16:50 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
错误原因:因为安全问题elasticsearch 不让用root用户直接运行
解决方法:liunx创建新用户sonarUser,使用该用户(sonarUser)运行sonar即可。
步骤如下:
创建用户
$ adduser sonarUser
为用户创建密码
$ passwd sonarUser
输入两次密码,
修改sonar的目录和用户组为sonarUser
$ chown -R sonarUser:sonarUser sonarqube-6.7.2
重新启动sonar
$ ./sonar.sh start
为用户创建密码
输入两次密码,
修改sonar的目录和用户组为sonarUser
重新启动sonar
---------------------
作者:无名_四叶草
来源:CSDN
原文:https://blog.csdn.net/zdyueguanyun/article/details/79447260
版权声明:本文为博主原创文章,转载请附上博文链接!
原文地址:https://www.cnblogs.com/yln20170705/p/10450170.html