当前位置: 首页 > 知识库问答 >
问题:

SonarQube将4.5.7升级到5.6,在数据库迁移过程中失败

辛才俊
2023-03-14

我第一次尝试直接从4.5.4升级到5.6并得到以下错误,我要求我们的DBA增加DB日志级别,最终异常停止,但升级在FeedFileSources迁移期间冻结了。在本例中,冻结意味着几个小时(10+)没有更改DB或日志文件(尽管“Web[O.S.D.V.MassupDate]0文件已处理(0项/秒)”继续打印在日志中)。

从那以后,我让DBA减少了DB日志记录并恢复了上次备份,我又尝试了一次升级。这次首先升级到4.5.7,并将所有插件升级到最新的4.5.7版本。下面的例外情况来自上次尝试。

2016.08.08 21:25:29 INFO  web[DbMigration] ==  FeedFileSources: migrating ================================================
2016.08.08 21:26:29 INFO  web[o.s.d.v.MassUpdate] 0 files processed (0 items/sec)
2016.08.08 21:27:29 INFO  web[o.s.d.v.MassUpdate] 0 files processed (0 items/sec)
2016.08.08 21:28:29 INFO  web[o.s.d.v.MassUpdate] 0 files processed (0 items/sec)
2016.08.08 21:29:29 INFO  web[o.s.d.v.MassUpdate] 0 files processed (0 items/sec)
2016.08.08 21:30:29 INFO  web[o.s.d.v.MassUpdate] 0 files processed (0 items/sec)
2016.08.08 21:31:29 INFO  web[o.s.d.v.MassUpdate] 0 files processed (0 items/sec)
2016.08.08 21:32:29 INFO  web[o.s.d.v.MassUpdate] 0 files processed (0 items/sec)
2016.08.08 21:33:29 INFO  web[o.s.d.v.MassUpdate] 9600 files processed (160 items/sec)
2016.08.08 21:33:33 ERROR web[o.s.s.d.m.DatabaseMigrator] Fail to execute database migration: org.sonar.db.version.v50.FeedFileSources
java.lang.IllegalStateException: Error during processing of row: [uuid=AVZtGc0P6ehXweoHtugl,uuid=AVZtGc0Q6ehXweoHtuhP,data=package com.uprr.netcontrol.dm.train.sim.rules.management.find.rules.summary_1_0.dto.request;

public enum Perspective {

        PRODUCTION, SIMULATION;

        public String value() {
                return name();
        }

        public static Perspective fromValue(String v) {
                return valueOf(v);
        }

}
,updated_at=2015-04-17 08:05:03.932,text_value=1=560318;2=560318;3=560318;4=560318;5=560318;6=560318;7=560318;8=560318;9=560318;10=560318;11=560318;12=560318;13=560318;14=560318;15=560318;16=560318,measure_data=null,text_value=1=xprk173;2=xprk173;3=xprk173;4=xprk173;5=xprk173;6=xprk173;7=xprk173;8=xprk173;9=xprk173;10=xprk173;11=xprk173;12=xprk173;13=xprk173;14=xprk173;15=xprk173;16=xprk173,measure_data=null,text_value=1=2015-04-15T05:30:42-0500;2=2015-04-15T05:30:42-0500;3=2015-04-15T05:30:42-0500;4=2015-04-15T05:30:42-0500;5=2015-04-15T05:30:42-0500;6=2015-04-15T05:30:42-0500;7=2015-04-15T05:30:42-0500;8=2015-04-15T05:30:42-0500;9=2015-04-15T05:30:42-0500;10=2015-04-15T05:30:42-0500;11=2015-04-15T05:30:42-0500;12=2015-04-15T05:30:42-0500;13=2015-04-15T05:30:42-0500;14=2015-04-15T05:30:42-0500;15=2015-04-15T05:30:42-0500;16=2015-04-15T05:30:42-0500,measure_data=null,text_value=3=3;5=1;8=6;12=0,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,text_value=null,measure_data=null,id=201888430]
        at org.sonar.db.version.SelectImpl.newExceptionWithRowDetails(SelectImpl.java:89) ~[sonar-db-5.6.jar:na]
        at org.sonar.db.version.SelectImpl.scroll(SelectImpl.java:81) ~[sonar-db-5.6.jar:na]
        at org.sonar.db.version.MassUpdate.execute(MassUpdate.java:76) ~[sonar-db-5.6.jar:na]
        at org.sonar.db.version.v50.FeedFileSources.execute(FeedFileSources.java:286) ~[sonar-db-5.6.jar:na]
        at org.sonar.db.version.BaseDataChange.execute(BaseDataChange.java:45) ~[sonar-db-5.6.jar:na]
        at org.sonar.server.db.migrations.DatabaseMigrator.executeMigration(DatabaseMigrator.java:95) ~[sonar-server-5.6.jar:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_20]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_20]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_20]
        at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_20]
        at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:455) [jruby-complete-1.7.9.jar:na]
        at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316) [jruby-complete-1.7.9.jar:na]

        ... Stack trace shortened ...

        at RbCallUpgrade_1691709950.callUpgrade(RbCallUpgrade_1691709950.gen:13) [jruby-complete-1.7.9.jar:na]
        at org.sonar.server.ruby.PlatformRubyBridge$1.trigger(PlatformRubyBridge.java:52) [sonar-server-5.6.jar:na]
        at org.sonar.server.db.migrations.PlatformDatabaseMigration.doUpgradeDb(PlatformDatabaseMigration.java:131) [sonar-server-5.6.jar:na]
        at org.sonar.server.db.migrations.PlatformDatabaseMigration.doDatabaseMigration(PlatformDatabaseMigration.java:113) [sonar-server-5.6.jar:na]
        at org.sonar.server.db.migrations.PlatformDatabaseMigration.access$000(PlatformDatabaseMigration.java:37) [sonar-server-5.6.jar:na]
        at org.sonar.server.db.migrations.PlatformDatabaseMigration$1.run(PlatformDatabaseMigration.java:101) [sonar-server-5.6.jar:na]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_20]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_20]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_20]
Caused by: java.sql.BatchUpdateException: Batch entry 191 INSERT INTO file_sources(project_uuid, file_uuid, created_at, updated_at, data, line_hashes, data_hash)VALUES ('AVZtGdtc6ehXweoHtwj4', 'AVZtGdtc6ehXweoHtwj6', 1470709529499, 1429265906896, '118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,package com.uprr.netcontrol.bdi.outbound.documenthandler.exception;
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,import org.slf4j.Logger;
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,import org.slf4j.LoggerFactory;
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,public class OutboundDocumentHandlerException extends Exception {
138289,igen585,2012-01-19T15:51:55-0600,1,,,,,,,,,,,,   private static final Logger LOGGER = LoggerFactory.getLogger(OutboundDocumentHandlerException.class);
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,    private static final long serialVersionUID = 1L;
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,"    public static final String DEFAULT_ERROR_KEY = ""system.error"";"
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,    public OutboundDocumentHandlerException() {
118931,xprk184,2011-10-10T07:54:05-0500,1,,,,,,,,,,,,        this(DEFAULT_ERROR_KEY);
118931,xprk184,2011-10-10T07:54:05-0500,1,,,,,,,,,,,,    }
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,    public OutboundDocumentHandlerException(String message) {
118931,xprk184,2011-10-10T07:54:05-0500,1,,,,,,,,,,,,           super(message);
138289,igen585,2012-01-19T15:51:55-0600,1,2,1,,,,,,,,,,         if (LOGGER.isErrorEnabled()){
138289,igen585,2012-01-19T15:51:55-0600,1,,,,,,,,,,,,            LOGGER.error(message);
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,            }
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,
118931,xprk184,2011-10-10T07:54:05-0500,1,,,,,,,,,,,,    }
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,"    public OutboundDocumentHandlerException(String message, Throwable t) {"
118931,xprk184,2011-10-10T07:54:05-0500,0,,,,,,,,,,,,"          super(message, t);"
138289,igen585,2012-01-19T15:51:55-0600,0,2,0,,,,,,,,,,         if (LOGGER.isErrorEnabled()){
138289,igen585,2012-01-19T15:51:55-0600,0,,,,,,,,,,,,            LOGGER.error(message);
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,            }
118931,xprk184,2011-10-10T07:54:05-0500,0,,,,,,,,,,,,    }
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,    public OutboundDocumentHandlerException(Throwable t) {
118931,xprk184,2011-10-10T07:54:05-0500,0,,,,,,,,,,,,"        super(DEFAULT_ERROR_KEY, t);"
118931,xprk184,2011-10-10T07:54:05-0500,0,,,,,,,,,,,,    }
118931,xprk184,2011-10-10T07:54:05-0500,,,,,,,,,,,,,}
', 'ba3bbd89d6a61e8471766df5921e6555

293f7a3f08e54359c17d5e984f721665
18d24bd6a2c2c15d3914502e2776e372

f5fbddcfb079df85f4d2407a281cdebf
f36f81f6cbcd0ad4eaf500cc094c7100
712212474a80bd328114c4c1dc66cba3
54b6fdc61bc76cf94254f77cb3da75e8

681ebf4e522395df8c779506ae70c7b7
f498d67954f51c342f0c4860f73acd92
cbb184dd8e05c9709e5dcaedaa0495cf

50c60b8d564c1374904f3625ba915e7d
7d0d74b69b4077ba7268ddf1bba275a2
0f416aef0c462782a31da800aa06c010
82ad9bf91a460c7e0a473188b7a9bdb3
cbb184dd8e05c9709e5dcaedaa0495cf

cbb184dd8e05c9709e5dcaedaa0495cf

33ea416932a5857e38856b21c2166e02
ff74d37a19fadbfb29e54b18725f0492
0f416aef0c462782a31da800aa06c010
82ad9bf91a460c7e0a473188b7a9bdb3
cbb184dd8e05c9709e5dcaedaa0495cf
cbb184dd8e05c9709e5dcaedaa0495cf

a2bb3f6e6eefb90a4a2d97a9d1deddea
b92e3d24f1d08d3b3d941ab18ef1213a
cbb184dd8e05c9709e5dcaedaa0495cf
cbb184dd8e05c9709e5dcaedaa0495cf
', '') was aborted.  Call getNextException to see the cause.
        at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2743) ~[postgresql-9.3-1102-jdbc41.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl$1.handleError(QueryExecutorImpl.java:461) ~[postgresql-9.3-1102-jdbc41.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1928) ~[postgresql-9.3-1102-jdbc41.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405) ~[postgresql-9.3-1102-jdbc41.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2892) ~[postgresql-9.3-1102-jdbc41.jar:na]
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[commons-dbcp-1.4.jar:1.4]
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[commons-dbcp-1.4.jar:1.4]
        at org.sonar.db.version.UpsertImpl.addBatch(UpsertImpl.java:41) ~[sonar-db-5.6.jar:na]
        at org.sonar.db.version.MassUpdate$1.handle(MassUpdate.java:80) ~[sonar-db-5.6.jar:na]
        at org.sonar.db.version.SelectImpl.scroll(SelectImpl.java:78) ~[sonar-db-5.6.jar:na]
        ... 159 common frames omitted
2016.08.08 21:33:33 INFO  web[o.s.s.d.m.PlatformDatabaseMigration] DB migration failed | time=963882ms
2016.08.08 21:33:33 ERROR web[o.s.s.d.m.PlatformDatabaseMigration] DB Migration or container restart failed. Process ended with an exception
org.jruby.exceptions.RaiseException: (StandardError) An error has occurred, all later migrations canceled:

共有1个答案

姬飞昂
2023-03-14

日志中的异常不够显式。您能否询问您的DBA在postgresql日志(pg_logs)中是否有关于这个问题的更多细节。向埃里克致意

 类似资料:
  • 我试图升级SonarQube 5.1.1到5.2和升级失败与以下错误: 环境: 有什么建议吗?

  • 指导如何从Bootstrap v3.x升级到v4.x,重点是主要的变化,有什么新内容,以及哪些内容被移除了。 升级到 v4 Bootstrap 4 几乎是对整个项目进行了重写。其中最显著的变化都概括到了下面的内容,与以前相比,拥有了更多的具体的类以及把一些有关的部分变成了相关的组件。 当心!它在 flux 中工作的时候和在 v4 alphas 进程中工作是一致的。只有当它在不完整的情况下,我们才会

  • 问题内容: 我要回答我自己的问题,这是问题描述。 因此,我有一个应用程序已在商店中发布,并且由于要发布的新版本,数据库架构已更改,因此我自然不得不进行迁移,以将其从版本3升级到最新版本。 5.这包括提供从3迁移到4以及从4迁移到5的迁移,或者一次迁移从3迁移到5的迁移。 这就是我所做的,我提供了这些迁移,并将其提供给Room databaseBuilder(),一切就绪,以模拟正在发生应用程序升级

  • 主要内容:升级到 Nexus 2.x 最新版本,升级到 Nexus 3.x 最新版本与 Nexus 2.x 相比,Nexus 3.x 为我们提供了更多实用的新特性,随着 Nexus 3.x 对 Maven 的支持越来稳定,很多公司和组织都陆续将数据从 Nexus 2.x 迁移升级到 Nexus 3.x。 SonaType 官方建议我们,使用最新版本 Nexus 2.x 升级到最新版本 Nexus 3.x,并在  Nexus 升级兼容性 一文中为我们提供了各个版本 Nexus 升级

  • 本文向大家介绍Docker版的MySQL5.7升级到MySQL8.0.13,数据迁移,包括了Docker版的MySQL5.7升级到MySQL8.0.13,数据迁移的使用技巧和注意事项,需要的朋友参考一下 1.备份旧的MySQL5.7的数据 记得首先要备份旧的数据,防止升级失败导致数据丢失。备份的方式有两种,一种是在宿主机直接执行导出命令,另外一种是先进入Docker环境下进行操作。主要的导出命令如

  • 迁移 Navicat Data Modeler 到新的电脑 在 Navicat Data Modeler,选择“Navicat Data Modeler”->“注册”。 【永久许可证】点击“取消激活”以在线取消激活许可证密钥。 【订阅方案】点击“退出”以退出你的 Navicat ID。 在现有的电脑解除安装 Navicat Data Modeler。 在新的电脑重新安装 Navicat Data