Applicable to:
- Plesk for Linux
Symptoms
Error on the main Plesk page (and pretty much every other page):
PLESK_INFO: 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.
However if Retrieve Keys button is pressed on the
License Management
page, the key is updated fine.
The error comes back on the next key update date.
Troubleshooting steps
Note: This article may require additional administrative knowledge to apply. If any help required, contact server’s administrator or hosting support.
Login to the server over SSH.
Plesk Daily Maintenance task consists of many different parts. The part which is responsible for retrieving keys is called
UpdateKeys
and its command line is:
# /usr/local/psa/bin/sw-engine-pleskrun "/usr/local/psa/admin/plib/DailyMaintainance/task-script.php" UpdateKeys '--period=daily'
To ensure that Daily Maintenance task is present:
# stat /etc/cron.daily/50plesk-daily && md5sum /etc/cron.daily/50plesk-daily
File: `/etc/cron.daily/50plesk-daily'
Size: 284 Blocks: 8 IO Block: 4096 regular file
Device: 803h/2051d Inode: 8139977 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2014-08-01 03:23:18.800435717 +1000
Modify: 2013-08-19 16:11:33.000000000 +1000
Change: 2014-06-03 15:59:48.963806717 +1000
cc58b516e7dc70f70816a605cbc2a42b /etc/cron.daily/50plesk-daily
and its content is correct:
# cat /etc/cron.daily/50plesk-daily
#!/bin/sh
### Copyright 1999-2012. Parallels IP Holdings GmbH. All Rights Reserved.
# install_statistics
/usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1
# install_mysqldump
/usr/local/psa/bin/mysqldump.sh >/dev/null 2>&1
Note: There is NO newline at the end of file.
Note: These values are valid for Plesk 11.5.
Check that cron is running:
# service cron status
cron (pid 24250) is running...
for Cron or
# service crond status
crond (pid 24250) is running...
for Anacron.
For further debugging, it is possible to enable debug logging (without SQL query log) and run the task manually with output redirection like this:
# /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php > ~/dm.out 2>&1
After some time, check
~/dm.out
and search for the following string (or its substring):
CONFIG_TEXT: Task run Update keys: /usr/local/psa/bin/sw-engine-pleskrun "/usr/local/psa/admin/plib/DailyMaintainance/task-script.php" UpdateKeys '--period=daily'
Check the section below it to find the results. Example:
CONFIG_TEXT: ...
DEBUG (7) [util_exec]: End: 994170fb72fbd3730df0d72069edee37
DEBUG (7) [panel]: KeyUpdate Subject: Parallels Panel key update deferral notification
DEBUG (7) [panel]: KeyUpdate Notify: Unable to update . An error occurred while processing your key. You can try updating it later.
ERR (3) [panel]: KeyUpdate Result code: 2 Unspecified error
ERR (3) [panel]: KeyUpdate Result desc: License key is not prolongated yet
INFO (6) [panel]: update resultCode=2 resultDesc=License key is not prolongated yet
Here, the key has expired and Key Administration server has notified the Plesk installation about it. This means that updating works fine (since Plesk is able to contact the KA server).
Other result:
CONFIG_TEXT: INFO (6) [panel]: update resultCode=2 resultDesc=Key update disabled
This means that key was checked and does not require an update (also no error).
Sometimes, if Daily Maintenance task gets stuck somewhere, it can not be launched on the next day (or never reach key update stage). Therefore, no key update will happen. To check what is currently being performed by the task, use the following commands:
-
Define the function which will show all child processes for PID:
# pidtree() {
myPtree() {
echo -n $1 " "
for _child in $(ps -o pid --no-headers --ppid $1); do
echo -n $_child `myPtree $_child` " "
done
}
ps f $(myPtree $1)
} -
Find PID of the Daily Maintenance task (
/usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/plib/DailyMaintainance/script.php
). Also, you can check the time that process was running to determine if it is too long:# ps -eo pid,etime,command | grep -i Daily
-
Check what processes did it spawn:
# pidtree 30700
PID TTY STAT TIME COMMAND
30700 pts/1 S+ 0:00 /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/plib/DailyMaintainance/script.php
31380 pts/1 S+ 0:00 \\_ /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/plib/DailyMaintainance/task-script.php ExecuteStatistics --peri
31388 pts/1 S+ 0:00 \\_ /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/sbin/statistics --no-webstat
31404 pts/1 S 0:00 \\_ /usr/local/psa/admin/bin/statistics_collector
23468 pts/1 R 5:20 \\_ /usr/local/psa/admin/bin/pmm-ras --get-domain-dumps-disc-usage --domain-guid 5b309ed5-4871-4d5e-a2ba-c9d3c3592d47 --session-patFor example, here, the task is currently calculating the disk space usage for a domain. If there are a lot of domains and many large files, task can run for pretty long periods of time (sometimes even ~24 hours). This might be the root cause of your key not getting updated.
Comments
0 comments
Please sign in to leave a comment.