Reputation: 238
I'm trying to update my Sonarqube instance running in a docker stack. In my sonarqube.yml dockerfile I onlu changed the version of the docker image I want to use from 6.4 to 6.7 (it happens in all the other versions in the middle, 6.5 and 6.6).
When I deploy the new stack it all goes fine and it seems Sonarqube starts to run but it doesn't. The docker logs command showns this:
08:06:58.145 [main] WARN org.sonar.application.config.JdbcSettings - JDBC URL is recommended to have the property 'useConfigs=maxPerformance'
2017.11.28 08:06:58 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2017.11.28 08:06:58 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2017.11.28 08:06:58 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es
2017.11.28 08:06:58 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2017.11.28 08:06:58 INFO app[][o.e.p.PluginsService] no modules loaded
2017.11.28 08:06:58 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2017.11.28 08:07:05 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2017.11.28 08:07:05 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -cp ./lib/common/*:./lib/server/*:/opt/sonarqube/lib/jdbc/mysql/mysql-connector-java-5.1.42.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process649036789962348778properties
2017.11.28 08:07:05 INFO web[][o.s.p.ProcessEntryPoint] Starting web
2017.11.28 08:07:05 INFO web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2017.11.28 08:07:06 INFO web[][o.e.p.PluginsService] no modules loaded
2017.11.28 08:07:06 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.index.reindex.ReindexPlugin]
2017.11.28 08:07:06 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.join.ParentJoinPlugin]
2017.11.28 08:07:06 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]
2017.11.28 08:07:06 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2017.11.28 08:07:07 INFO web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]
2017.11.28 08:07:07 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server / 6.7.0.33306 / 5d031d9d2ac3f69b4b9bc600d50563b1886c7d8b
2017.11.28 08:07:07 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:mysql://sonar_mysql:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useSSL=false
2017.11.28 08:07:08 INFO web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube
2017.11.28 08:07:08 INFO web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2017.11.28 08:07:08 WARN web[][o.s.s.p.DatabaseServerCompatibility] Database must be upgraded. Please backup database and browse /setup
2017.11.28 08:07:08 WARN app[][startup]
################################################################################ Database must be upgraded. Please backup database and browse /setup
################################################################################
2017.11.28 08:07:08 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin GitHub / 1.4.1.822 / ddb7ba908c1203b1f0ebc0c29d9badc725bfb3ba
2017.11.28 08:07:08 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin GitHub Authentication for SonarQube / 1.3 / a9c1cc29a9af9ca89aed1d266e793ea1ab41bc33
2017.11.28 08:07:08 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarPHP / 2.10.0.2087 / b24a8fcb16d37cae2f8c6741141f4136c444851f
2017.11.28 08:07:08 INFO web[][o.s.s.p.Platform] Database needs migration
2017.11.28 08:07:08 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.ws.WebServiceFilter@c0579c2 [pattern=UrlPattern{inclusions=[/api/system/migrate_db/*, ...], exclusions=[/api/properties*, ...]}]
2017.11.28 08:07:08 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
And finally it gets stuck here without start the webserver. My Sonarqube DB size is 673M. And it's a Mysql. The message "Database must be upgraded. Please backup database and browse /setup" is suspicious but I already done a backup and I don't know how to proceed because there isn't any error message. Can you help me? Thank you.
Upvotes: 0
Views: 3435
Reputation: 51738
As the log message suggests, you need to go to <host>:<port>/setup
and complete the database upgrade that is required.
Once you do that and upgrade DB, going to http://host:port/setup
will show
Database is up-to-date
Upvotes: 2