-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calibre-Web installs but fails to work [502 Bad Gateway] on Raspberry Pi OS w/ local_vars_unittest.yml — but installing Kolibri or Admin Console adds the missing dependency — which appears as "ModuleNotFoundError: No module named 'cryptography'" #260
Comments
Another excerpt from the above iiab-diagnostics, just for the record!
|
@deldesir investigated, and FYI was unable to reproduce this during a fresh install of SMALL-sized IIAB on 64-bit Raspberry Pi OS Lite on RPi 5! |
@EMG70 did a size ZERO-sized (unittest) and '1' (SMALL-sized) IIAB install, both failed to access Calibre-Web. All built on a RPi 400. He/We are starting to ask if something is arising from an OS change (Raspberry Pi OS) affecting RPi 4 & RPi 400 especially? |
New IIAB size ZERO installed on a PI400 with 64-bit Raspberry Pi Lite.Cannot access IIAB home page nor calibre-web via 192.168.../books (all return 502 Bad Gateway). |
Please remember that IIAB home page is not supposed to work when you use ZERO-sized (local_vars_unittest.yml) which contains:
|
My apologies. |
@deldesir please focus on fixing this, as it appears to be affecting every RPi 4, every RPi 400 (and very possibly others too!) |
I tried to reproduce the bug on RPI4 (for now) without success: Test 1: Reinstalling Calibre-Web on RPI 4 using |
You don't need binaries from iiab.io during unit testing:
|
Better yet, completely comment out these 20 lines — i.e. the scraping of IIAB Docs: (e.g. in situations where FAQ.IIAB.IO and IIAB.IO are both unreachable.) PS easiest way to do that is to set... |
|
Issue reproduced on a fresh install on RPI 4: |
|
Or cryptography 43.0.0 from 2024-07-20 ? SEE: https://www.piwheels.org/project/cryptography/ Can you please manually try cryptography 42.0.8 to see if that helps? If so, reverting to 42.0.8 should be easy to hard-code later, as a temporary patch / workaround revising Calibre-web's requirements.txt file upstream... or here if necessary: |
@deldesir is this possibly the root cause?
|
@deldesir to avoid broken Calibre-Web installs like this in future, please document: (as soon as you can, here on this ticket!)
➡️ If an ugly/urgent workaround patch is necessary in the short term that's fine — but a proper analysis of what went wrong is even more important — to make very clear how we all avoid such situations in future... ! 🦅 |
I have just installed IIAB size 1 ON A PI 4 and calibre-web is reachable.I ran sudo apt update && sudo apt -y full-upgrade before installing IIAB |
Thanks @EMG70 ! @deldesir should look inside your |
apt package
@deldesir (and others?) should re-test Raspberry Pi 400: try to figure out what's happening and why. |
@deldesir please investigate @EMG70's very promising new theory — if this is confirmed, it should be easy for you to bisect & help all solve + fully explain the problem:
PS Does this mean that the subject line of this ticket is false, and the problem occurs on RPi 5 etc too? |
Interesting. I am going to test with small-size. |
A new theory is obviously needed:
RECAP: Keep focus on completely clean/fresh "as minimal as possible" IIAB + Calibre-Web installs — onto RPi 4, RPi 400 & RPi 5 (and VM's if necessary, for comparison) — until the hidden cause/effect pattern finally becomes obvious! 🙏 |
Paranoid, but... maybe try to use the exact same hardware (exact same Raspberry Pi) for subsequent/repeated tests? e.g. use the very same RPi 4 unit for every install test, or the very same RPi 400 unit (so that comparisons between many tests... can be more meaningful?) Now I realize this is absolute paranoia (!) but yeah, do eliminate as much ambiguity as possible... testing cause/effect ~ repeatability/reproducibility in the narrowest way possible... trying to be as scientific as possible... ! 🤔 |
Oops I misunderstood that @EMG70 had also enabled Admin Console in the above RPi 400 test ~1.5 hours ago. In other words, it wasn't a single unit test of Calibre-Web alone 😄 ...but coincidentally is very revealing as a result! CONCLUSION / NEW THEORY: Installing Admin Console appears to install software that (very coincidentally) allows Calibre-Web to work. @deldesir this should hopefully be very easy to solve now! Please when you can:
|
Small-size install was successful: https://paste.centos.org/view/3ad4a9fb. |
@deldesir for completeness, can you plz confirm that a UNITTEST install (i.e. Calibre-Web alone) fails on RPi 5? |
Good idea. Will let you know. |
Ansible-core installs cryptography-43.0.1. It works with python 3.12 (ubuntu 24.04) but not with python 3.11 (RPI OS which is based on debian bookworm). |
As expected, Calibre-Web fails with a 404 error on RPI 5 using UNNITTEST install. |
While interesting, isn't this off topic when IIAB installs ansible-core into its own venv?
Ok! What precise package (and what precise line) of Admin Console's install adds the dependenc(ies) that allow Calibre-Web to work? |
Why 404? (So far @EMG70 has only mentioned "502 Bad Gateway") |
In conclusion:
(Or, if there's an even lower-risk approach inside venv... that'd be even better... but perhaps that's a fantasy given recent versions of Python cryptography are all too often unavailable on Raspberry Pi OS!?) |
As @EMG70 asks: @deldesir don't you really want /etc/iiab/local_vars.yml to contain... ?
So that you end up with /etc/iiab/iiab.ini containing... ?
|
Official (upstream) Calibre-Web install instructions: |
FYI even the most minimal Ubuntu and Debian OS images include the apt package
Whereas this is apparently not true on Raspberry Pi OS... ? |
|
Thanks @EMG70 for reporting!
Excerpt from his iiab-diagnostics (https://paste.centos.org/view/e76439c0) here:
The text was updated successfully, but these errors were encountered: