Sonarqube background tasks running forever

自作多情 提交于 2019-12-08 05:10:03

问题


We have running SonarQube 5.6.4 for a while now. Then we observed suddenly that the queue of background tasks is increasing. In the logs we see messages like that:

2017.07.24 13:56:10 INFO  [o.s.s.es.BulkIndexer] 0 requests processed (0 items/sec)

Every minute one log entry.

Other tasks started then are failing with:

org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes were available: [[sonar-1498219166409][3QkGfCI8RUSn6vapRi5SSg][a2d477fdfe7a][inet[/127.0.0.1:9001]

I do not know how to find anything which is causing the error. Nothing has changed in the configuration.

I restarted the server but nothing changed.

What is remarkable for me is the number of ports which seems to be opened by elastic search:

tcp        0      0 localhost:etlservicemgr localhost:53058         ESTABLISHED 24/java
tcp        0      0 localhost:etlservicemgr localhost:53070         ESTABLISHED 24/java
tcp        0      0 localhost:53058         localhost:etlservicemgr ESTABLISHED 220/java
tcp        0      0 localhost:etlservicemgr localhost:52934         ESTABLISHED 24/java
tcp        0      0 a2d477fdfe7a:49760      sonar-db.netwo:postgres ESTABLISHED 220/java
tcp        0      0 localhost:etlservicemgr localhost:52846         ESTABLISHED 24/java
tcp        0      0 localhost:52924         localhost:etlservicemgr ESTABLISHED 119/java
tcp        0      0 localhost:52928         localhost:etlservicemgr ESTABLISHED 119/java
tcp        0      0 localhost:53076         localhost:etlservicemgr ESTABLISHED 220/java
tcp        0      0 localhost:etlservicemgr localhost:52866         ESTABLISHED 24/java
tcp        0      0 localhost:53074         localhost:etlservicemgr ESTABLISHED 220/java
tcp        0      0 localhost:etlservicemgr localhost:52922         ESTABLISHED 24/java

(really five times more)

Has anyone an idea how to find the cause of the problem?

sonarqube.properties has default values. Only changes are:

sonar.security.realm=LDAP
sonar.security.savePassword=true
sonar.security.updateUserAttributes=true
sonar.authenticator.downcase=true
sonar.authenticator.createUsers=true

and the LDAP configuration.


回答1:


While I still not understand why the taks was stuck and did not throw an exception our problem seems to be solved by increasing the heapspace for the worker from 500MB to 1GB:

sonar.ce.javaOpts=-Xmx1024m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true


来源:https://stackoverflow.com/questions/45283284/sonarqube-background-tasks-running-forever

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!