Published on: December 24, 2016 by Ankita V Kurup
cPanel is a licensed software and there are occasions when cPanel fails to function as expected and throws “License Invalid” error while accessing the WHM/cPanel interface. Now let see how to renew cPanel License
The very first step in resolving the issue is to confirm that the license is valid
Open this link http://verify.cpanel.net/.
Enter the main public IP address for a server in the text box and press “Verify License”
Now it will return whether the license is valid or not.
Even though the license is valid, cPanel may be out of sync with the licensing server and will through “License Invalid” error again. This can also happen if you had renewed the license after its expiration but the licensing server fails to update it accordingly. Here we need to refresh the licensing info with the server.
If the license is valid then log in as root to the server and run the following to refresh the license.
The normal output of the command would be something similar to this
# /usr/local/cpanel/cpkeyclt Updating cPanel license...Done. Update succeeded. Building global cache for cpanel...Done
If this command errors or you do not see the server contacting cPanel license servers to verify your license, please check that your server is able to contact servers via port 80 (so, check your firewall’s OUTPUT options) and that you have a proper hostname set on your server.
cPanel makes the connection to one of the cPanel licensing servers through port 2089. So we should make sure that this port is open. The best tool to check the connectivity to remote host is “Telnet”
root@server [~]# telnet auth.cpanel.net 2089 Trying 22.214.171.124… Connected to auth.cpanel.net (126.96.36.199). Escape character is ‘^]’. 200 cPanel License Service Version 12.0 root@server [~]#
Sometimes on running the cpkeyclt command, you will encounter the error given below
Updating cPanel license...info [cpkeyclt] /usr/bin/dig failed the usability test ! query failed: query timed out info [cpkeyclt] /usr/local/cpanel/src/3rdparty/perl/perldig failed the usability test! warn [cpkeyclt] No working dig found! Done. Update Failed! Error message: License server hostnames could not be resolved to IP addresses Building global cache for cpanel...Done
Please check your resolver file /etc/resolv.conf has working resolvers.
Your server’s main IP should not be listed as a resolver in this file nor should localhost be listed (127.0.0.1) for the nameserver entries for the resolver.
You can also test if it was the resolver by running dig google.com. For more info about the error refer the log file /usr/local/cpanel/logs/license_log.
A successful cPanel license verification will display an output as below
[root@varuna bandwidth]# /usr/local/cpanel/cpkeyclt
Updating cPanel license…Done. Update succeeded.
Building global cache for cpanel…Done
The below given are some status codes returned when verifying license
Category : cPanel, Linux