Sonar-java-5.6.1 crashes SonarQube 6.7.3

java
sonarqube

(Simon Watts) #1

The new release of sonar-java-5.6.1 (released c.2018-08-23) appears to cause SonarQube 6.7.3 to crash with a ClassNotFoundException for ‘org.sonar.sslr.grammar.GrammarRuleKey’ reported in ‘web.log’.

Reverting back to sonar-java-5.6 allowed SonarQube service to restart successfully.

Note that the missing class appears to be present in a number of jars under SonarQube ‘lib’ directory (at least by name).

Running SonarQube 6.7.3.38370 (LTS) on RHEL 6 (39 cores) / Java 1.8.0_171 (Oracle) (64bit), with MySQL 5.6.26 hosted on same server.


(Nicolas Peru) #2

Hi,

There seems to be another line of log interesting in the log you shared with me :

java.lang.IllegalStateException: Fail to download the plugin (java, version 5.6.1) from https://sonarsource.bintray.com/Distribution/sonar-java-plugin/sonar-java-plugin-5.6.1.15064.jar (error is : Source '/var/lib/jenkins/sonarqube/sonarqube-6.7.3/extensions/downloads/sonar-java-plugin-5.6.1.15064.jar.tmp' does not exist)
	at org.sonar.server.plugins.PluginDownloader.download(PluginDownloader.java:131)
	at org.sonar.server.plugins.ws.UpdateAction.handle(UpdateAction.java:79)
	at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
	at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:86)
	at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
	at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:87)
	at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:71)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:72)
	at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:61)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:63)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.FileNotFoundException: Source '/var/lib/jenkins/sonarqube/sonarqube-6.7.3/extensions/downloads/sonar-java-plugin-5.6.1.15064.jar.tmp' does not exist
	at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1074)
	at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1038)
	at org.sonar.server.plugins.PluginDownloader.downloadRelease(PluginDownloader.java:153)
	at org.sonar.server.plugins.PluginDownloader.download(PluginDownloader.java:126)
	... 43 common frames omitted

(Simon Watts) #3

Hi,

Yes I saw that - however the versioned jar was in the extensions/plugin folder, along with the new csharp plugin which was updated at the same time:

-rw-rw-r-- 1 jenkins jenkins 8901184 Jul 26 14:11 sonar-java-plugin-5.6.0.15032.jar
-rw-r--r-- 1 jenkins jenkins 8982933 Aug 23 09:07 sonar-java-plugin-5.6.1.15064.jar-BAD

MD5 for 5.6.1 is 06ba30c53727da5edf8c2581eca6f34a

Possible something happened during download? I would retry but this is a production system so have to be cautious.


(Dinesh Bolkensteyn) #4
Filename: sonar-java-plugin-5.6.1.15064.jar
Filesize: 8982933
MD5: 1763b21e82aecbdd5fb164ec310e1b68
SHA256: 1cda68782f412e8a3f4ed29207ed10bbc8b041edecbf0fad2d544ad5b31f370d

Those are the expected checksums for sonar-java 5.6.1.

This is strange because your file seem to have the same filesize but a different MD5 checksum. Could you please share it for inspection?

Also, what was the exact listing of plugins you had under extensions/plugins? Did you have 2 different versions of sonar-java-plugin at the same time? Was the file extension actually .jar-BAD? Sorry for being so pedantic but I’m trying to understand what happened :slight_smile:


(Simon Watts) #5

The name was changed to prevent it from being accidentally loaded, while keeping it around.

The version of md5sum is 8.4 (GNU coreutils) on RHEL6 (x64). I get the same from version 8.26 under cygwin for this file.

I don’t seem to be able to upload a jar to this forum? It only accepts image files and txt…


Okay I downloaded 5.6.1 again on my work PC and the checksum now matches what @dbolkensteyn quoted.

Looks like something messed up during the original download (through the SQ web interface). I’ll manually instal the new file and see what happens.


Okay that seems to have worked. SonarQube has restarted with the new copy of 5.6.1, and lists it in the installed list.

I don’t know what process SonarQube uses for its uploads – but isn’t there a checksum validation?

Anyway thanks for the pointers. I’m leaving this job at the end of Sept so I’d like to leave things in a stable state :slight_smile:


(Dinesh Bolkensteyn) #6

I’m glad to learn that the problem is solved.

To share the file (if you’re interested), you can use a service such as https://wetransfer.com/. Click on the “…” round button and select “Send as: link” so that you do not even have to enter your email address.