代码之家  ›  专栏  ›  技术社区  ›  XorX

Sonarqube docker版本更新

  •  0
  • XorX  · 技术社区  · 8 年前

    我正在尝试更新在docker堆栈中运行的Sonarqube实例。 在我的声纳中。yml dockerfile I onlu将我想要使用的docker图像的版本从6.4更改为6.7(在中间的所有其他版本,即6.5和6.6中都会发生这种情况)。

    当我部署新堆栈时,一切都很好,似乎Sonarqube开始运行,但它没有。 docker logs命令显示:

    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] 
    

    ################################################################################ 数据库必须升级。请备份数据库并浏览/设置

    ################################################################################

    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
    

    最后,它在没有启动Web服务器的情况下被卡住了。 我的Sonarqube DB大小为673M。这是一个Mysql。 “数据库必须升级。请备份数据库并浏览/设置”的消息是可疑的,但我已经做了备份,我不知道如何继续,因为没有任何错误消息。 你能帮助我吗? 非常感谢。

    1 回复  |  直到 8 年前
        1
  •  2
  •   yamenk    8 年前

    正如日志消息所示,您需要转到 <host>:<port>/setup 并完成所需的数据库升级。

    一旦你这样做并升级了DB,就可以 http://host:port/setup 将显示 数据库是最新的