After 3.1 update the issue with the duplicated resources appears and the message appears during user moderation : "The dns record "mail.domain.com" alreadyexists. You can use a duplicate DNS record name only for MX records. "And the following appears in hsphere.log : The dns record "mail.domain.com" already exists. You can use a duplicateDNS record name only for MX records. atpsoft.hsphere.resource.system.DNSServices.addToZone(DNSServices.java:199) atpsoft.hsphere.resource.system.DNSServices.addToZone(DNSServices.java:290) at psoft.hsphere.resource.dns.DNSRecord.initDone(DNSRecord.java:120) at psoft.hsphere.resource.dns.CNAMERecord.initDone(CNAMERecord.java:42) at psoft.hsphere.Resource.init(Resource.java:1444)
To resolve this problem you need to make some change in H-Sphere DB. To run SQL queries against the H-Sphere system database, you need to log into H-Sphere system database: 1. Log in as root on the CP server: $ su - 2. Log in as the cpanel user: # su -l cpanel 3. Connect to the system database: # psql -d hsphere wwwuser 4. Run the following SQL queries: # begin; # update plan_iresource set plan_id=-plan_id where plan_id = <PLAN_ID> and type_id=2 and new_type_id=1000 and new_mod_id='signup'; # commit; 5. Restart CP. a. If plan and user creation works OK, you'll need to delete backuped data: begin; delete from plan_iresource where plan_id =-<PLAN_ID> and type_id=2 and new_type_id=1000 and new_mod_id='signup'; commit; b. If something goes wrong, rollback changes: begin; update plan_iresource set plan_id=-plan_id where plan_id =-<PLAN_ID> and type_id=2 and new_type_id=1000 and new_mod_id='signup'; commit; To solve this problem for all plans simultaneously, we developed a java utility MailServiceDuplicateRecordsRemover. Since this tool performs dangerous procedure upon H-Sphere database, it was not included into common distribution. You can either turn to our support to run this utility, or use it on your own risk. Bellow are the actions to run MailServiceDuplicateRecordsRemover manually: 1. Important: Back up database before usage. 2. Log in as root and do the following: copy attached MailServiceDuplicateRecordsRemover.class to ~cpanel/shiva/psoft/hsphere/tools/ #chown cpanel:cpanel MailServiceDuplicateRecordsRemover.class 3. Log in as cpanel user and do the following: # su -l cpanel To fix all the plans, run #java psoft.hsphere.tools.MailServiceDuplicateRecordsRemover --all For other actions, please see #java MailServiceDuplicateRecordsRemover --help 4. Restart CP.