upgrade 4.6 from hq 5 , import data error

classic 经典版 list 列表 threaded 结构树
3 条帖子 选项
回复 | 结构树
以树状图样式打开这个帖子
|

upgrade 4.6 from hq 5 , import data error

Martin King
管理员
[importer] [org.hyperic.tools.dbmigrate.TableImporter$IndexRestorationWorker] : an Error had occured while processing entity: IndexRestorationTask [indexCreationStatement=[[indexName=hq_metric_data_6d_0s_pkey, creationStatement=alter table hq_metric_data_6d_0s add PRIMARY KEY ("timestamp", measurement_id)], [indexName=metric_data_6d_0s_mid_idx, creationStatement=CREATE INDEX metric_data_6d_0s_mid_idx ON hq_metric_data_6d_0s USING btree (measurement_id)], [indexName=metric_data_6d_0s_mid_idx, creationStatement=CREATE INDEX metric_data_6d_0s_mid_idx ON hq_metric_data_6d_0s USING btree (measurement_id)], [indexName=hq_metric_data_6d_0s_pkey, creationStatement=alter table hq_metric_data_6d_0s add PRIMARY KEY ("timestamp", measurement_id)]], tableName=hq_metric_data_6d_0s]
 [importer] java.sql.BatchUpdateException: 批次处理 3 CREATE INDEX metric_data_6d_0s_mid_idx ON hq_metric_data_6d_0s USING btree (measurement_id) 被中止,呼叫 getNextException 以取得原因。
 [importer]     at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2623)
 [importer]     at org.postgresql.core.v2.QueryExecutorImpl$2.handleError(QueryExecutorImpl.java:284)
 [importer]     at org.postgresql.core.v2.QueryExecutorImpl.processResults(QueryExecutorImpl.java:485)
 [importer]     at org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:365)
 [importer]     at org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:292)
 [importer]     at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2752)
 [importer]     at org.hyperic.tools.dbmigrate.TableImporter$IndexRestorationWorker.callInner(TableImporter.java:408)
 [importer]     at org.hyperic.tools.dbmigrate.TableImporter$IndexRestorationWorker.callInner(TableImporter.java:361)
 [importer]     at org.hyperic.tools.dbmigrate.Forker$ForkWorker.call(Forker.java:129)
 [importer]     at org.hyperic.tools.dbmigrate.Forker$ForkWorker.call(Forker.java:97)
 [importer]     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
 [importer]     at java.util.concurrent.FutureTask.run(Unknown Source)
 [importer]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 [importer]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 [importer]     at java.lang.Thread.run(Unknown Source)
 [importer] org.postgresql.util.PSQLException: ERROR:  relation "metric_data_6d_0s_mid_idx" already exists
 [importer]     at org.postgresql.core.v2.QueryExecutorImpl.receiveErrorMessage(QueryExecutorImpl.java:562)
 [importer]     at org.postgresql.core.v2.QueryExecutorImpl.processResults(QueryExecutorImpl.java:485)
 [importer]     at org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:365)
 [importer]     at org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:292)
 [importer]     at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2752)
 [importer]     at org.hyperic.tools.dbmigrate.TableImporter$IndexRestorationWorker.callInner(TableImporter.java:408)
 [importer]     at org.hyperic.tools.dbmigrate.TableImporter$IndexRestorationWorker.callInner(TableImporter.java:361)
 [importer]     at org.hyperic.tools.dbmigrate.Forker$ForkWorker.call(Forker.java:129)
 [importer]     at org.hyperic.tools.dbmigrate.Forker$ForkWorker.call(Forker.java:97)
 [importer]     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
 [importer]     at java.util.concurrent.FutureTask.run(Unknown Source)
 [importer]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 [importer]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 [importer]     at java.lang.Thread.run(Unknown Source)
 [importer] org.postgresql.util.PSQLException: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 [importer]     at org.postgresql.core.v2.QueryExecutorImpl.receiveErrorMessage(QueryExecutorImpl.java:562)
 [importer]     at org.postgresql.core.v2.QueryExecutorImpl.processResults(QueryExecutorImpl.java:485)
 [importer]     at org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:365)
 [importer]     at org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:292)
 [importer]     at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2752)
 [importer]     at org.hyperic.tools.dbmigrate.TableImporter$IndexRestorationWorker.callInner(TableImporter.java:408)
 [importer]     at org.hyperic.tools.dbmigrate.TableImporter$IndexRestorationWorker.callInner(TableImporter.java:361)
 [importer]     at org.hyperic.tools.dbmigrate.Forker$ForkWorker.call(Forker.java:129)
 [importer]     at org.hyperic.tools.dbmigrate.Forker$ForkWorker.call(Forker.java:97)
 [importer]     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
 [importer]     at java.util.concurrent.FutureTask.run(Unknown Source)
 [importer]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 [importer]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 [importer]     at java.lang.Thread.run(Unknown Source)
 [importer] Attempting to Acquire smalltable (reader) lock for entity IndexRestorationTask [indexCreationStatement=[[indexName=metric_data_6d_1s_mid_idx, creationStatement=CREATE INDEX metric_data_6d_1s_mid_idx ON hq_metric_data_6d_1s USING btree (measurement_id)], [indexName=hq_metric_data_6d_1s_pkey, creationStatement=alter table hq_metric_data_6d_1s add PRI
回复 | 结构树
以树状图样式打开这个帖子
|

Re: upgrade 4.6 from hq 5 , import data error

Martin King
管理员
2013-01-29 15:32:49,434 INFO  [main] [org.hyperic.tools.ant.dbupgrade.SST_DirectSQL$Statement@165] dbType=11, targetDB='mysql'
2013-01-29 15:32:49,435 INFO  [main] [org.hyperic.tools.ant.dbupgrade.SST_DirectSQL$Statement@165] target was mysql, but this is not
 mysql, returning.
2013-01-29 15:32:49,436 INFO  [main] [org.hyperic.tools.ant.dbupgrade.SST_DirectSQL$Statement@165] dbType=11, targetDB='postgresql'
2013-01-29 15:32:49,439 INFO  [main] [org.hyperic.tools.ant.dbupgrade.SST_DirectSQL$Statement@165] >>>>> Processing statement desc=[
null] SQL=[    
            create table EAM_KEYSTORE (
                ID int4 not null,
                ALIAS_NAME varchar(128) not null,
                TYPE varchar(32) not null,
                CERT varchar(4000) not null,
                CERT_CHAIN varchar(4000),
                CERT_FILE bytea,
                primary key (ID),
                unique (ALIAS_NAME)
            )
        ]
2013-01-29 15:32:49,452 INFO  [main] [org.hyperic.tools.ant.dbupgrade.SST_DirectSQL$Statement@165] >>>>> SQL failed (aborting): org.
postgresql.util.PSQLException: ERROR:  relation "eam_keystore" already exists
2013-01-29 15:32:49,457 ERROR [main] [org.apache.tools.ant.UnknownElement@135] Task "dbupgrade" finished with error.
/home/hyperic/server-5.0.0/data/db-upgrade.xml:43: DBUpgrader: Error running SchemaSpec: 3.208: Error running SchemaSpecTask: org.hy
peric.tools.ant.dbupgrade.SST_DirectSQL: Error executing statement desc=[null] SQL=[
            create table EAM_KEYSTORE (
                ID int4 not null,
                ALIAS_NAME varchar(128) not null,
                TYPE varchar(32) not null,
                CERT varchar(4000) not null,
                CERT_CHAIN varchar(4000),
                CERT_FILE bytea,
                primary key (ID),
                unique (ALIAS_NAME)
            )
回复 | 结构树
以树状图样式打开这个帖子
|

Re: upgrade 4.6 from hq 5 , import data error

nbierny
作为对Martin King帖子的答复
You need to first upgrade to 4.6.5 or later, and then upgrade to 5.0.

The documentation is incorrect.   href="http://pubs.vmware.com/vfabricHyperic50/topic/com.vmware.vfabric.hyperic.5.0/Migrate_v4_Hyperic_Server_and_Database_to_v5.html