2015-11-05 35 views
1

我想SonarQube V5.1升級到V5.2,它失敗,以下錯誤:SonarQube升級從V5.1未能V5.2

ERROR web[o.s.s.d.m.DatabaseMigrator] Fail to execute database migration: org.sonar.db.version.v52.RemoveDuplicatedComponentKeys 
java.lang.IllegalStateException: Error during processing of row:.................................................................. 

Caused by: java.sql.SQLException: Streaming result set [email protected] is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries. 

2015.11.05 09:08:32 INFO web[o.s.s.d.m.PlatformDatabaseMigration] DB migration failed | time=6911ms 
2015.11.05 09:08:32 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.v52.RemoveDuplicatedComponentKeys 
+0

這個問題有何進展?從5.0升級到5.2時,我遇到同樣的問題。 –

+0

我還沒有試過以後升級。 SonarQube發佈了5.3版本,看起來像是在升級中解決了這個問題。 https://jira.sonarsource.com/browse/SONAR-7137 –

回答

0

我找到了一個解決方法。我從項目表中刪除了重複的項目,然後重新啓動了遷移過程。

爲了得到一個想法是怎麼回事,你的數據庫上執行以下查詢:

select p.kee, COUNT(p.kee) FROM projects p GROUP BY p.kee HAVING COUNT(p.kee) > 1; 

如果該查詢返回你要刪除重複的方法(例如最舊的)的任何元素。就我而言,這很容易,因爲我在與問題項目有關的問題表中沒有任何問題。

我必須一步一步地模仿SonarQube 5.2遷移過程(刪除重複的項目並更新它們的問題),您可以在Github的遷移步驟中找到正在執行的查詢列表。

相關問題