sonar6.7启动报错: can not run elasticsearch as root

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sonar6.7启动报错: can not run elasticsearch as root相关的知识,希望对你有一定的参考价值。

最近玩一下sonar, centos上启动报错: can not run elasticsearch as root,log如下:

sonar.log

2017.11.20 21:16:48 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2017.11.20 21:16:49 INFO app[][o.e.p.PluginsService] no modules loaded
2017.11.20 21:16:49 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2017.11.20 21:16:50 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
2017.11.20 21:16:50 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2017.11.20 21:16:50 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped

es.log

java.lang.RuntimeException: can not run elasticsearch as root

 

原因:因为安全问题elasticsearch 不让用root用户直接运行

参考网上的解决办法:ES_JAVA_OPTS="-Des.insecure.allow.root=true", 依旧报错,

解决方法:

liunx创建新用户  adduser XXX    创建的用户加密码 passwd XXX    输入两次密码,用该用户运行sonar即可

 

以上是关于sonar6.7启动报错: can not run elasticsearch as root的主要内容,如果未能解决你的问题,请参考以下文章

elasticsearch启动报错:can not run elasticsearch as root

es启动报RuntimeException: can not run elasticsearch as root解决方法

es启动报RuntimeException: can not run elasticsearch as root解决方法

Zookeeper启动失败,报错 can not open chanel to 2

安装Kubernetes报错:The kubelet is not running

elasticsearch: can not run elasticsearch as root