License was not automatically updated: KeyUpdate Result code: 2 Network failure

Created:

2016-12-18 06:40:08 UTC

Modified:

2017-08-16 17:03:24 UTC

3

Was this article helpful?


Have more questions?

Submit a request

License was not automatically updated: KeyUpdate Result code: 2 Network failure

Applicable to:

  • Plesk for Linux

Plesk license was not automatically updated on a server:

Warning: You are currently operating within the grace period of your product license. To update your product license, select the Retrieve Keys option on the License Management page. 

or

Your license key has expired. To continue using your Plesk, you must purchase a non-expiring commercial license key.

The following errors are found in /var/log/plesk/panel.log :

ERR [panel] KeyUpdate Result code: 2 Network failure
ERR [panel] KeyUpdate Result desc: Not valid XML. XML parsing failed

or

ERR [panel] KeyUpdate Result code: 2 Network failure
ERR [panel] KeyUpdate Result desc: Not valid XML.  no element found

It is possible to retrieve the license manually in Tools and Settings > License Management > Retrieve .

Cause

Corrupted file /etc/sw/keys/registry.xml or Plesk licensing server (Key Administrator) is overloaded with the same requests

Resolution

  1. Remove the file /etc/sw/keys/registry.xml

  2. Recreate the file by logging out and logging back in Plesk

  3. Run Daily Maintenance task to update keys on the server:
    # /usr/local/psa/admin/bin/php /usr/local/psa/admin/plib/DailyMaintainance/task-script.php UpdateKeys --period=daily

If this did not solve the issue, then the cause is that Key Administrator server (the licensing server) gets overloaded when a huge number of cloned virtual machines are trying to reach it for a license update. So if there are a lot of VMs with the same time for the daily maintenance task, then all of VMs will try to contact the licensing server at the same time. In this case, some requests fail due to the Key Administrator server overload, and some get processed successfully.

To solve the issue, change the Daily Maintenance Task time on different virtual machines. A feature request is created in order to implement it as the default configuration.

Apply one of the following solutions:

1. It is enough to move it to an hour in any direction (+/- 60 minutes from the current Daily Maintenance Task startup time). For example, add sleep $(expr $RANDOM % 360); to the /etc/cron.daily/50plesk-daily file. This will delay daily task for 60 minutes.

2. Or, alternatively, edit the /etc/crontab or /etc/anacrontab file so that the default start time is changed from 6:25AM to, for example, 5:45AM (you may set any other time +/- 30 minutes from 6:25AM):

# cat /etc/crontab | grep daily
45 5 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts /etc/cron.daily )

For Plesk Multi Server

Use the following workaround:

1. Connect to Service Node using SSH .

2. Run command to retrieve the license:

# sudo plesk bin license --retrieve

Or retrieve the license in Plesk Interface: log in to Management Node > Nodes > click Manage Node on the unsupported node row > you will be redirected to the License Management on the Service Node > click Retrieve Keys .

3. Re-check unsupported Service Node: log in to Management Node > Nodes > click Re-Check .

Have more questions? Submit a request
Please sign in to leave a comment.