###Error max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535] installing SonarQube 8.1 on CentOS

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) => 8.1 on CentOS with PostgreSQL, openjdk version 11
  • what are you trying to achieve => Get SonarQube services to start but getting error -
    max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
  • what have you tried so far to achieve this ->
    * Have added /etc/security/limits.conf for elasticsearch limit to have 65536
    * Have added the following lines to /etc/systemd/system/sonarqube.service file
    LimitNOFILE=65536
    LimitNPROC=8192

Why is the system still complaining of max file descriptors too low?

Hello,
Did you verify that your changes were effective ? (changing the config files usually require a reboot to take effect)
Did you run the sysctl commands documented here to check what values are in effect ?
Regards, Olivier

Did sysctl -p. I will try a reboot next. Thanks

Still same. /etc/security/limits.conf has been set.

[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
2020.02.12 14:19:31 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78

I am getting the same error. Are you able to resolve it?

Hello,
I am still not sure from your posts that you did set the max file descriptor to the required value.
This is not for CentOS but on ubuntu I found that thread. It could be that you have a similar issue.
To be sure, can you display the max file descriptors with ulimit just before starting SonarQube, and with the same user as the one who is used to start SonarQube.

I had the same issue. I got it resolved after changing the configuration of file limits configuration for sonar user as described below:

Edited this file:
/etc/security/limits.conf
Added this line:
sonar - nofile 65535

In our case the username for sonar application is sonar. So you may have to change your username accordingly for your setup.