• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Plesk not able to update | mysqldump cant dump psa database

apache123456

New Pleskian
I logged in to plesk and it showed an error that it cannot update plesk, I checked the log and it showed:

Installation started in background
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* atomic: www6.atomicorp.com
* elrepo: mirrors.coreix.net
* epel: mirrors.coreix.net
+ plesk-core-utilities
+ plesk-release
+ plesk-core
+ postfix
+ psa
+ psa-locale-base-en-US

Installing packages
mysqldump: Got error: 1066: "Not unique table/alias: 'apirpccallsstat'" when using LOCK TABLES

**** Product prep-install started.
Create user 'psaadm' and group 'psaadm'
Group 'psaadm' already exists
Checking for the user 'psaadm'...
User 'psaadm' already exists
Create group swkey-data
Group 'swkey-data' already exists
Trying to add supplementary group 'swkey-data' for user 'psaadm'... already there
Trying to got legacy variables... done
config updated
===> Updated /etc/psa/psa.conf
Trying to save legacy variables... done
Trying to resolve hostname 'ns383469.ip-94-23-253.eu' and validate its IP address... done


===> Checking for the necessary system accounts
Checking for the system groups and users necessary for admin server...
Group 'psaadm' already exists
Checking for the user 'psaadm'...
User 'psaadm' already exists
Group 'psaserv' already exists
Trying to add supplementary group 'psaserv' for user 'psaadm'... already there
Group 'psacln' already exists
Checking that /usr/local/psa/bin/chrootsh registered as login shell...
/usr/local/psa/bin/chrootsh already registered as a login shell

===> Performing safe prep-install database actions


===> Upgrading database

Trying to start service mariadb... active
done
Trying to establish test connection... connected
done
Trying to find psa database... version is 018000000
Trying to backup MySQL database...
ERROR while trying to backup MySQL database

Check the error reason (see log file: /var/log/plesk/install/plesk_18.0.21_installation.log), fix and try again
***** problem report *****
ERROR while trying to backup MySQL database
Error: An error occurred during performing of installation PREP actions (see log for details). Installation was rolled back.
Warning! Not all packages were installed.
Please check if your system services are operable.
Please resolve this issue and try to install the packages again.
Visit Plesk Help Center to search for a solution.

I've been trying to google it and found many guides but none worked, so is there anyone who could help me out here?
 
It seems like that the same table appears more than one in the mysqldump list of tables;

You need to check your database log files to see if you can see if you are trying to dump tables twice.
 
"mysqldump: Got error: 1066: "Not unique table/alias: 'apirpccallsstat'" when using LOCK TABLES"

My guess at this:

You can check whether the Table exists twice or more often in different capitalizations in the database.
# plesk db
> use psa;
> show tables;
It should be spelled ApiRpcCallsStat. Lookt at the beginning of the output and in the middle where the small letter names start. Does the table exist a second time, same name but different capitalization? If so, backup the psa database, then delete the table that is spelled incorrectly, then try the update again.

If this guess does not fit your case, it is very likely something that official Plesk support needs to check. Also, if one table causes this issue, I'd guess that there are other tables, too, that cause similar problems.
 
"mysqldump: Got error: 1066: "Not unique table/alias: 'apirpccallsstat'" when using LOCK TABLES"

My guess at this:

You can check whether the Table exists twice or more often in different capitalizations in the database.
# plesk db
> use psa;
> show tables;
It should be spelled ApiRpcCallsStat. Lookt at the beginning of the output and in the middle where the small letter names start. Does the table exist a second time, same name but different capitalization? If so, backup the psa database, then delete the table that is spelled incorrectly, then try the update again.

If this guess does not fit your case, it is very likely something that official Plesk support needs to check. Also, if one table causes this issue, I'd guess that there are other tables, too, that cause similar problems.

yes looks like same tables one is capitalized one is in small letters, how do i fix this?
I can;t take backup of psa aswell gets same error

"
mysqldump: Got error: 1066: "Not unique table/alias: 'apirpccallsstat'" when using LOCK TABLES
exit status 2
"
 
... If so, backup the psa database, then delete the table that is spelled incorrectly, then try the update again...
I meant that you should backup the psa database, then delete the incorrectly spelled table (the one in small letters) and then try the update again.

How to backup the psa database?
How to back up/restore Plesk system databases
Example:
# plesk db dump psa /home/psa_backup.sql

How to delete a table from a database?
# plesk db
> use psa;
> drop table apirpccallsstat;
> quit;

How to try the update again?
Use the same method as you did before.
 
I meant that you should backup the psa database, then delete the incorrectly spelled table (the one in small letters) and then try the update again.

How to backup the psa database?
How to back up/restore Plesk system databases
Example:
# plesk db dump psa /home/psa_backup.sql

How to delete a table from a database?
# plesk db
> use psa;
> drop table apirpccallsstat;
> quit;

How to try the update again?
Use the same method as you did before.

I did as you said but each time it reports new duplicate table and I keep deleting them, is that how I'm supposed to do till it succeeds?
 

Yes they should because I had to reinstall plesk from scratch and its a pain in the arse, all sites went down for a while
 
Well, you have to open a ticket with them.

Submit a request – Plesk Help Center

Now the same is happening with another server of mine, I visited that link but it's saying:

"We identified that the license was purchased not directly from Plesk but through one of the Plesk Resellers.
Please contact your license provider for support service.
Alternatively you can receive support directly from Plesk by purchasing monthly support subscription for your license key Try 30 days for free now.
Also you can refer to Plesk complementary support resources such as Knowledgebase, Facebook Community or tweet to @PleskHelps"

Mys servers and plesk is from OVH
 
That's the downside of the cheap reseller licenses. But I'd still try support, because these guys really know what they're doing. They're just worth the 10 €/month. And you have the 30 days free trial.
 
Back
Top