2

I downloaded sonarqube-5.6 and configured the sonar.properties . My mysql version is 5.6 and java version is 1.8. when I start sonar getting error current version is too old , while my sonar is 5.6. Here is error log and sonar.properties

 2016.08.03 18:30:13 INFO  web[o.s.s.p.ServerImpl] SonarQube Server / 5.6 / 074f3d1169f9688d15af4aff67e7e672cbeed782
    2016.08.03 18:30:13 INFO  web[o.sonar.db.Database] Create JDBC data source for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
    2016.08.03 18:30:13 ERROR web[o.a.c.c.C.[.[.[/sonar]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
    org.sonar.api.utils.MessageException: Current version is too old. Please upgrade to Long Term Support version firstly.

Sonar.properties

sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEn
coding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance

Edit ::

Please note I am using 5.6 version which is latest as per http://docs.sonarqube.org

Link says "you must first upgrade to 4.5.x - I'd recommend 4.5.7 - and then upgrade to 5.3." . I am not getting this , should I install lower version fist and upgrade it 5.6 or what

Community
  • 1
  • 1
Vipin Sharma
  • 421
  • 5
  • 24
  • Possible duplicate of [MessageException: Current version is too old. Please upgrade to Long Term Support version firstly](http://stackoverflow.com/questions/34947417/messageexception-current-version-is-too-old-please-upgrade-to-long-term-suppor) – G. Ann - SonarSource Team Aug 03 '16 at 13:41
  • I checked this link before post my question here but did not understand what i need to fix – Vipin Sharma Aug 03 '16 at 13:42
  • @G.Ann-SonarSourceTeam :: http://docs.sonarqube.org/display/SONAR/Release+5.6+Upgrade+Notes this link says 5.6 is latest version and i am using same version – Vipin Sharma Aug 03 '16 at 13:44
  • Perhaps you should [edit] your post to clearly describe what about the proposed duplicate you did not understand or does not apply to your situation. – G. Ann - SonarSource Team Aug 03 '16 at 13:48
  • Question is updated @G.Ann-SonarSourceTeam – Vipin Sharma Aug 03 '16 at 13:52
  • Did you already use this specific database with a previous SonarQube version ? or is it empty ? (if not then check for `sonar.core.version` in `properties` table of the DB) – Nicolas B. Aug 03 '16 at 13:55
  • @Nicolas I install sonar using link "http://dev.mamikon.net/installing-sonarqube-on-ubuntu/" and database name having sonar. Regarding to properties table , there is no such column or field "sonar.core.version" – Vipin Sharma Aug 03 '16 at 14:00
  • You cannot use the new software targeting an "old" database; you have to do it in steps. – Jeroen Heier Aug 03 '16 at 14:54

1 Answers1

4

Version 5.6 can't be upgraded from a version previous to 4.5.x. It seems to be your case, so you should first upgrade to 4.5.x (the latest 4.5.7 is recommended) then upgrade to 5.6.

Simon Brandhof
  • 5,137
  • 1
  • 21
  • 28
  • Hello, I'm confused. I didn't install any old version previously, and I got the same error, do that mean I must install an older version first? – huron Jun 28 '17 at 15:56
  • You probably connect to a database schema that relates to another version of SonarQube. – Simon Brandhof Jun 29 '17 at 14:57
  • Check for data in 2 tables, it should give you a good idea about your database version - "properties" and "schema_migrations" – Ujjwal Aug 14 '18 at 10:45