2016-08-09 5 views
0

처음에 4.5.4에서 5.6으로 직접 업그레이드를 시도하고 아래 오류가 발생하여 DBA에게 DB 로깅 수준을 높이고 결국 예외가 중지되도록 요청했지만 FeedFileSources 마이그레이션 중에 업그레이드가 중단되었습니다. 이 경우에는 DB 또는 로그 파일을 변경하지 않고 몇 시간 (10+)을 의미합니다 ("web [osdvMassUpdate] 0 파일이 처리됨 (0 항목/초)"이 로그에 계속 인쇄 됨).SonarQube 업그레이드 4.5.7에서 5.6으로 데이터베이스 마이그레이션 중 실패

이후로 DBA가 DB 로깅을 줄이고 마지막 백업을 복원 했으므로 업그레이드를 다시 시도했습니다. 이번에는 4.5.7로 업그레이드하고 모든 플러그인을 최신 4.5.7 버전으로 업그레이드했습니다. 아래의 예외는이 마지막 시도에서 발생한 것입니다

아래의 스택 추적에 소스 코드가있는 프로젝트를 찾아서 삭제할 수 있지만 문제가 해결 될지 확신 할 수 없습니다. 우리는 postgresql DB (v9.2)를 사용하고 있습니다. 다음에 시도해야합니까?

 
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: 

+0

백업을 만든 후에 다시 4.5.7로 업그레이드하십시오. –

답변

0

로그의 예외가 충분하지 않습니다. postgresql 로그 (pg_logs)에이 문제에 대한 자세한 정보가 있는지 DBA에게 문의 할 수 있습니까? 감사합니다. Eric