Article ID: 111132, created on Apr 14, 2011, last review on Jan 23, 2015

  • Applies to:
  • H-Sphere

Symptoms

Account move process got suspended:

Suspended due to resources integrity

There is an error in hsphere.log:

2011-04-06 21:11:57,987 [transfer] DEBUG cron.TransferCron - getResourcesInMoveInfo(): got and checking 654789_7 is a HostDependentResource
  -  true
 2011-04-06 21:11:58,052 [transfer] ERROR cron.TransferCron - Getting resources info for process 1857
 org.postgresql.util.PSQLException: ERROR: duplicate key violates unique constraint "resources_in_move_pkey"

Cause

The issue is caused by some records left in hsphere database from previous account move process.

Resolution

Find transfer process id (tp_id) in resources_in_move table using rid from the error message:

hsphere=> select * from resources_in_move where rid = 654789;
  tp_id |  rid   | rtype |          created          |          deleted           | job_id | tt_id | ord
 -------+--------+-------+---------------------------+----------------------------+--------+-------+-----
   1203 | 654789 |     7 | 2009-02-12 17:36:50.41+00 | 2009-02-13 23:35:16.901+00 |   1153 |       |   0
 (1 row)

Get the list of resources in move of this transfer process:

hsphere=> select * from resources_in_move where tp_id = 1203 order by ord;
  tp_id |  rid   | rtype |          created           |          deleted           | job_id | tt_id | ord
 -------+--------+-------+----------------------------+----------------------------+--------+-------+-----
   1203 | 654789 |     7 | 2009-02-12 17:36:50.41+00  | 2009-02-13 23:35:16.901+00 |   1153 |       |   0
   1203 | 654794 |  4001 | 2009-02-12 17:36:50.645+00 | 2009-02-13 23:30:26.006+00 |      0 |       |   1
 ...
   1203 | 777887 |  6400 | 2009-02-12 18:17:15.19+00  | 2009-02-13 23:27:44.016+00 |      0 |       |  70
 (71 rows)

Delete these records from resources_in_move table:

 hsphere=# begin;
 BEGIN
 hsphere=> delete from resources_in_move where tp_id = 1203;
 DELETE 71
 hsphere=# commit;
 COMMIT

Restart H-Sphere CP service and resume the account move process.

service httpdcp restart

NOTE: we recommend to back up H-Sphere database (or particular tables) before performing any modifications.

Search Words

HostDependentResource

uplicate key violates unique constraint

resources integrity

f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF