将数据库从SonarQube 5.3迁移到5.6.2(和5.5)时发生IllegalStateException [英] IllegalStateException when migrating databases from SonarQube 5.3 to 5.6.2 (and 5.5)

查看:124
本文介绍了将数据库从SonarQube 5.3迁移到5.6.2(和5.5)时发生IllegalStateException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试将数据库从SonarQube 5.3升级到SonarQube 5.6.2时,出现了"java.lang.IllegalStateException"消息,消息为未能对源数据进行解压缩和反序列化"(最初是com.google.protobuf引起的). InvalidProtocolBufferException:流已损坏).

While trying to upgrade databases from SonarQube 5.3 to SonarQube 5.6.2, I am getting a "java.lang.IllegalStateException" with the message "Fail to decompress and deserialize source data" (originally caused by com.google.protobuf.InvalidProtocolBufferException: Stream is corrupted).

我已经尝试了几种不同的数据库(有40个团队使用SonarQube 5.3并希望进行升级),5.5(如果可以使用较小的步骤,那么)和5.6.2.我遇到同样的错误.

I have tried this with several different databases (we have something like 40 teams using SonarQube 5.3 and wanting to upgrade) and with both 5.5 (in case a smaller step would have worked) and 5.6.2. I get the same error.

我已将所有插件升级到最新版本-Jira插件除外,该插件已被删除,因为它不再兼容.请注意,指标表中仍然有一个条目,这可能有问题吗?

I have upgraded all of the plugins to the latest version - except the Jira plugin which had to be removed as it is no longer compatible. Note that there is still an entry in the metrics table for it, could this be problematic?

任何人都可以告诉我什么可能导致此错误以及如何解决该错误吗?

Could anyone please tell me what might be causing this error and how to get around it?

请让我知道是否需要其他信息.

Please let me know if any further info is required.

谢谢!!!!

罗伯特

在5.6.2上安装了以下插件:

The following plugins are installed on 5.6.2:

sonar-android-plugin-1.1.jar
sonar-build-breaker-plugin-2.1.jar
sonar-cobertura-plugin-1.7.jar
sonar-csharp-plugin-5.0.jar
sonar-findbugs-plugin-3.4.4.jar
sonar-generic-coverage-plugin-1.2.jar
sonar-groovy-plugin-1.4.jar
sonar-java-plugin-4.2.jar
sonar-javascript-plugin-2.16.0.2922.jar
sonar-pitest-plugin-0.6.jar
sonar-piwik-plugin-1.0.jar
sonar-python-plugin-1.6.jar
sonar-scm-git-plugin-1.2.jar
sonar-scm-svn-plugin-1.3.jar
sonar-timeline-plugin-1.5.jar
sonar-xml-plugin-1.4.1.jar

这些已安装在5.3上:

And these were installed on 5.3:

sonar-android-plugin-1.1.jar
sonar-build-breaker-plugin-2.0.jar
sonar-cobertura-plugin-1.6.3.jar
sonar-findbugs-plugin-3.3.jar
sonar-generic-coverage-plugin-1.2.jar
sonar-groovy-plugin-1.3.1.jar
sonar-java-plugin-3.14.jar
sonar-javascript-plugin-2.13.jar
sonar-jira-plugin-1.2.jar
sonar-pitest-plugin-0.6.jar
sonar-piwik-plugin-1.0.jar
sonar-python-plugin-1.5.jar
sonar-timeline-plugin-1.5.jar
sonar-xml-plugin-1.4.1.jar

以下是一些日志,显示了数据库迁移的结束和异常.

Here is a bit of the log showing the end of the DB migration and the exception.

2016.09.25 12:46:31 INFO  web[DbMigration] ==  UpdateUsersExternalIdentityWhenEmpty: migrating ===========================
2016.09.25 12:46:31 INFO  web[o.s.d.v.MassUpdate] 0 users processed (0 items/sec)
2016.09.25 12:46:31 INFO  web[DbMigration] ==  UpdateUsersExternalIdentityWhenEmpty: migrated (0.0110s) ==================
2016.09.25 12:46:31 INFO  web[DbMigration] 
2016.09.25 12:46:32 INFO  web[o.s.s.p.UpdateCenterClient] Update center: https://update.sonarsource.org/update-center.properties (no proxy)
2016.09.25 12:46:34 INFO  web[o.s.s.n.NotificationService] Notification service started (delay 60 sec.)
2016.09.25 12:46:34 INFO  web[o.s.d.c.MysqlCharsetHandler] Repair case-insensitive database columns
2016.09.25 12:46:34 INFO  web[o.s.s.s.RegisterMetrics] Register metrics
2016.09.25 12:46:34 INFO  web[o.s.s.r.RegisterRules] Register rules
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule squid:S1318
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule squid:CycleBetweenPackages
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule findsecbugs:WEAK_MESSAGE_DIGEST
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule squid:S1724
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule squid:S1701
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule fb-contrib:SC_SUSPICIOUS_COMPARATOR_RETURN_VALUES
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule findbugs:UOE_USE_OBJECT_EQUALS
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule fb-contrib:JAO_JUNIT_ASSERTION_ODDITIES_INEXACT_DOUBLE
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule squid:S1294
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule fb-contrib:JAO_JUNIT_ASSERTION_ODDITIES_BOOLEAN_ASSERT
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule fb-contrib:SMA_STUTTERED_METHOD_ARGUMENTS
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule fb-contrib:JAO_JUNIT_ASSERTION_ODDITIES_IMPOSSIBLE_NULL
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule findbugs:SKIPPED_CLASS_TOO_BIG
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule findsecbugs:XSS_JSP_PRINT
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule findbugs:LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule squid:StringEqualityComparisonCheck
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule fb-contrib:JAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_EQUALS
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule findbugs:OBL_UNSATISFIED_OBLIGATION
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule fb-contrib:JAO_JUNIT_ASSERTION_ODDITIES_ASSERT_USED
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule findbugs:OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule squid:LowerCaseLongSuffixCheck
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule findbugs:RV_RETURN_VALUE_IGNORED2
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule fb-contrib:JAO_JUNIT_ASSERTION_ODDITIES_ACTUAL_CONSTANT
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule squid:S1873
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule squid:UnusedProtectedMethod
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule squid:S1848
2016.09.25 12:46:40 INFO  web[o.s.s.r.RegisterRules] Disable rule findbugs:XSS_REQUEST_PARAMETER_TO_JSP_WRITER
2016.09.25 12:46:45 INFO  web[o.s.s.q.RegisterQualityProfiles] Register quality profiles
2016.09.25 12:46:50 INFO  ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
2016.09.25 12:46:51 INFO  web[o.s.s.q.RegisterQualityProfiles] Register profile {lang=cs, name=Sonar way}
2016.09.25 12:46:53 INFO  web[o.s.s.q.RegisterQualityProfiles] Set default cs profile: Sonar way
2016.09.25 12:46:53 INFO  web[o.s.s.q.RegisterQualityProfiles] Register profile {lang=java, name=FindBugs + FB-Contrib}
2016.09.25 12:47:03 INFO  web[o.s.s.q.RegisterQualityProfiles] Register profile {lang=jsp, name=FindBugs Security JSP}
2016.09.25 12:47:03 INFO  web[o.s.s.q.RegisterQualityProfiles] Set default jsp profile: FindBugs Security JSP
2016.09.25 12:47:04 INFO  web[o.s.s.s.RegisterNewMeasureFilters] Register measure filters
2016.09.25 12:47:04 INFO  web[o.s.s.s.RegisterDashboards] Register dashboards
2016.09.25 12:47:04 INFO  web[o.s.s.s.RegisterPermissionTemplates] Register permission templates
2016.09.25 12:47:04 INFO  web[o.s.s.s.RenameDeprecatedPropertyKeys] Rename deprecated property keys
2016.09.25 12:47:04 INFO  web[o.s.s.p.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.InitFilter@97f102c [pattern=/sessions/init/*]
2016.09.25 12:47:04 INFO  web[o.s.s.p.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.OAuth2CallbackFilter@7ba0646e [pattern=/oauth2/callback/*]
2016.09.25 12:47:04 INFO  web[o.s.s.e.IndexerStartupTask] Index activities
2016.09.25 12:47:05 INFO  web[o.s.s.e.IndexerStartupTask] Index issues
2016.09.25 12:47:07 INFO  web[o.s.s.e.IndexerStartupTask] Index tests
2016.09.25 12:47:07 INFO  web[o.s.s.d.m.PlatformDatabaseMigration] DB migration failed | time=45804ms
2016.09.25 12:47:07 ERROR web[o.s.s.d.m.PlatformDatabaseMigration] DB Migration or container restart failed. Process ended with an exception
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Fail to decompress and deserialize source data
    at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-17.0.jar:na]
    at org.sonar.server.es.BaseIndexer.index(BaseIndexer.java:82) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.es.BaseIndexer.index(BaseIndexer.java:88) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.es.IndexerStartupTask.execute(IndexerStartupTask.java:71) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:81) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:44) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:77) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.platform.Platform.executeStartupTasks(Platform.java:201) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.platform.Platform.doStart(Platform.java:114) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.platform.Platform.doStart(Platform.java:99) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.db.migrations.PlatformDatabaseMigration.doRestartContainer(PlatformDatabaseMigration.java:138) [sonar-server-5.6.2.jar:na]
    at org.sonar.server.db.migrations.PlatformDatabaseMigration.doDatabaseMigration(PlatformDatabaseMigration.java:114) [sonar-server-5.6.2.jar:na]
    at org.sonar.server.db.migrations.PlatformDatabaseMigration.access$000(PlatformDatabaseMigration.java:37) [sonar-server-5.6.2.jar:na]
    at org.sonar.server.db.migrations.PlatformDatabaseMigration$1.run(PlatformDatabaseMigration.java:101) [sonar-server-5.6.2.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_92]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_92]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_92]
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Fail to decompress and deserialize source data
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.8.0_92]
    at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[na:1.8.0_92]
    at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:135) ~[guava-17.0.jar:na]
    at org.sonar.server.es.BaseIndexer.index(BaseIndexer.java:80) ~[sonar-server-5.6.2.jar:na]
    ... 15 common frames omitted
Caused by: java.lang.IllegalStateException: Fail to decompress and deserialize source data
    at org.sonar.db.source.FileSourceDto.decodeTestData(FileSourceDto.java:167) ~[sonar-db-5.6.2.jar:na]
    at org.sonar.server.test.index.TestResultSetIterator.read(TestResultSetIterator.java:79) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.test.index.TestResultSetIterator.read(TestResultSetIterator.java:60) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.db.ResultSetIterator.next(ResultSetIterator.java:82) ~[sonar-db-5.6.2.jar:na]
    at org.sonar.server.test.index.TestIndexer.doIndex(TestIndexer.java:93) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.test.index.TestIndexer.doIndex(TestIndexer.java:80) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.test.index.TestIndexer.doIndex(TestIndexer.java:70) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.es.BaseIndexer$2.index(BaseIndexer.java:91) ~[sonar-server-5.6.2.jar:na]
    at org.sonar.server.es.BaseIndexer$1.run(BaseIndexer.java:73) ~[sonar-server-5.6.2.jar:na]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_92]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_92]
    ... 3 common frames omitted
Caused by: com.google.protobuf.InvalidProtocolBufferException: Stream is corrupted
    at com.google.protobuf.AbstractParser.parsePartialDelimitedFrom(AbstractParser.java:230) ~[protobuf-java-3.0.0-beta-2.jar:na]
    at com.google.protobuf.AbstractParser.parseDelimitedFrom(AbstractParser.java:246) ~[protobuf-java-3.0.0-beta-2.jar:na]
    at com.google.protobuf.AbstractParser.parseDelimitedFrom(AbstractParser.java:251) ~[protobuf-java-3.0.0-beta-2.jar:na]
    at com.google.protobuf.AbstractParser.parseDelimitedFrom(AbstractParser.java:49) ~[protobuf-java-3.0.0-beta-2.jar:na]
    at org.sonar.db.protobuf.DbFileSources$Test.parseDelimitedFrom(DbFileSources.java:4267) ~[sonar-db-5.6.2.jar:na]
    at org.sonar.db.source.FileSourceDto.decodeTestData(FileSourceDto.java:160) ~[sonar-db-5.6.2.jar:na]
    ... 13 common frames omitted

推荐答案

我目前没有任何提示.同时,票证 https://jira.sonarsource.com/browse/SONAR-8178 有是为版本5.6.3创建的.

I don't have any hints right now. Meanwhile the ticket https://jira.sonarsource.com/browse/SONAR-8178 has been created for version 5.6.3.

这篇关于将数据库从SonarQube 5.3迁移到5.6.2(和5.5)时发生IllegalStateException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆