2016-03-01 94 views
0

我從Sonarqube 4.5.2升級到5.3,數據庫遷移失敗。我使用MySQL在RH-Linux上運行。運行了7個小時後,我得到了以下堆棧跟蹤。數據庫的狀態是什麼?我下一步要做什麼?sonarqube 4.5.2-> 5.3 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

你必須恢復備份。我希望你在開始升級之前做了一個。搜索FeedIssueChangesLongDates可以找到here的實現。查看查詢和查找到的記錄上執行的操作。基於此,您可以直接調查有問題的記錄並在SQL中更正/更新。