本文最后更新于 2026年5月12日。
安装好后不能访问
https://books.weiyoun.com/
502 Bad Gateway
很可能时程序没有正确运行,导致不能正确响应。
镜像使用说明
https://hub.docker.com/r/linuxserver/calibre-web
Default admin login: Username: admin Password: admin123
-
To monitor the logs of the container in realtime:
docker logs -f calibre-web
Welcome to Alibaba Cloud Elastic Compute Service !
Activate the web console with: systemctl enable --now cockpit.socket
Last login: Sat Dec 30 17:54:15 2023 from localhost
[root@iZ8vbajg9wo8iwynfb1lgeZ ~]# docker logs -f calibre-web
[mod-init] Attempting to run Docker Modification Logic
s6-rc: fatal: unable to take locks: No such file or directory
s6-linux-init-shutdownd: warning: /run/s6/basedir/scripts/rc.shutdown exited 111
[mod-init] Attempting to run Docker Modification Logic
[mod-init] Adding linuxserver/mods:universal-calibre to container
[mod-init] Downloading linuxserver/mods:universal-calibre from lscr.io
[mod-init] Installing linuxserver/mods:universal-calibre
[mod-init] linuxserver/mods:universal-calibre applied to container
[migrations] started
一般是卡在安装更新calibre上了
Setting up libgl1-mesa-glx:amd64 (23.0.4-0ubuntu1~22.04.1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
**** Installing/updating calibre ****
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
^C
不能成功运行
经过多次重启终于安装成功,可以访问了,但是可以看出,存在错误。
94 138M 94 131M 0 0 227k 0 0:10:24 0:09:50 0:00:34 9735k
100 138M 100 138M 0 0 240k 0 0:09:51 0:09:51 --:--:-- 9731k
Creating symlinks...
Symlinking /app/calibre/ebook-device to /usr/bin/ebook-device
Symlinking /app/calibre/ebook-meta to /usr/bin/ebook-meta
Symlinking /app/calibre/ebook-convert to /usr/bin/ebook-convert
Symlinking /app/calibre/ebook-polish to /usr/bin/ebook-polish
Symlinking /app/calibre/markdown-calibre to /usr/bin/markdown-calibre
Symlinking /app/calibre/web2disk to /usr/bin/web2disk
Symlinking /app/calibre/calibre-server to /usr/bin/calibre-server
Symlinking /app/calibre/lrf2lrs to /usr/bin/lrf2lrs
Symlinking /app/calibre/lrs2lrf to /usr/bin/lrs2lrf
Symlinking /app/calibre/calibre-debug to /usr/bin/calibre-debug
Symlinking /app/calibre/calibredb to /usr/bin/calibredb
Symlinking /app/calibre/calibre-parallel to /usr/bin/calibre-parallel
Symlinking /app/calibre/calibre-customize to /usr/bin/calibre-customize
Symlinking /app/calibre/fetch-ebook-metadata to /usr/bin/fetch-ebook-metadata
Symlinking /app/calibre/calibre-smtp to /usr/bin/calibre-smtp
Symlinking /app/calibre/calibre to /usr/bin/calibre
Symlinking /app/calibre/lrfviewer to /usr/bin/lrfviewer
Symlinking /app/calibre/ebook-viewer to /usr/bin/ebook-viewer
Symlinking /app/calibre/ebook-edit to /usr/bin/ebook-edit
Setting up command-line completion...
Installing zsh completion to: /usr/share/zsh/vendor-completions/_calibre
Failed to find directory to install bash completions, using default.
Installing bash completion to: /usr/share/bash-completion/completions/
Setting up desktop integration...
____________________ WARNING ____________________
Setting up desktop integration failed with error:
__________________________________________________
Traceback (most recent call last):
File "calibre/linux.py", line 858, in setup_desktop_integration
File "calibre/linux.py", line 880, in do_setup_desktop_integration
File "calibre/linux.py", line 911, in install_xdg_junk
File "calibre/linux.py", line 896, in install_icons
File "calibre/linux.py", line 890, in install_single_icon
File "subprocess.py", line 408, in check_call
File "subprocess.py", line 389, in call
File "subprocess.py", line 1026, in __init__
File "subprocess.py", line 1950, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: 'xdg-icon-resource'
Creating un-installer: /usr/bin/calibre-uninstall
There were 1 warnings
* Setting up desktop integration failed with error:
[custom-init] No custom files found, skipping...
[ls.io-init] done.
开始搭建talebook
编排如下:
version: "3.7"
networks:
1panel-network:
external: true
services:
# main service
talebook:
restart: unless-stopped
image: talebook/talebook
volumes:
- /tmp/demo:/data
ports:
- "8780:80"
# - "8443:443"
depends_on:
- douban-rs-api
networks:
- 1panel-network
# optional, for meta plugins
# please set "http://douban-rs-api" in settings
douban-rs-api:
restart: unless-stopped
image: ghcr.io/cxfksword/douban-api-rs
启动日志有很多,不知道完成没有,还不能正常访问
[I 240103 05:53:28 main:126] Init library with [/data/books/library/]
[I 240103 05:53:28 main:127] Init AuthDB with [sqlite:////data/books/calibre-webserver.db]
[I 240103 05:53:28 main:128] Init Static with [/var/www/talebook/webserver/resources]
[I 240103 05:53:28 main:129] Init HTML with [/var/www/talebook/webserver/../app/dist]
[I 240103 05:53:28 main:130] Init Nuxtjs with [/var/www/talebook/webserver/../app/.env]
[I 240103 05:53:29 models:41] Bind modles._session()
[I 240103 05:53:29 main:149] Create tables into DB
[I 240103 05:53:30 main:126] Init library with [/data/books/library/]
[I 240103 05:53:30 main:127] Init AuthDB with [sqlite:////data/books/calibre-webserver.db]
[I 240103 05:53:30 main:128] Init Static with [/var/www/talebook/webserver/resources]
[I 240103 05:53:30 main:129] Init HTML with [/var/www/talebook/webserver/../app/dist]
[I 240103 05:53:30 main:130] Init Nuxtjs with [/var/www/talebook/webserver/../app/.env]
[I 240103 05:53:30 main:133] updating configs ...
[I 240103 05:53:30 main:138] done
Restarting nginx: nginx.
2024-01-03 05:53:32,687 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2024-01-03 05:53:32,688 INFO Included extra file "/etc/supervisor/conf.d/talebook.conf" during parsing
2024-01-03 05:53:32,698 INFO RPC interface 'supervisor' initialized
2024-01-03 05:53:32,698 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2024-01-03 05:53:32,698 INFO supervisord started with pid 51
2024-01-03 05:53:33,701 INFO spawned: 'tornado' with pid 53
2024-01-03 05:53:33,705 INFO spawned: 'nodejs' with pid 54
2024-01-03 05:53:34,709 INFO success: tornado entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-01-03 05:53:34,710 INFO success: nodejs entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)