Sometimes you may have an invalid error when you attempt to login to WHM or cPanel.
There are multiple causes when you face such errors like:
1. Cpanel license expiration
2. Change in the main IP of the server
3. License not updated
To fix the error due to one of the above issues first make sure your IP is licensed. To check the status of your license go to
http://verify.cpanel.net and enter your IP address.
Paste your IP into the field and click "Verify License" and make sure your license is Active. If the license is active, login to your server via SSH and run the following command:
# /usr/local/cpanel/cpkeyclt
The command will reset and refresh update the cPanel license file with the new current hostname.