Articles in this section

Plesk backup fails: Unable to back up applications packages. Error: ODBC error #28000: [ma-3.1.20]Access denied for user 'apsc'@'127.0.0.1' (using password: YES)

kb: bug Plesk for Linux

Symptoms

  • On a Plesk for Linux server with MariadDB 10.11, creating a backup in Plesk fails:

    Unable to back up applications packages.

Error: ODBC error #28000: [ma-3.1.20]Access denied for user 'apsc'@'127.0.0.1' (using password: YES)
  • Using the utility plesk repair db does not help.

  • No corruption of the Plesk database apsc is found using manual methods.

  • Attempt to access domain in Plesk may result into:

    TypeError: Cannot read properties of null (reading 'id')

  • Backup logs returns an error:
    [2024-08-08 08:54:44.306|724517] WARN [panel] Unable to back up applications packages.  
    [2024-08-08 08:54:44.307|724517/] WARN [panel] Exception: ODBC error #28000: [ma-3.1.20]Access denied for user 'apsc'@'127.0.0.1' (using password: YES)  
    file: /usr/local/psa/admin/plib/backup/Agent/Dumper/ApplicationVaultInfo.php  
    line: 90  
    code: 0  
    trace: #0 /usr/local/psa/admin/plib/backup/Agent/Dumper/ApplicationVaultInfo.php(90): APS/Registry/PackageBrowser->browse()  
    1 /usr/local/psa/admin/plib/backup/Agent/CallHelper.php(50): Plesk/backup/Agent/Dumper/ApplicationVaultInfo->getPackages()  
    2 /usr/local/psa/admin/plib/backup/Agent/Dumper/ApplicationVaultInfo.php(50): Plesk/backup/Agent/Dumper/Base->iterateSafely(object of type Generator, object of type Closure, object of type Closure)  
    3 /usr/local/psa/admin/plib/backup/Agent/Dumper/ServerInfo.php(249): Plesk/backup/Agent/Dumper/ApplicationVaultInfo->getPackagesInfo()  
    4 /usr/local/psa/admin/plib/backup/Agent/CallHelper.php(20): Plesk/backup/Agent/Dumper/ServerInfo->Plesk/backup/Agent/Dumper{closure}()  
    5 /usr/local/psa/admin/plib/backup/Agent/Dumper/ServerInfo.php(246): Plesk/backup/Agent/Dumper/Base->callSafely(object of type Closure, string 'Unable to back up applications packages.')  
    6 /usr/local/psa/admin/plib/backup/Agent/Dumper/ServerInfo.php(57): Plesk/backup/Agent/Dumper/ServerInfo->backupApplicationVault(object of type Plesk/backup/Agent/Schema/Backup/Server)  
    7 /usr/local/psa/admin/plib/backup/Agent/Dumper/Server.php(42): Plesk/backup/Agent/Dumper/ServerInfo->getServerInfoDump()
  • One of following errors can be found at /var/log/plesk/panel.log:
    ERR [panel] ODBC error #28000: [ma-3.1.20]Plugin caching_sha2_password could not be loaded: /usr/lib/mariadb/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory 
    
    ERR [panel] ODBC error #28000: [unixODBC][ma-3.1.20]Access denied for user 'apsc'@'127.0.0.1' (using password: YES)

Cause

Plesk bug PPPM-14535, which has been fixed with the release of Plesk Obsidian 18.0.64.

Resolution

Update Plesk to the latest version. If the update can't be installed for some reason, apply the workaround above:

Workaround
  1. Connect to the Plesk server using SSH.

  2. Open the MariaDB configuration file with an editor:

    • On RHEL/CentOS/AlmaLinux/Rocky Linux/CloudLinux:

      /etc/my.cnf

    • On Ubuntu and Debian:

      /etc/mysql/my.cnf or /etc/mysql/mariadb.conf.d/50-server.cnf

  3. Remove or comment out (by preceding the line with an #) the parameter skip-name-resolve or skip_name_resolve and save the file.

  4. Restart MariaDB:

    # service mariadb restart

Was this article helpful?

Comments

6 comments
Date Votes
  • We have skip_name_resolve added to /etc/mysql/mariadb.conf.d/50-server.cnf 

    and restarted mariadb server.

     

    Then we have started an manual Backup only with configuration. The issue still exists.

    Using MariaDB 10.3.x

     

    0
  • The following workaround solved the problem for us:

    show create user `apsc`@`localhost`;

    Create a new user with host 127.0.0.1

    CREATE USER `apsc`@`127.0.0.1` IDENTIFIED BY PASSWORD 'PASSWORD_FROM_CREATE_USER';

    Show the grants of apsc

    show grants for 'apsc'@'localhost';

    Grant the same privileges to new user:

    GRANT USAGE ON *.* TO `apsc`@`127.0.0.1`;
    GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `apsc`.* TO `apsc`@`127.0.0.1`;
    flush privileges;

    Now the backup is working again.

    0
  • We have the same problem - but none of the above mentioned solutions worked for us.

    Our error message in backup-manager is
    "Unable to back up applications packages. Error: ODBC error #28000: [unixODBC][ma-3.1.20]Access denied for user 'apsc'@'localhost' (using password: YES) "
    (so for us it is localhost, not 127.0.0.1)

    I also tried to set a new admin password for plesk and set this explicitly for the database user apsc.

    Unfortunately the backups still give the warning/error and in Plesk "Tools & Settings" the Application Vault gives "TypeError ... a is undefined ..." message.

    BTW - Is there a way to get information about mentioned "Plesk bug PPPM-14535"?
    Are the developers already working to get a fix for that one?

    Thanks in advance!

    0
  • We didn't like the Plesk solucion to deactivate skip-name-resolve as this makes the mysql server slower.
    We have looked at the mysql - user table (in phpmyadmin thrue Plesk access) and found the user "apsc@localhost"
    We copied its encrypted password.
    After executed the following SQL:

    CREATE USER 'apsc'@'127.0.0.1' IDENTIFIED WITH 'mysql_native_password' AS 'COPY YOUR ENCRYPTED PASSWORD HERE';
    CREATE USER 'apsc'@'::1' IDENTIFIED WITH 'mysql_native_password' AS 'COPY YOUR ENCRYPTED PASSWORD HERE';
    Now the backup works fine.

    0
  • The commenting out of skip-resolve worked for me!

    18.0.63 Update #4 broke things and before finding this article I first attempted to fix the apsc error with plesk repair db which gave me: Error messages: 55; Warnings: 177; Errors resolved: 232

    Wordpress Toolkit would then give me this error: Cannot update WordPress instance settings: Unable to find row with id in smb_apsMetas table when trying to log in to a site via Plesk panel.

    There is a support article - https://www.plesk.com/kb/support/cannot-update-wordpress-instance-settings-unable-to-find-row-with-id-in-smb_apsmetas-table - about that error but it is useless for this particular issue and things would still be broken.

    0
  • Do you plan to publish a fix for this problem in next mu ?

    0

Please sign in to leave a comment.