Calibreweb & Buster upgrade - Solving the LDAP authentication issue

Hi there,
It seems that in some cases, the Buster upgrade broke calibreweb LDAP integration, which disable calibreweb login.
I’m not very sure of the exact “why”, but the root cause seems linked to the python changes between Stretch and Buster.

Anyway, a few command lines will correct the issue.
Alternatively, you may uninstall and re-install calibreweb and it will work again.

Here are the command lines:

sudo curl https://bootstrap.pypa.io/get-pip.py | python
sudo pip3 install --no-cache-dir --target /var/www/calibreweb/vendor -r /var/www/calibreweb/requirements.txt --upgrade
sudo pip3 install --no-cache-dir --target /var/www/calibreweb/vendor -r /var/www/calibreweb/optional-requirements.txt --upgrade
sudo systemctl restart calibreweb

Et voilà! You may connect again on calibreweb
If you have multiple instance of calibreweb, just change “calibreweb” by “calibreweb__2” etc in the above command lines.

Good reading!

3 Likes

Hmmmyeah there’s a general issue (I’m actually surprised so few people report issues about it) about python virtualenvs that basically needs to be re-created (or upgraded with the command you suggest ? o.O) otherwise they just get broken with mysterious error messages due to the system upgrade of python (from 3.5 to 3.7ish, something like that…)

1 Like

@Krakinou I was trying to reinstall calibreweb from the YNH made backup. And I also run into issues logging in. Do you reckon this might also solve issues with logging in to a calibreweb on a YNH server that does not have the same users as the one it was backupped from?

I don’t think this is related:
Calibreweb has its own users database that has to be synched with the yunohost database.
The LDAP can only work if the user you’re trying to log in with exists in both databases.
Once connected with at least one calibreweb admin user, you can sync the databases again from calibreweb so that the new yunohost users are created (I think you will need to delete the previous calibreweb users manually though).

1 Like