In the event that your cPanel license gets out of sync with cPanel’s server or it needs to be synced for the first time, you may have an invalid license error when you attempt to login to WHM or cPanel. To fix this, you can login to shell as root and execute the following command:
The result should be:
Updating cPanel license…Done. Update succeeded.
Building global cache for cpanel…Done
Once you see this message, just refresh your cPanel or WHM and it will be udated.