Article ID: 111134, created on Apr 14, 2011, last review on May 3, 2014

  • Applies to:
  • H-Sphere

Symptoms

You cannot switch plan for account due to Internal error. You see the exception in hsphere.log similar to the one below:

DEBUG psoft.hsphere.CP - Exception in Resource.get: 3458668_6001
...
 at java.lang.Thread.run(Thread.java:619)
Caused by: psoft.hsphere.AccessError: Resource 3458668_6001 not found

Resolution

Please check if there are corrupted resources through H-Sphere CP > Reports > Account Check. Remove them if there are any.

If there are none, please find them in database.

Find the resource:

hsphere=# select * from parent_child where parent_id=3458668;
 parent_id | parent_type | child_id | child_type | account_id |  p_begin   | suspended
-----------+-------------+----------+------------+------------+------------+-----------
   3458668 |        6001 |  3458669 |       6005 |    1268103 | 2010-01-07 |
(1 row)


Find out what type of resource it is:

hsphere=# select * from type_name where id=6001;
  id  |     name      | price |  description   | rprice | required | priority | ttl
------+---------------+-------+----------------+--------+----------+----------+-----
 6001 | MySQLDatabase | FSR   | MySQL Database | FSR    |        0 |        0 |
(1 row)


Verify that this resource does not exist in corresponding table, mysqldb in this particular case:

hsphere=# select * from mysqldb where id=3458668;
 id | parent_id | db_name | db_description | locked_by
----+-----------+---------+----------------+-----------
(0 rows)


Delete the corrupted resource:

hsphere=# begin;
BEGIN
hsphere=# delete from parent_child where parent_id=3458668;
DELETE 1
hsphere=# delete from resource_amount where id=3458668;
DELETE 1
hsphere=# commit;
COMMIT


Check hsphere.log if there are more exceptions in resources get for this account, and delete the corrupted ones the same way.

Restart H-Sphere CP service and try to switch plan.

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

f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF