Skip to content
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

Docker - No more webui #8458

Open
Mario-o-o-o opened this issue Feb 24, 2025 · 4 comments
Open

Docker - No more webui #8458

Mario-o-o-o opened this issue Feb 24, 2025 · 4 comments

Comments

@Mario-o-o-o
Copy link

Hi
Tribler container is up and running but Apache proxy response is 503 with failed to make connection to backend.

Docker compose
image: ghcr.io/tribler/tribler:latest

Image modification
2025-02-18

Error log

WARNING:TriblerTunnelCommunity:Could not retrieve backup exitnode cache, file does not exist!
WARNING:TorrentChecker:No tracker to select from to check torrent health, skip
ERROR:tribler.core.session:Uncaught exception: Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/cx_Freeze/initscripts/__startup__.py", line 140, in run
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/cx_Freeze/initscripts/console.py", line 25, in run
  File "src/tribler/run.py", line 254, in <module>
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/asyncio/runners.py", line 44, in run
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
  File "src/tribler/run.py", line 242, in main
  File "src/tribler/run.py", line 192, in spawn_tray_icon
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pystray/__init__.py", line 64, in <module>
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pystray/__init__.py", line 56, in backend
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pystray/__init__.py", line 36, in xorg
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pystray/_xorg.py", line 36, in <module>
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/Xlib/display.py", line 89, in __init__
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/Xlib/display.py", line 71, in __init__
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/Xlib/protocol/display.py", line 84, in __init__
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/Xlib/support/connect.py", line 73, in get_display
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/Xlib/support/unix_connect.py", line 59, in get_display
Xlib.error.DisplayNameError: Bad display name ""
NoneType: None
FATAL: exception not rethrown

If you need anything else, please let me know.

Thank you for your help

@qstokkink
Copy link
Contributor

Could you specify how you run the image?

For reference, it should be like this: https://tribler.readthedocs.io/en/latest/basics/docker.html#running

@Mario-o-o-o
Copy link
Author

Mario-o-o-o commented Feb 27, 2025

Thanx @qstokkink :-)

I've been using the following docker compose since version 8 (and everything worked perfectly):

services:
  tribler:
    image: ghcr.io/tribler/tribler:latest
    container_name: tribler
    hostname: tribler
    user: $UID:$GID
    volumes:
      - $MYPATH/.tribler:/home/user/.Tribler:rw
      - $MYPATH/download:/home/user/Downloads/:rw
    ports:
      - "127.0.0.1:8085:8085" # http
      - "6881-6889:6881-6889" # bittorrent
      - "8090-8091:8090-8091" # ipv8
    environment:
      CORE_API_PORT: 8085
      CORE_API_KEY: $MYSECRET
    restart: unless-stopped
    networks:
      - tribler
networks:
  tribler:
    external: true

From memory I had to adapt volume mount-paths between the official documentation and what I found in the container.

The current documentation has obviously been modified and seems to me to be incomplete:

docker run -e CORE_API_PORT=8085 -e CORE_API_KEY="changeme" \
           -v ~/.Tribler:/state -v ~/downloads/TriblerDownloads:/downloads \
           -v $XDG_CACHE_HOME/tmp/:$XDG_CACHE_HOME/tmp/ -v /run:/run \
           --security-opt "apparmor:unconfined" \
           --net="host" \
           -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR -e DISPLAY=$DISPLAY \
           -e XDG_CACHE_HOME=$XDG_CACHE_HOME -e XAUTHORITY=$XAUTHORITY \
           -e DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS" \
           --user $(id -u):$(id -g) -e BROWSER="x-www-browser" \
           -it ghcr.io/tribler/tribler:latest

Is it just me, or will this setting not work?

I'll use on my side ...

    volumes:
      - $MYPATH/.tribler:/state:rw
      - $MYPATH/download:/downloads:rw
      #- $MYPATH/tmp:/home/user/tmp:rw
      - /run:/run:rw
    environment:
      CORE_API_PORT: 8085
      CORE_API_KEY: $MYSECRET
      BROWSER: x-www-browser

But I have no idea what the following variables are for or how to configure them:

  • XDG_RUNTIME_DIR
  • DISPLAY
  • XDG_CACHE_HOME
  • XAUTHORITY
  • DBUS_SESSION_BUS_ADDRESS

As my Tribler container is currently restarting non-stop, I can't connect to it and check the various paths.

I admit I'm a bit lost here.

Thank you in advance for your help.

@Mario-o-o-o
Copy link
Author

Debian 12.9

For the system user associated with the docker container, each of the theoretical environment variables is empty ...

MYUSER@MYSRV:~$ echo "${DISPLAY}"

MYUSER@MYSRV:~$ echo "${XDG_RUNTIME_DIR}"

MYUSER@MYSRV:~$ echo "${XDG_CACHE_HOME}"

MYUSER@MYSRV:~$ echo "${XAUTHORITY}"

MYUSER@MYSRV:~$ echo "${DBUS_SESSION_BUS_ADDRESS}"

@qstokkink
Copy link
Contributor

Oh, right, I forgot Debian >=10 removed Xorg in favor of Wayland. I always test on Ubuntu, which gives me x11/Xorg out-of-the-box.

The quick workaround is to install the Xorg backend, see https://wiki.debian.org/Xorg, which should be a matter of:

sudo apt install xorg

(on the off-chance you're running on Windows, the WSL should also provide x11 support)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants