Getting elasticsearch “can not run as root” error after upgrading from SonarQube 6.5 to 6.6. Nothing else changed

前端 未结 4 1708
我在风中等你
我在风中等你 2021-02-19 00:24

Getting elasticsearch \"can not run as root\" error after upgrading from SonarQube 6.5 to 6.6. Nothing else changed.

CentOS release 6.8 (Final) Java(TM) SE Runtime Envir

4条回答
  •  面向向阳花
    2021-02-19 01:18

    Faced the same issue, do some changes in my sonar service file and it start working. below is my sonar service file

    [Unit]
    Description=SonarQube service
    After=syslog.target network.target
    
    [Service]
    Type=forking
    #Type=simple
    User=sonar
    Group=sonar
    PermissionsStartOnly=true
    ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start
    ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop
    StandardOutput=syslog
    LimitNOFILE=65536
    LimitNPROC=8192
    #TimeoutStartSec=5
    Restart=always
    
    [Install]
    WantedBy=multi-user.target
    

    Also follow change the home directory of sonar user

    $ usermod -d /opt/sonarqube sonar
    

提交回复
热议问题