Calibreweb service stopped (and can't be started anymore)

My YunoHost server

Hardware: VPS bought online
YunoHost version: 11.0.9.15 (stable)
I have access to my server : Through SSH | through the webadmin

Description of my issue

The Calibreweb service has stopped and can’t be started anymore. Rebooting the server and installing all the latest packages did not help.

In the log this error is posted:

Oct 06 09:21:31 systemd[1]: Started calibreweb.
Oct 06 09:21:31 sh[86884]: Traceback (most recent call last):
Oct 06 09:21:31 sh[86884]:   File "/var/www/calibreweb/cps.py", line 28, in <module>
Oct 06 09:21:31 sh[86884]:     from cps.main import main
Oct 06 09:21:31 sh[86884]:   File "/var/www/calibreweb/cps/__init__.py", line 28, in <module>
Oct 06 09:21:31 sh[86884]:     from flask import Flask
Oct 06 09:21:31 sh[86884]: ModuleNotFoundError: No module named 'flask'
Oct 06 09:21:31 systemd[1]: calibreweb.service: Main process exited, code=exited, status=1/FAILURE
Oct 06 09:21:31 systemd[1]: calibreweb.service: Failed with result 'exit-code'.

seems like YNH is somehow missing flask… can I just install that? with apt install flask or so?

I googled it around, as I don’t have the answer myself:
Flask is a python module you can install 2 ways, via apt and via pip.

If I was you, I’d try to install it via apt as you suggest, the package should be python3-flask.
https://packages.debian.org/search?keywords=python3-flask

The other way is through pip, (pip install flask), but I’d leave it as a second choice, as I’m no expert in pip…

Sorry for my poor support, but it is better than nothing and you have something to try out.

Cheers,
e.

1 Like

Thnx! I installed flask with your tips.

Then I tried to restart calibre-web from the webinterface. But it doesn’t work. In the log under it it says:

[2022-09-05 13:54:44,795]  INFO {cps.server:275} webserver stop (restart=False)
[2022-09-05 13:54:44,897]  INFO {cps.server:260} Performing shutdown of Calibre-Web
[2022-09-05 13:54:44,914]  INFO {apscheduler.scheduler:202} Scheduler has been shut down

I guess it’s going out of my understanding, anyway can you post the full log?

LOGFILE: journalctl
-- Journal begins at Wed 2022-08-17 16:06:58 UTC, ends at Fri 2022-10-07 10:04:36 UTC. --
Oct 06 08:51:13 sh[381]:   File "/var/www/calibreweb/cps/__init__.py", line 28, in <module>
Oct 06 08:51:13 sh[381]:     from flask import Flask
Oct 06 08:51:13 sh[381]: ModuleNotFoundError: No module named 'flask'
Oct 06 08:51:14 systemd[1]: calibreweb.service: Main process exited, code=exited, status=1/FAILURE
Oct 06 08:51:14 systemd[1]: calibreweb.service: Failed with result 'exit-code'.
Oct 06 09:20:24 systemd[1]: Started calibreweb.
Oct 06 09:20:24 sh[86745]: Traceback (most recent call last):
Oct 06 09:20:24 sh[86745]:   File "/var/www/calibreweb/cps.py", line 28, in <module>
Oct 06 09:20:24 sh[86745]:     from cps.main import main
Oct 06 09:20:24 sh[86745]:   File "/var/www/calibreweb/cps/__init__.py", line 28, in <module>
Oct 06 09:20:24 sh[86745]:     from flask import Flask
Oct 06 09:20:24 sh[86745]: ModuleNotFoundError: No module named 'flask'
Oct 06 09:20:24 systemd[1]: calibreweb.service: Main process exited, code=exited, status=1/FAILURE
Oct 06 09:20:24 systemd[1]: calibreweb.service: Failed with result 'exit-code'.
Oct 06 09:21:31 systemd[1]: Started calibreweb.
Oct 06 09:21:31 sh[86884]: Traceback (most recent call last):
Oct 06 09:21:31 sh[86884]:   File "/var/www/calibreweb/cps.py", line 28, in <module>
Oct 06 09:21:31 sh[86884]:     from cps.main import main
Oct 06 09:21:31 sh[86884]:   File "/var/www/calibreweb/cps/__init__.py", line 28, in <module>
Oct 06 09:21:31 sh[86884]:     from flask import Flask
Oct 06 09:21:31 sh[86884]: ModuleNotFoundError: No module named 'flask'
Oct 06 09:21:31 systemd[1]: calibreweb.service: Main process exited, code=exited, status=1/FAILURE
Oct 06 09:21:31 systemd[1]: calibreweb.service: Failed with result 'exit-code'.
Oct 07 09:55:11 systemd[1]: Started calibreweb.
Oct 07 09:55:11 sh[125791]: Traceback (most recent call last):
Oct 07 09:55:11 sh[125791]:   File "/var/www/calibreweb/cps.py", line 28, in <module>
Oct 07 09:55:11 sh[125791]:     from cps.main import main
Oct 07 09:55:11 sh[125791]:   File "/var/www/calibreweb/cps/__init__.py", line 28, in <module>
Oct 07 09:55:11 sh[125791]:     from flask import Flask
Oct 07 09:55:11 sh[125791]: ModuleNotFoundError: No module named 'flask'
Oct 07 09:55:11 systemd[1]: calibreweb.service: Main process exited, code=exited, status=1/FAILURE
Oct 07 09:55:11 systemd[1]: calibreweb.service: Failed with result 'exit-code'.
Oct 07 09:57:03 systemd[1]: Started calibreweb.
Oct 07 09:57:03 sh[125872]: Traceback (most recent call last):
Oct 07 09:57:03 sh[125872]:   File "/var/www/calibreweb/cps.py", line 28, in <module>
Oct 07 09:57:03 sh[125872]:     from cps.main import main
Oct 07 09:57:03 sh[125872]:   File "/var/www/calibreweb/cps/__init__.py", line 28, in <module>
Oct 07 09:57:03 sh[125872]:     from flask import Flask
Oct 07 09:57:03 sh[125872]: ModuleNotFoundError: No module named 'flask'
Oct 07 09:57:03 systemd[1]: calibreweb.service: Main process exited, code=exited, status=1/FAILURE
Oct 07 09:57:03 systemd[1]: calibreweb.service: Failed with result 'exit-code'.
Oct 07 10:04:36 systemd[1]: Started calibreweb.
Oct 07 10:04:36 sh[126286]: Traceback (most recent call last):
Oct 07 10:04:36 sh[126286]:   File "/var/www/calibreweb/cps.py", line 28, in <module>
Oct 07 10:04:36 sh[126286]:     from cps.main import main
Oct 07 10:04:36 sh[126286]:   File "/var/www/calibreweb/cps/__init__.py", line 28, in <module>
Oct 07 10:04:36 sh[126286]:     from flask import Flask
Oct 07 10:04:36 sh[126286]: ModuleNotFoundError: No module named 'flask'
Oct 07 10:04:36 systemd[1]: calibreweb.service: Main process exited, code=exited, status=1/FAILURE
Oct 07 10:04:36 systemd[1]: calibreweb.service: Failed with result 'exit-code'.

LOGFILE: /var/log/calibreweb/calibreweb.log
[2022-08-19 09:48:06,573]  WARN {cps.web:1306} LDAP Login failed for user "USER" IP-address: xxx.xxx.xxx.xxx
[2022-08-20 04:10:00,066]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-21 04:10:00 UTC)" (scheduled at 2022-08-20 04:10:00+00:00)
[2022-08-20 04:10:00,084]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-21 04:10:00 UTC)" executed successfully
[2022-08-21 04:10:00,041]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-21 04:10:00 UTC)" (scheduled at 2022-08-21 04:10:00+00:00)
[2022-08-21 04:10:00,044]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-22 04:10:00 UTC)" executed successfully
[2022-08-22 04:10:00,013]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-22 04:10:00 UTC)" (scheduled at 2022-08-22 04:10:00+00:00)
[2022-08-22 04:10:00,015]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-23 04:10:00 UTC)" executed successfully
[2022-08-23 04:10:00,016]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-23 04:10:00 UTC)" (scheduled at 2022-08-23 04:10:00+00:00)
[2022-08-23 04:10:00,022]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-24 04:10:00 UTC)" executed successfully
[2022-08-24 04:10:00,019]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-24 04:10:00 UTC)" (scheduled at 2022-08-24 04:10:00+00:00)
[2022-08-24 04:10:00,024]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-25 04:10:00 UTC)" executed successfully
[2022-08-25 04:10:00,020]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-25 04:10:00 UTC)" (scheduled at 2022-08-25 04:10:00+00:00)
[2022-08-25 04:10:00,025]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-26 04:10:00 UTC)" executed successfully
[2022-08-26 04:10:00,021]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-26 04:10:00 UTC)" (scheduled at 2022-08-26 04:10:00+00:00)
[2022-08-26 04:10:00,028]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-27 04:10:00 UTC)" executed successfully
[2022-08-27 04:10:00,028]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-27 04:10:00 UTC)" (scheduled at 2022-08-27 04:10:00+00:00)
[2022-08-27 04:10:00,039]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-28 04:10:00 UTC)" executed successfully
[2022-08-28 04:10:00,042]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-28 04:10:00 UTC)" (scheduled at 2022-08-28 04:10:00+00:00)
[2022-08-28 04:10:00,052]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-29 04:10:00 UTC)" executed successfully
[2022-08-29 04:10:00,039]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-30 04:10:00 UTC)" (scheduled at 2022-08-29 04:10:00+00:00)
[2022-08-29 04:10:00,045]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-30 04:10:00 UTC)" executed successfully
[2022-08-30 04:10:00,019]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-31 04:10:00 UTC)" (scheduled at 2022-08-30 04:10:00+00:00)
[2022-08-30 04:10:00,025]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-08-31 04:10:00 UTC)" executed successfully
[2022-08-31 04:10:00,064]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-09-01 04:10:00 UTC)" (scheduled at 2022-08-31 04:10:00+00:00)
[2022-08-31 04:10:00,088]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-09-01 04:10:00 UTC)" executed successfully
[2022-09-01 04:10:00,098]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-09-02 04:10:00 UTC)" (scheduled at 2022-09-01 04:10:00+00:00)
[2022-09-01 04:10:00,131]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-09-02 04:10:00 UTC)" executed successfully
[2022-09-02 04:10:00,071]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-09-03 04:10:00 UTC)" (scheduled at 2022-09-02 04:10:00+00:00)
[2022-09-02 04:10:00,078]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-09-03 04:10:00 UTC)" executed successfully
[2022-09-03 04:10:00,050]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-09-04 04:10:00 UTC)" (scheduled at 2022-09-03 04:10:00+00:00)
[2022-09-03 04:10:00,061]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-09-04 04:10:00 UTC)" executed successfully
[2022-09-04 04:10:00,071]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-09-05 04:10:00 UTC)" (scheduled at 2022-09-04 04:10:00+00:00)
[2022-09-04 04:10:00,093]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-09-05 04:10:00 UTC)" executed successfully
[2022-09-05 04:10:00,035]  INFO {apscheduler.executors.default:123} Running job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-09-06 04:10:00 UTC)" (scheduled at 2022-09-05 04:10:00+00:00)
[2022-09-05 04:10:00,038]  INFO {apscheduler.executors.default:144} Job "end scheduled task (trigger: cron[hour='4', minute='10'], next run at: 2022-09-06 04:10:00 UTC)" executed successfully
[2022-09-05 13:54:44,795]  INFO {cps.server:275} webserver stop (restart=False)
[2022-09-05 13:54:44,897]  INFO {cps.server:260} Performing shutdown of Calibre-Web
[2022-09-05 13:54:44,914]  INFO {apscheduler.scheduler:202} Scheduler has been shut down

no one an idea?
Would uninstalling and re-installing be an option?

Hello,

I had a similar issue recently, solved using yunohost app upgrade calibreweb -F (will force the update of Calibreweb, even if you already have the last version of the app).

See [Calibre-web] Manage your ebooks - #108 by Kit

3 Likes

and it is alive again!
Thank you @Kit for the fast and easy solution!

(do you think a similar operation could solve this as well?)

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.