Symptoms
-
The Plesk > Domains page cannot be opened due to the following error:
PLESK_ERROR: Internal error: Failed to parse metadata
Message Failed to parse metadata
File aps_php.php
Line 12559
Type Exception -
The same error appears in an attempt to create/remove a customer/subscription.
-
APS package settings cannot be checked:
# /usr/local/psa/bin/aps –get-packages-global-settings
Failed to parse metadata
OR
# /usr/local/psa/bin/aps –get-packages-global-settings
PHP Warning : aps_registry_packageconfiguration_getglobalsettings(): Entity: line 7: parser error : Char 0x0 out of allowed range; File: /usr/share/aps_php/aps_php.php, Line: 10024
PHP Warning : aps_registry_packageconfiguration_getglobalsettings(): ; File: /usr/share/aps_php/aps_php.php, Line: 10024
…
Failed to parse metadata -
It is not possible to install an application.
-
Unable to clear cache at Tools & Settings > Application Vault > Clear Cache on Plesk:
PLESK_ERROR: Internal error: Cannot find package cache directory: ‘/usr/local/psa/var/apspackages/apscatalog7R2ZJ5.zipb17fa7a9-c64e-c0’
Message Cannot find package cache directory: ‘/usr/local/psa/var/apspackages/apscatalog7R2ZJ5.zipb17fa7a9-c64e-c0’
File Content.php
Line 73
Type CommonPanel_Aps_Cache_Exception -
When creating a server backup, the following error message appears in the backup task sumary:
PLESK_INFO: Warning: server “server”
Unable to get Global settings for APS Applications (ErrorCode: 3, STDOUT:). -
The
/opt/psa/var/apspackages
or/usr/local/psa/var/apspackages
was accidentally cleared.
Cause
The metafile_uri
directory (from the apsc.aps_package
table) is missing on the server or the APP-META.xml
file is corrupted.
Resolution
If the apspackages
folder was accidentally cleared, the best way is restoring it from the full server backup.
If it does not contain all applications, follow steps below as well as for other cases.
For Windows
-
Connect to the server via RDP.
-
Download the attached script restore-cache.ps1.
-
Right-click on it and select Run in Powershell.
For Linux
-
Connect to the server via SSH.
-
Download this script:
# wget https://support.plesk.com/hc/en-us/article_attachments/360010105354/restore-cache
-
Set .sh extension and make it executable:
# mv restore-cache restore-cache.sh; chmod +x restore-cache.sh
-
Run the script:
# ./restore-cache.sh
If the issue persists after 10 minutes, do the following:
-
Clear the Apps cache: Tools & Settings > Application Vault > Clear Cache
-
Create the reported directory if unable to clear cache and retry:
# mkdir /usr/local/psa/var/apspackages/apscatalog7R2ZJ5.zipb17fa7a9-c64e-c0
# chown -R psaadm:psaadm /usr/local/psa/var/apspackages/apscatalog7R2ZJ5.zipb17fa7a9-c64e-c0 -
Make sure that SQL query debug is disabled in config file
/usr/local/psa/admin/conf/panel.ini
.The script does not work with enabled debug.
-
Login to the MySQL server:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin apsc
-
Determine
metafile_uri
path by using the following sql query:MYSQL_LIN: mysql> select `id`, `name`, `version`, `release`, `metafile_uri` from apsc.aps_package;
+—–+———–+———+———+———–…