我从Sonarqube 4.5.2升级到5.3并且db迁移失败。我使用MySQL在RH-Linux上运行。运行7个小时后,我得到了以下堆栈跟踪。 DB的状态是什么?我的下一步是什么?
2016.02.29 18:36:16 INFO web[o.s.d.v.MassUpdate] 114749 issue_changes processed
(183 items/sec)
2016.02.29 18:37:09 ERROR web[o.s.s.d.m.DatabaseMigrator] Fail to execute databa
se migration: org.sonar.db.version.v51.FeedIssueChangesLongDates
java.lang.IllegalStateException: Error during processing of row: [created_at=201
5-07-01 23:54:59.0,updated_at=2015-07-01 23:54:59.0,issue_change_creation_date=2
015-07-01 23:28:45.0,id=1418038]
at org.sonar.db.version.SelectImpl.newExceptionWithRowDetails(SelectImpl
.java:89) ~[sonar-db-5.3.jar:na]
at org.sonar.db.version.SelectImpl.scroll(SelectImpl.java:81) ~[sonar-db
-5.3.jar:na]
at org.sonar.db.version.MassUpdate.execute(MassUpdate.java:76) ~[sonar-d
b-5.3.jar:na]
at org.sonar.db.version.v51.FeedIssueChangesLongDates.execute(FeedIssueC
hangesLongDates.java:49) ~[sonar-db-5.3.jar:na]
at org.sonar.db.version.BaseDataChange.execute(BaseDataChange.java:45) ~
[sonar-db-5.3.jar:na]
at org.sonar.server.db.migrations.DatabaseMigrator.executeMigration(Data
baseMigrator.java:95) ~[sonar-server-5.3.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.
0_72]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57) ~[na:1.7.0_72]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43) ~[na:1.7.0_72]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(Ja
vaMethod.java:455) [jruby-complete-1.7.9.jar:na]
at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316) [j
ruby-complete-1.7.9.jar:na]
at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvo
ker.java:61) [jruby-complete-1.7.9.jar:na]
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:
168) [jruby-complete-1.7.9.jar:na]
:
:
:
2016.02.29 18:37:09 INFO web[o.s.s.d.m.PlatformDatabaseMigration] DB migration failed | time=25048064ms
2016.02.29 18:37:09 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:
Fail to execute database migration: org.sonar.db.version.v51
.FeedIssueChangesLongDates
答案 0 :(得分:0)
您必须恢复备份。我希望你在开始升级前做了一个。搜索FeedIssueChangesLongDates,您可以找到here实施。查看查询以及对找到的记录执行的操作。基于此,您可以直接调查有问题的记录并在SQL中更正/更新。