linuxserver / docker-calibre

GNU General Public License v3.0
338 stars 62 forks source link

[BUG] Blank black page instead of Calibre #153

Closed 8549 closed 1 month ago

8549 commented 1 month ago

Is there an existing issue for this?

Current Behavior

This is the first time I use this image. Container starts up fine, but navigating to the KasmVNC page i am greeted with a blank, black page: immagine

Right clicking brings up a small context menu: immagine

The terminal works fine. Calibre does not open, even if explicitly clicked.

Expected Behavior

Calibre should work as expected. Is there a known incompatibility between this image and with Windows 10 + WSL2 + Podman Desktop that I couldn't find?

Steps To Reproduce

  1. Launch podman compose -f compose.yaml up -d

Environment

- OS: Windows 10 Build 19045 with WSL2
- How docker service was installed: Podman Desktop 1.10.2 (backed by podman 5.0.3), podman compose extension v2.27.1

CPU architecture

x86-64

Docker creation

---
services:
  calibre:
    image: lscr.io/linuxserver/calibre:latest
    container_name: calibre
    security_opt:
      - seccomp:unconfined #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Rome
      - PASSWORD= #optional
      - CLI_ARGS= #optional
    volumes:
      - "C:/Users/REDACTED/Documents/calibre/data:/config"
    ports:
      - 8085:8080
      - 8181:8181
      - 8081:8081
    restart: unless-stopped

Container logs

calibre-1  | [migrations] started
calibre-1  | [migrations] no migrations found
calibre-1  | v───────────────────────────────────────
calibre-1  | 
calibre-1  | L      ██╗     ███████╗██╗ ██████╗
calibre-1  | Q      ██║     ██╔════╝██║██╔═══██╗
calibre-1  | K      ██║     ███████╗██║██║   ██║
calibre-1  | K      ██║     ╚════██║██║██║   ██║
calibre-1  | [      ███████╗███████║██║╚██████╔╝
calibre-1  | V      ╚══════╝╚══════╝╚═╝ ╚═════╝
calibre-1  | 
calibre-1  |    Brought to you by linuxserver.io
calibre-1  | v───────────────────────────────────────
calibre-1  | 
calibre-1  | To support LSIO projects visit:
calibre-1  | https://www.linuxserver.io/donate/
calibre-1  | 
calibre-1  | v───────────────────────────────────────
calibre-1  | GID/UID
calibre-1  | v───────────────────────────────────────
calibre-1  | 
calibre-1  | User UID:    1000
calibre-1  | User GID:    1000
calibre-1  | v───────────────────────────────────────
calibre-1  | 
calibre-1  | [custom-init] No custom files found, skipping...
calibre-1  | [ls.io-init] done.
calibre-1  | _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
calibre-1  | 
calibre-1  | Xvnc KasmVNC 1.2.0 - built May 23 2024 00:22:09
calibre-1  | Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
calibre-1  | See http://kasmweb.com for information on KasmVNC.
calibre-1  | Underlying X server release 12014000, The X.Org Foundation
calibre-1  | 
calibre-1  | Obt-Message: Xinerama extension is not present on the server
calibre-1  | Error: Connection refused
calibre-1  |     at PulseAudioContext.<anonymous> (/kclient/node_modules/pulseaudio2/lib/pulse.js:120:36)
calibre-1  |     at /kclient/node_modules/pulseaudio2/lib/pulse.js:133:21
calibre-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
calibre-1  | Kclient was unable to init audio, it is possible your host lacks support!!!!
calibre-1  | Error: Access denied
calibre-1  |     at /kclient/node_modules/pulseaudio2/lib/pulse.js:133:21
calibre-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
calibre-1  | Kclient was unable to init audio, it is possible your host lacks support!!!!
calibre-1  | Traceback (most recent call last):
calibre-1  |   File "runpy.py", line 198, in _run_module_as_main
calibre-1  |   File "runpy.py", line 88, in _run_code
calibre-1  |   File "site.py", line 47, in <module>
calibre-1  |   File "site.py", line 41, in main
calibre-1  |   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
calibre-1  |   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
calibre-1  |   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
calibre-1  |   File "bypy-importer.py", line 279, in exec_module
calibre-1  |   File "calibre/__init__.py", line 39, in <module>
calibre-1  |   File "calibre/startup.py", line 135, in initialize_calibre
calibre-1  |   File "calibre/utils/localization.py", line 315, in set_translators
calibre-1  |   File "calibre/utils/localization.py", line 105, in get_lang
calibre-1  |   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
calibre-1  |   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
calibre-1  |   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
calibre-1  |   File "bypy-importer.py", line 279, in exec_module
calibre-1  |   File "calibre/utils/config_base.py", line 604, in <module>
calibre-1  |   File "calibre/utils/config_base.py", line 500, in __setitem__
calibre-1  |   File "calibre/utils/config_base.py", line 514, in set
calibre-1  |   File "calibre/utils/config_base.py", line 449, in set
calibre-1  |   File "calibre/utils/config_base.py", line 388, in commit_data
calibre-1  | PermissionError: [Errno 1] Operation not permitted
calibre-1  | Connection failure: Connection refused
calibre-1  | pa_context_connect() failed: Connection refused

When i explicitly try to launch Calibre from the little context menu, this is logged:

calibre-1  | Traceback (most recent call last):
calibre-1  |   File "runpy.py", line 198, in _run_module_as_main
calibre-1  |   File "runpy.py", line 88, in _run_code
calibre-1  |   File "site.py", line 47, in <module>
calibre-1  |   File "site.py", line 41, in main
calibre-1  |   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
calibre-1  |   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
calibre-1  |   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
calibre-1  |   File "bypy-importer.py", line 279, in exec_module
calibre-1  |   File "calibre/__init__.py", line 39, in <module>
calibre-1  |   File "calibre/startup.py", line 135, in initialize_calibre
calibre-1  |   File "calibre/utils/localization.py", line 315, in set_translators
calibre-1  |   File "calibre/utils/localization.py", line 105, in get_lang
calibre-1  |   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
calibre-1  |   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
calibre-1  |   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
calibre-1  |   File "bypy-importer.py", line 279, in exec_module
calibre-1  |   File "calibre/utils/config_base.py", line 604, in <module>
calibre-1  |   File "calibre/utils/config_base.py", line 500, in __setitem__
calibre-1  |   File "calibre/utils/config_base.py", line 514, in set
calibre-1  |   File "calibre/utils/config_base.py", line 449, in set
calibre-1  |   File "calibre/utils/config_base.py", line 388, in commit_data
calibre-1  | PermissionError: [Errno 1] Operation not permitted
github-actions[bot] commented 1 month ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

aptalca commented 1 month ago

Don't use windows paths for config. Create the container in a wsl2 Linux app and use native Linux paths like /home/user/calibre:/config

8549 commented 1 month ago

Podman is not available from within WSL2 "Linux app".

aptalca commented 1 month ago

Then you can either install it or use docker compose

8549 commented 1 month ago

What is the underlying difference between docker compose and podman compose which should make it work on docker but not on podman?

Roxedus commented 1 month ago

Podman and Docker are different enough on even pure Linux to be able to answer that in one sentence. It deviates even more with WSL.

Rootless podman comes to mind. But it it could also be the lack of shm (our webtop readme has instructions on how to set that)

aptalca commented 1 month ago

What is the underlying difference between docker compose and podman compose which should make it work on docker but not on podman?

I didn't say don't use podman. I said don't use windows paths. That is the first thing you need to try. If it's still not working, then you can try using compose instead of podman.

8549 commented 1 month ago

Fixed by changing the compose.yaml content:

---
services:
  calibre:
    image: lscr.io/linuxserver/calibre:latest
    container_name: calibre
    security_opt:
      - seccomp:unconfined #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Rome
      - PASSWORD= #optional
      - CLI_ARGS= #optional
    volumes:
      - calibre_home:/config
    ports:
      - 8085:8080
      - 8181:8181
      - 8081:8081
    restart: unless-stopped

volumes:
  calibre_home:

I can live with using the upload feature of KasmVNC instead of having a natively mounted volume. Hope this helps someone