• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Lots of SQL errors

P

ponggr

Guest
I am getting a lot of errors in Plesk but also when I try to do a full system backup from the terminal. All seem to be SQL related. For example when I try to do a full system backup I get the following (it seems that tables are missing!):

DBD::mysql::st execute failed: Table 'psa.APSClientApplicationItems' doesn't exist at /usr/local/psa/PMM/agents/shared/Db/DbiBackend.pm line 66.
01:43:44 ERROR Unable to execute SQL (SELECT sap.name AS sapp_name, sap.version AS sapp_version, sap.release AS sapp_release, lt.license_type_hash AS license_type_id, ai.shared AS shared, cai.instances_limit AS instances_limit FROM APSClientApplicationItems AS cai INNER JOIN APSApplicationItems AS ai ON (ai.id = cai.app_item_id AND cai.client_id = '2') INNER JOIN SiteAppPackages AS sap ON (sap.id=ai.pkg_id)LEFT JOIN APSLicenseTypes AS lt ON (ai.license_type_id = lt.id) AND ai.shared = 'false'): Table 'psa.APSClientApplicationItems' doesn't exist
DBD::mysql::st execute failed: Table 'psa.APSClientApplicationItems' doesn't exist at /usr/local/psa/PMM/agents/shared/Db/DbiBackend.pm line 66.
.
.
.
01:43:50 ERROR Unable to execute SQL (SELECT id FROM SiteApps WHERE dom_type='domain' AND dom_id='63'): Table 'psa.SiteApps' doesn't exist
DBD::mysql::st execute failed: Table 'psa.SiteAppPackages' doesn't exist at /usr/local/psa/PMM/agents/shared/Db/DbiBackend.pm line 66.
01:43:50 ERROR Unable to execute SQL (SELECT `name`, `version`, `release` FROM SiteAppPackages): Table 'psa.SiteAppPackages' doesn't exist
DBD::mysql::st execute failed: Table 'psa.SiteAppPackages' doesn't exist at /usr/local/psa/PMM/agents/shared/Db/DbiBackend.pm line 66.
01:43:50 ERROR Unable to execute SQL (SELECT `name`, `version`, `release` FROM SiteAppPackages): Table 'psa.SiteAppPackages' doesn't exist
DBD::mysql::st fetchrow_arrayref failed: fetch() without execute() at /usr/local/psa/PMM/agents/shared/Db/DbiBackend.pm line 84.
DBD::mysql::st execute failed: Table 'psa.APSApplicationItems' doesn't exist at /usr/local/psa/PMM/agents/shared/Db/DbiBackend.pm line 66.
01:43:50 ERROR Unable to execute SQL (SELECT lt.license_type_hash AS license_type_id, sap.name AS sapp_name, sap.version AS sapp_version, sap.release AS sapp_release, ai.shared AS shared, ai.disabled AS disabled FROM APSApplicationItems AS ai INNER JOIN SiteAppPackages sap ON (sap.id = ai.pkg_id) INNER JOIN APSLicenseTypes AS lt ON (lt.id = ai.license_type_id)): Table 'psa.APSApplicationItems' doesn't exist
DBD::mysql::st execute failed: Table 'psa.APSApplicationItems' doesn't exist at /usr/local/psa/PMM/agents/shared/Db/DbiBackend.pm line 66.
01:43:50 ERROR Unable to execute SQL (SELECT lt.license_type_hash AS license_type_id, sap.name AS sapp_name, sap.version AS sapp_version, sap.release AS sapp_release, ai.shared AS shared, ai.disabled AS disabled FROM APSApplicationItems AS ai INNER JOIN SiteAppPackages sap ON (sap.id = ai.pkg_id) INNER JOIN APSLicenseTypes AS lt ON (lt.id = ai.license_type_id)): Table 'psa.APSApplicationItems' doesn't exist
DBD::mysql::st fetchrow_hashref failed: fetch() without execute() at /usr/local/psa/PMM/agents/shared/Db/DbiBackend.pm line 90.
DBD::mysql::st execute failed: Table 'psa.APSLicenses' doesn't exist at /usr/local/psa/PMM/agents/shared/Db/DbiBackend.pm line 66.
01:43:50 ERROR Unable to execute SQL (SELECT l.key_number, l.source, lt.license_type_hash FROM APSLicenses l, APSLicenseTypes lt WHERE l.license_type_id = lt.id): Table 'psa.APSLicenses' doesn't exist
DBD::mysql::st execute failed: Table 'psa.APSLicenses' doesn't exist at /usr/local/psa/PMM/agents/shared/Db/DbiBackend.pm line 66.
01:43:50 ERROR Unable to execute SQL (SELECT l.key_number, l.source, lt.license_type_hash FROM APSLicenses l, APSLicenseTypes lt WHERE l.license_type_id = lt.id): Table 'psa.APSLicenses' doesn't exist
DBD::mysql::st fetchrow_arrayref failed: fetch() without execute() at /usr/local/psa/PMM/agents/shared/Db/DbiBackend.pm line 84.
 
My server support are ace and fixed it.

The database was corrupted and they fixed it.
 
Your plesk database is corrupted. Looks like upgrade to 8.3 was failed.
Try to find out the reason from upgrade logs in /tmp folder.
also you can try to run upgrade subsytem upgrade script with /usr/local/psa/admin/bin/php /usr/local/psa/etc/db/aps-psa830-db-upgrade command
 
Back
Top