Article ID: 114077, created on Jun 8, 2012, last review on May 5, 2014

  • Applies to:
  • H-Sphere

Symptoms

The Apache reconfigurator script psoft.hsphere.tools.PostApacheConfigs fails with the following error:

Config republishing for domain.name    [    OK    ]
psoft.hsphere.UnknownResellerException: Unknown reseller Id
        at psoft.hsphere.Session.setResellerId(Session.java:578)
        at psoft.hsphere.Session.setUser(Session.java:539)
        at psoft.hsphere.tools.PostApacheConfigs.main(PostApacheConfigs.java:87)

Cause

The issue is caused by the Parallels H-Sphere database partial inconsistency  -- there are “orphaned" records in its “users” table that do not belong to any reseller and do not correspond to any real user account.

To get a list of them, please run the following query:

hsphere=# select * from users where reseller_id not in (select id from resellers) and reseller_id<>1;

You can also make sure that  no user accounts correspond to those users records:

hsphere=# select * from user_account where user_id in (select id from users where reseller_id not in (select id from resellers) and reseller_id<>1);
 user_id | account_id | type_id
---------+------------+---------
(0 rows)


Finally, none of those users can be found in the H-Sphere GUI.

Resolution

To clear those orphaned records out of the database, please back the database with the pg_dump utility and run the following query:

hsphere=# delete from users where reseller_id not in (select id from resellers) and reseller_id<>1;

After that the script psoft.hsphere.tools.PostApacheConfigs should run fine.

f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF