Some times WHM won’t update license for some reason, show license expired message when login to Cpanel/WHM/Webmail etc..
First verify Your server have valid cpanel license by going to following site.
Enter your server IP to verify server have valid license. If your license is fine, login in to server as user root and run
/usr/local/cpanel/cpkeyclt
Example
[root@server78 ~]# /usr/local/cpanel/cpkeyclt Updating cPanel license...Done. Update succeeded. Building global cache for cpanel...Done [root@server78 ~]#
Some times firewall can block access to cpanel server, in that case, you should check firewall rules. This you will be able to find by checking /var/log/messages.
If you have CSF firewall, run
csf -x
For iptables, run
iptables -F