Manoj Kumar
Manoj Kumar

Reputation: 289

Not able to start older version of SonarQube after upgrading

I'm currently using SonarQube version 6.4. Recently I downloaded SonarQube 6.6 in a different location and browsed through projects with the same DB I was using for 6.4. After testing I killed the latest server and tried to start old SonarQube (Version 6.4) But when I started the Sonar server failed to start with the following error.

"/Users/manoj-3097/SONARQUBE/sonarqube-6.4/bin/macosx-universal-64/./wrapper" "/Users/manoj-3097/SONARQUBE/sonarqube-6.4/bin/macosx-universal-64/../../conf/wrapper.conf" wrapper.syslog.ident=SonarQube wrapper.pidfile="/Users/manoj-3097/SONARQUBE/sonarqube-6.4/bin/macosx-universal-64/./SonarQube.pid"
wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    | 
jvm 1    | 2017.10.23 14:42:54 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Users/manoj-3097/SONARQUBE/sonarqube-6.4/temp
jvm 1    | 2017.10.23 14:42:54 INFO  app[][o.s.a.p.JavaProcessLauncherImpl] Launch process[es]: /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/Users/manoj-3097/SONARQUBE/sonarqube-6.4/temp -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /Users/manoj-3097/SONARQUBE/sonarqube-6.4/temp/sq-process634164140479096934properties
jvm 1    | 2017.10.23 14:43:00 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
jvm 1    | 2017.10.23 14:43:00 INFO  app[][o.s.a.p.JavaProcessLauncherImpl] Launch process[web]: /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/Users/manoj-3097/SONARQUBE/sonarqube-6.4/temp -cp ./lib/common/*:./lib/server/*:/Users/manoj-3097/SONARQUBE/sonarqube-6.4/lib/jdbc/mysql/mysql-connector-java-5.1.42.jar org.sonar.server.app.WebServer /Users/manoj-3097/SONARQUBE/sonarqube-6.4/temp/sq-process2067232188703791668properties
jvm 1    | 2017.10.23 14:43:01 INFO  app[][o.s.a.SchedulerImpl] Process [web] is stopped
jvm 1    | 2017.10.23 14:43:01 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1    | 2017.10.23 14:43:01 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper  | <-- Wrapper Stopped

Below error log is added in the web.log file

2017.10.23 14:58:46 ERROR web[][o.s.s.p.Platform] Web server startup failed: Database was upgraded to a more recent of SonarQube. Backup must probably be restored or db settings are incorrect.

Upvotes: 0

Views: 3545

Answers (1)

slartidan
slartidan

Reputation: 21556

If you start a new SonarQube version with an old database, it will upgrade the database (create new tables, drop old columns, maybe even reformat data, etc.). The database can no longer be used with older SonarQube versions.

If you have a backup of your database, before the backup: restore it. If you do not have a backup, then there is no easy workaround. It might theoretically be possible to manually downgrade the database, but that is a super risky and hard thing to do.

Another option is of course, to switch to the new version of SonarQube right away :)

Upvotes: 3

Related Questions