skip to Main Content

CentOS 7

SonarQube 9.1

I success run sonarqube by user opencm like this:

./sonar.sh start

Nice.

Now I want to autostart sonar after reboot linux.

So I create file etc/systemd/system/sonar.service:

[Unit]
Description=Gilat R&D Sonarqube Server Daemon
After=syslog.target network.target

[Service]
Type=forking
ExecStart=/home/opencm/sonarqube-9.1.0.47736/bin/linux-x86-64/sonar.sh start
ExecReload=/home/opencm/sonarqube-9.1.0.47736/bin/linux-x86-64/sonar.sh restart
ExecStop=/home/opencm/sonarqube-9.1.0.47736/bin/linux-x86-64/sonar.sh stop

Restart=on-failure
RestartSec=10

User=opencm
Group=opencm

[Install]
WantedBy=multi-user.target
# systemctl enable sonar.service

But after reboot linux I get the next sonarqube error:

2021.11.23 12:00:09 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
ERROR: Elasticsearch did not exit normally - check the logs at /opt/opencm/sonarqube-9.1.0.47736/logs/sonarqube.log
2021.11.23 12:00:45 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78
2021.11.23 12:00:45 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2021.11.23 12:00:45 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

And this:

2021.11.23 12:00:45 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2021.11.23 12:00:45 ERROR es[][o.e.b.Bootstrap] node validation exception
[1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
2021.11.23 12:00:45 INFO  es[][o.e.n.Node] stopping ...
2021.11.23 12:00:45 INFO  es[][o.e.n.Node] stopped
2021.11.23 12:00:45 INFO  es[][o.e.n.Node] closing ...
2021.11.23 12:00:45 INFO  es[][o.e.n.Node] closed

2

Answers


  1. Chosen as BEST ANSWER

    This help:

    This help : Doc

    If you are using systemd to start SonarQube, you must specify those limits inside your unit file in the section [service] :

    [Service]
    …
    LimitNOFILE=131072
    LimitNPROC=8192
    

    1. append vm.max_map_count=655360 to /etc/sysctl.conf
    2. $sysctl -p
    3. retry again
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search