SOLVED [CPANEL-20670] Modify Account fails with previously used domains

Mat-d-rat

Well-Known Member
Jul 30, 2003
108
2
168
I needed to swap the primary domain of an account from .fyi to .live. Initially it wouldn't let me as the .live was already setup, so as the domain is not a live site, I deleted the .live domain from cpanel then went back to the modify an account and I was able to change the primary domain (the username stayed the same). Everything seems to of worked correctly, but when I list accounts in WHM it still shows as .fyi and the IP is missing? I need to buy an SSL for the domain so want to sort this out before processing :)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello @Mat-d-rat,

Can you run the following commands on this system and let us know the output?

Code:
cat /usr/local/cpanel/version
/scripts/rebuildhttpdconf
Also, can you confirm if any errors appear in /usr/local/cpanel/logs/error_log at the time the account was modified?

Thank you.
 

Mat-d-rat

Well-Known Member
Jul 30, 2003
108
2
168
Version 11.70.0.48
Already tried the rebuild and restart as saw that in another thread.
Yes there are a few errors in that log around the time and mentioning it, would you like me to PM it to you?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Yes there are a few errors in that log around the time and mentioning it, would you like me to PM it to you?
Yes, or you can post it here with redacted references to real domain names, usernames, and IP addresses.

Thanks!
 

plague

Well-Known Member
Sep 22, 2006
75
17
158
Brasil
cPanel Access Level
Root Administrator
Twitter
Sorry to bump an old thread but I am experiencing this issue in a few servers everytime I try to change the domain name for the first time.
Despite the name change apply in WHM, the new name is not configured on apache and the IP address shows missing.
Then I need to backup the account, terminate it and restore it to make it work, after that I am able to change or revert the domain name again without errors.

Is there a solution for this issue?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello @plague,

I moved your post into this thread, as it looks to relate to the issue reported by the original poster yesterday.

To update, it looks like this relates to internal case CPANEL-20670. This case was opened to address an issue where attempts to modify an account's domain name can fail if the domain name previously existed on the system and an entry for it remained in the index file for the Apache TLS certificate data queue. This will no longer happen as of cPanel & WHM version 72.0.3 (now available in the CURRENT build tier):

Fixed case CPANEL-20670: Modify Account: avoid failure with previously used domain.

For any existing accounts facing this issue, the following steps are available as a workaround:

1. Use WHM >> Modify an Account to switch the account to the previous domain name or username.

2. Move the /var/cpanel/ssl/apache_tls/.index.sqlite file out of the way with the following command:

Code:
mv /var/cpanel/ssl/apache_tls/.index.sqlite /root/.index.sqlite.backup
3. Regenerate the /var/cpanel/ssl/apache_tls/.index.sqlite file by browsing to WHM >> Manage SSL Hosts.

4. Use WHM >> Modify an Account to switch the account to the new domain name or username.

Thank you.
 
  • Like
Reactions: plague

Mat-d-rat

Well-Known Member
Jul 30, 2003
108
2
168
When I try and rename the domain back to the previous version I'm getting the error XID 4zjxt4) “xxxx” already controls the domain name “www.xxx.xxx”. But I don't see that domain anywhere in cPanel.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
When I try and rename the domain back to the previous version I'm getting the error XID 4zjxt4) “xxxx” already controls the domain name “www.xxx.xxx”. But I don't see that domain anywhere in cPanel.
Can you instead try using a domain name that's not the previous domain name used by the account to see if that allows you to proceed with the additional workaround steps?

Thank you.
 

Mat-d-rat

Well-Known Member
Jul 30, 2003
108
2
168
Renamed the account domain name to xxx.temp - moved the file as stated and regenerated by visiting the ssl page. Went back to account list and still wrong :(
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello,

To update, it looks like this particular issue related to the use of a reserved username for an account (it was created at a time before the username was marked as reserved in the /etc/aliases file). Changing the account username to a non-reserved username addressed the issue.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello,

To update, case CPANEL-20670 was also published into cPanel & WHM version 70.0.52:

Fixed case CPANEL-20670: Modify Account: avoid failure with previously used domain.

Thank you.