Pages

Bug 31059 - encryption_key config entry not generated when upgrading: solution

Problem statement

The following line does not add to koha-conf.xml when upgrading. I noticed it happened when we upgraded to the Koha version to 22.11.7 and higher. It results in the upgrade process terminating on the way, and Koha crashes.

 <!-- Encryption key for crypted password or sensitive data -->
 <encryption_key>__ENCRYPTION_KEY__</encryption_key>
 

Solution

Open the following file and check if the line is there; 

sudo mousepad /etc/koha/sites/library/koha-conf.xml

Find the location of the lines from the screenshot. Check the line number.

If the encryption_key line is not there, add the lines into koha-conf.xml
 <!-- Encryption key for crypted password or sensitive data -->
 <encryption_key>__ENCRYPTION_KEY__</encryption_key>

If the line is there, you only need to add the key.
Need to generate and add the key into the line; apply the following command in the terminal,

pwgen 32

Copy the key and paste it into the encryption key line,


<!-- Encryption key for crypted password or sensitive data -->
<encryption_key>Auc5ciexahphie9kairaegh4ohchai3d</encryption_key>

Restart memcached and apache2. 

sudo service apache2 restart
sudo service memcached restart

Reference

Bug 31059 - encryption_key config entry not generated when upgrading

No comments:

Post a Comment