Articles in this section

Plesk backup finishes with warning: Unable to back up applications packages. Error: Wrong encryption key size

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • A backup that is created via the Plesk GUI finishes with the following warning:

    CONFIG_TEXT: Warning: Server "example.com"
    Unable to back up applications packages. Error: Wrong encryption key size

  • Errors that are similar to the following can be seen in the /var/log/sw-cp-server/sw-engine.log:

    CONFIG_TEXT: chpasswd[748392]: Failed to read entire encryption key from '/etc/psa/private/secret_key': Resource temporarily unavailable (11)
    chpasswd[748392]: Failed to initialize encryption cipher 'AES-128-CBC' with key '/etc/psa/private/secret_key'
    chpasswd[748392]: encrypt: cannot initialize encryption engine
    chpasswd[748392]: Unable to encrypt password for store in Plesk db

Cause

The /etc/psa/private/secret_key file is corrupted, due to which its size is not accurate.

Resolution

Reset the secret_key file by executing the following steps:

1. Log into your server via SSH
2. Make a backup of the corrupted file (just in case) by executing this command:

# cp /etc/psa/private/secret_key /etc/psa/private/secret_key.bak

3. Reset the/etc/psa/private/secret_key key by executing the following command:

Warning: Before the execution of this command, it is recommended to make a full backup of the Plesk database by following the information in this article.

Click on a section to expand

For a RHEL-based Linux operating system

# /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/scripts/cloning_actions.php --do reset-secret-key

For a Debian-based Linux operating system

# /usr/local/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/scripts/cloning_actions.php --do reset-secret-key

The output that this command will provide would be similar to the following:

ODBC error #28000: [unixODBC][ma-3.0.8]Access denied for user 'apsc'@'localhost' (using password: YES)

Executing it may result in temporary inability to run Plesk commands, due to experiencing errors that are similar to the following:

# plesk bin site --info example.com
ODBC error #28000: [unixODBC][ma-3.0.8]Access denied for user 'apsc'@'localhost'  (using password: YES)
exit status 3

4. (Optional) If you do experience the error, you can resolve it by executing the following command:

# plesk repair db

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.