Symptoms
While having the SonarQube Scanner plugin installed, the instance logs contain a large number of occurrences for any of the below stack traces:
WARNING h.p.s.client.SQProjectResolver#resolve: Error fetching project information java.lang.IllegalArgumentException: Invalid version format: <SOME LONG HTML> at hudson.plugins.sonar.utils.Version.<init>(Version.java:33) at hudson.plugins.sonar.client.SQProjectResolver.lambda$resolve$1(SQProjectResolver.java:66) at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4767) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228) Caused: com.google.common.util.concurrent.UncheckedExecutionException
WARNING h.p.s.client.SQProjectResolver#resolve: Error fetching project information net.sf.json.JSONException: Invalid JSON String
Issue
The SonarQube plugin bloats the Jenkins logs when a trailing slash is used in the Sonar Server URL.
Resolution
The trailing slash at the end of the URL must be removed in the corresponding configuration section. This section can be found under the Manage Jenkins > Configure System > SonarQube servers
. The URL value has to be changed in order to fix the issue. E.g. http://localhost:9000/
should be changed to http://localhost:9000
.
Please see the screenshot below: