lrk / ansible-role-sonarqube

Ansible Role: SonarQube
Apache License 2.0
34 stars 46 forks source link

error during start sonar - max file descriptors too low #6

Closed mateuszmroz93 closed 6 years ago

mateuszmroz93 commented 6 years ago

[2018-02-21T15:47:23,787][ERROR][bootstrap ] Exception java.lang.RuntimeException: max file descriptors [65535] for elasticsearch process likely too low, increase to at least [65536] at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:79) at org.elasticsearch.bootstrap.BootstrapCheck.check(BootstrapCheck.java:60) at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:188) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:264) at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:111) at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:106) at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:88) at org.elasticsearch.cli.Command.main(Command.java:53) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:74) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67)

you must add in sonar.service.j2 this configuration:

Group={{ sonar_user }} LimitNOFILE=65536

The 'Group={{ sonar_user }}' directive ensures that the process runs under the sonar. The 'LimitNOFILE=65536' ensures that the service's file-descriptor's ulimit is set sufficiently high.

lrk commented 6 years ago

@mateuszmroz93 i'm looking into it thank you

lrk commented 6 years ago

@mateuszmroz93 feel free to submit a PR next time :)