cpanelwhmserver-administration

CPanel/WHM Unknown License File Error


So my issue is like the title suggests. However I have tried the following suggestions from this page (https://documentation.cpanel.net/display/ALD/Installation+Guide+-+Troubleshoot+Your+Installation#InstallationGuide-TroubleshootYourInstallation-Licenseerrors) with no results.

1.) curl -L http://cpanel.net/showip.cgi (shows my ip address on the server for use on the verify.cpanel.net script), this can be verified also here... (http://verify.cpanel.net/index.cgi?ip=xxx.xxx.xxx.xx) (I don't like showing my IP, but trust me it was verified.)

2.) /usr/local/cpanel/cpkeyclt Updating cPanel license...Done. Update Failed! Error message: A License check appears to already be running. Building global cache for cpanel...Done

So the above didn't work.

I then tried these commands.

3.) /usr/local/cpanel/etc/init/stopcpsrvd and then /usr/local/cpanel/scripts/upcp --sync to attempt to resynchronize.

This appears to successfully run but I still get the same error. Attached below is the error message I get when I attempt to login to WHM.

4.) I then tried running rdate -s rdate.cpanel.net as suggested in some other posts to have the times match up and then when I run (/usr/local/cpanel/cpkeyclt) it seems to time out and nothing ever happens.

Looking at the logs for the cpanel license (/usr/local/cpanel/logs/license_log) I see this.

Tue Jul 26 16:23:30 2016: Trying server 208.74.125.22
Tue Jul 26 16:23:45 2016: Timed out while connecting to port 2089
Tue Jul 26 16:24:00 2016: Timed out while connecting to port 80
Tue Jul 26 16:24:15 2016: Timed out while connecting to port 110
Tue Jul 26 16:24:30 2016: Timed out while connecting to port 143
Tue Jul 26 16:24:45 2016: Timed out while connecting to port 25
Tue Jul 26 16:25:00 2016: Timed out while connecting to port 23
Tue Jul 26 16:25:15 2016: Timed out while connecting to port 993
Tue Jul 26 16:25:30 2016: Timed out while connecting to port 995
Tue Jul 26 16:30:14 2016: License Update Request
Tue Jul 26 16:30:14 2016: Using full manual DNS resolution
Tue Jul 26 16:30:14 2016: Trying server 208.74.121.85
Tue Jul 26 16:30:29 2016: Timed out while connecting to port 2089

Any help is appreciated!

enter image description here

Notes

Results of running /usr/local/cpanel/etc/init/stopcpsrvd

/usr/local/cpanel/etc/init/stopcpsrvd
Waiting for “cpsrvd” to stop ……Gracefully Terminating processes: cpsrvd: with pids 20842 and owner root.......waited 1 second(s) for 1 process(es) to terminate....Done
…finished.

Startup Log
    Starting PID 20839: /usr/local/cpanel/libexec/cpsrvd-dormant

Results of running /usr/local/cpanel/scripts/upcp –sync (Couldn't show everything because of text character limitations)

[2016-07-26 15:39:39 -0400]   Detected cron=0 (Terminal detected)
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
=> Log opened from cPanel Update (upcp) - Slave (21620) at Tue Jul 26 15:41:53 2016
[2016-07-26 15:41:53 -0400]   Maintenance completed successfully
[2016-07-26 15:41:54 -0400]   95% complete
[2016-07-26 15:41:54 -0400]   Running Standardized hooks
[2016-07-26 15:41:54 -0400]   100% complete
[2016-07-26 15:41:54 -0400]   
[2016-07-26 15:41:54 -0400]     cPanel update completed
[2016-07-26 15:41:54 -0400]   A log of this update is available at /var/cpanel/updatelogs/update.1469561979.log
[2016-07-26 15:41:54 -0400]   Removing upcp pidfile
[2016-07-26 15:41:54 -0400]   
[2016-07-26 15:41:54 -0400] Completed all updates
=> Log closed Tue Jul 26 15:41:54 2016

Solution

  • It turns out the answer was IPTables. Before that it was the rDate command that was necessary to fix it, but my IPTables was blocking the connections.

    To temporarily disable your firewall do this.

    iptables-save > /root/current.ipt
    iptables -P INPUT ACCEPT; iptables -P OUTPUT ACCEPT
    iptables -F INPUT; iptables -F OUTPUT
    ping -c 3 google.com
    iptables-restore < /root/current.ipt
    rm -f /root/current.ipt
    

    The first command saves a copy of your firewall settings. The next 2 commands make it so all input/output are allowed (for outgoing and incoming connections) Finally test by pinging the ip address that was giving the issue for cPanel in your log file.

    If it works that means the update license command will work.

    Simply run:

    /usr/local/cpanel/cpkeyclt
    

    and you are good to go.

    You can restore back your rules by using the last 2 commands if you want:

    iptables-restore < /root/current.ipt
    
    rm -f /root/current.ipt
    

    Be warned that you will be blocked again, unless you fix the firewall.