Error when changing the hostname on cPanel server

Sometimes inside WHM when clicking the “change hostname” link or by running the following command:

/usr/local/cpanel/bin/set_hostname yourhostname.domainname.tld

you may get presented with the following error message:

"Your previous attempt to change the hostname is still running. Please wait until it completes"

This happens when the server has attempted to change the hostname but the result has not been completed correctly. This could be because the server rebooted or your server's Kernel might be outdated.

You should first check your Kernel version and update it to the latest version. Next, cPanel stored a “lock” file in the application-locks folder. Remove it with the below command:

rm -rf /var/cpanel/.application-locks/UpdateHostname

If you updated your Kernel now is the time to reboot your system but if you made no changes to the Kernel you can now try to set the hostname from WHM and by clicking the “change hostname” link or from an ssh console whilst logged in as the root user using the below command:

/usr/local/cpanel/bin/set_hostname yourhostname.domainname.tld

Remember, your hostname needs to be an FQDM which means it should have two “.” in it. for example, would be acceptable but just server would not be.

  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix IP Missing issue on cPanel/WHM

We are here to help you with solving the problem of Missing IP Server in list accounts. The...

Domain names are not showing in WHM

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...

How to Start/Stop or Restart Apache server

Apache is the HTTP server that is freely available over the internet. It is a kind of software or...

How to install Attracta SEO Tools plugin

RequirementscPanel/WHM needs to be installed on your server. Step 1: SSH into your server and go...

How to Install CpCleaner in cPanel through SSH?

Installation Run the following shell commands as root via SSH: wget -O cpc-1.0.3.tar...