Article ID: 119974, created on Feb 4, 2014, last review on Sep 29, 2015

  • Applies to:
  • H-Sphere

Symptoms

Account under reseller A has "Unknown Plan" and can not be deleted.

Cause

DB Inconsistencies

Resolution

  1. Log into PostgreSQL DB

    -bash-3.2$ psql hspere
    
  2. Check which reseller_id is in accounts table:

    hsphere=> select id, plan_id, description, reseller_id from accounts where id = 7079000;
       id    | plan_id |         description         | reseller_id
    ---------+---------+-----------------------------+-------------
     7079000 |   21000 |   User plan  Linux Premium  |       17002
    (1 row)
    
  3. Check the reseller_id in the users table for this user.

    hsphere=> SELECT * FROM user_account where account_id = 7079000;
     user_id | account_id | type_id
    ---------+------------+---------
       61169 |    7079000 |       0
    (1 row)
    
    hsphere=> select * from users where id = 61169;
      id   | username | password | reseller_id
    -------+----------+----------+-------------
     61169 | username | password |       54000
    (1 row)
    

    The reseller IDs are different (17002 and 54000).

  4. Correct reseller_id in users table (set reseller ID the plan belongs to)

    hsphere=> update users set reseller_id = 17002 where id = 61169;
    UPDATE 1
    
  5. Restart httpdcp service

    [root@cp ~]# service httpdcp restart
    

To check all affected accounts use the following query:

    select users.id, users.username from users, accounts, user_account  where users.reseller_id <> accounts.reseller_id and users.id = user_account.user_id and accounts.id = user_account.account_id;

Search Words

Unknown Plan

not able to delete account

Account can not be deleted

delete account

f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF