im running sonarqube server 10.7.0.96327. The server was set up and running okay, but today morning LDAP logon didnt work. I restarted the sonarqube service and now after a short loading i get “Connection to sonarqube is lost.” and after a refresh i get 502 bad gateway.
I am running nginx which forwards 443 port to 9000 of sonarqube. lsof -i :9000 says sonarqube is listening.
When the sonarqube service is restarted, netstat -tunlp shows 127.0.0.1 listening on both 9001 and 9000, when i open the website, it says that the connection is lost, try again → 502 bad gateway. netstat -tunlp doesnt show the 2 ports listening anymore
The configuration was not touched for 3 months. Database isnt full, accounts didnt expire. systemctl status of postgres says running (exited), everything else is running. Restart of server didnt help. i am attaching sonar.log logs of the machine upon start. sonar.log (1.6 MB)
could you please help me what to try? i have ran out of options. Thank you for your time
You’ve got a lot of different symptoms here, but your log points in one direction:
Request connection for {}->http://localhost:9001
2025.03.26 12:20:58 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request: [route: {}->http://localhost:9001][total kept alive: 0; route allocated: 0 of 10; total allocated: 0 of 30]
2025.03.26 12:20:58 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request failed
java.net.ConnectException: Connection refused
So what does your es.log say?
At a guess, you’ve hit a high water mark on disk usage. Elasticsearch wants a certain percentage of free disk space and will shut down if it isn’t available. It goes purely by percentage, not absolute free space, so even if you’ve got 80Gb free, if that’s less than… I think 10%, it’s too little.
sorry, the log files are very large so i reproduced the whole problem (restarting the service, clicking “Try again”, waiting for it to crash), im sending the logs of both sonar.log and es.log sonar (3).log (1.9 MB) es (2).log (4.3 MB)
we have tried everything now, when i curl 9001 elastic is responsive, we have even tried restoring the whole server from backup (from 20 days back, when it was functional) and the problem still persists
do you think reinstalling sonarqube or installing newer version will help?
ive reinstalled sonarqube, it showed the “sonarqube is under maintenance” part, everything was configured correctly, and then when i started the “migrate database” part it started crashing again, still the same problem, we dont know what is crashing it. when i curl 9001 i get elastic response, sonarqube listener fails after 1 curl to 9000, when i check logs of sonar.log its still the same (request connection for localhost:9001, request failed, already in blacklist