Template for a good bug report, formatted with Markdown:
versions used (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube 8.1 Developer Edition, Scanner 4.2.0.1873-linux, C/C++ community plugin
error observed (wrap logs/code around triple quote ``` for proper formatting)
ce.log has 2020.01.28 09:36:29 WARN ce[][okhttp3.OkHttpClient] A connection to https://gitlab.fphcare.com/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE); but I’m not sure if that’s just because gitlab times out after 300s?
es.log has 2020.01.23 12:31:07 INFO es[][o.e.g.GatewayService] recovered [7] indices into cluster_state 2020.01.23 12:31:08 INFO es[][o.e.c.r.a.AllocationService] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[metadatas][0]] ...]). 2020.01.23 13:31:40 WARN es[][o.e.d.i.q.BoolQueryBuilder] Should clauses in the filter context will no longer automatically set the minimum should match to 1 in the next major version. You should group them in a [filter] clause or explicitly set [minimum_should_match] to 1 to restore this behavior in the next major version.
sonar.log doesn’t seem to have any errors
web.log has a stack trace about 2020.01.28 09:37:05 ERROR web[AW/PmPv4YbK7aDkMAAWw][o.s.s.p.UpdateCenterClient] Fail to connect to update center org.sonar.api.utils.SonarException: Fail to download: https://update.sonarsource.org/update-center.properties (no proxy)
We’ve just been evaluating so don’t really have lots of PRs running but it definitely was working for a previous branch. I’ll try make another PR.
Thanks - the logs are now posted.
Unfortunately the weren’t that useful. Please let us know how other P/Rs go.
Also I see that you had let it run for 5min when the screenshot was done. Please see if it anything happens when running for a longer time.
So I suspect it is something to do with the code changes in the branch but just not sure how to diagnose where the problem is. Increase verbosity of logging somewhere?
Ok. Yes, you can try increasing verbosity of the CE by modifyig in conf/sonar.properties the property sonar.log.level.ce. As I said before I would also try to let it run longer to see if it ends with an error.
It seems to be something to do with the PR decoration - I tried setting the proxy filed in the config, and when I accidentally did this wrong (I put http:// in front of the hostname) the analysis succeeded (though it obviously didn’t do the PR decoration).
Normally it seems to show this over and over again:
I agree that it looks like the PR decoration is blocking.
It would be great if we could get a stack trace of the CE process to see what exactly is happening.
If you have a JDK installled (instead of JRE), you can:
run <JAVA_HOME>/bin/jps and find the pid of CeServer
run <JAVA_HOME>/bin/jstack <pid> to get the stack dump.
Thanks for the details of how to get a stack trace. Unfortunately this seems to have gone away - I’m not sure if something changed with our Gitlab server or network or whether it was to do with the fact that we upgraded from a trial license to a paid license. I’ll keep an eye on it and get a stack trace if it happens again.