JonathanTreffler / backblaze-personal-wine-container

Run the Backblaze personal backup client in a docker container
https://hub.docker.com/r/tessypowder/backblaze-personal-wine
GNU Affero General Public License v3.0
396 stars 33 forks source link

Vanilla Installation Fails #98

Closed cliss closed 9 months ago

cliss commented 9 months ago

Hello, I'm trying again to get this container working on my Synology; I was previously having problems with Backblaze finding/loading D:.

Given the 1.6 release, I decided to do a vanilla/brand-new install. However, it's failing on startup:

[nginx       ] Listening for HTTP connections on port 5800.
[supervisor  ] starting service 'openbox'...
[supervisor  ] service 'openbox' failed to be started: not ready after 5000 msec, giving up.

Am I holding it wrong? I'm not sure how to begin to debug this.

Additionally, if I set USER_ID and GROUP_ID, it seems I don't have the problem below, but then the container fails when trying to save install_backblaze.exe. So, I feel like I'm stumped either way.

Full Log casey@DiskStation:~$ sudo docker run -p 5800:5800 --init --name backblaze -v "/volume1/docker/backblaze/:/config/" -v "/volume1/Archive/:/drive_d/" tessypowder/backblaze-personal-wine:latest Password: [init ] container is starting... [cont-env ] loading container environment variables... [cont-env ] APP_NAME: loading... [cont-env ] DISPLAY: executing... [cont-env ] DISPLAY: terminated successfully. [cont-env ] DISPLAY: loading... [cont-env ] DOCKER_IMAGE_PLATFORM: loading... [cont-env ] GTK2_RC_FILES: executing... [cont-env ] GTK2_RC_FILES: terminated successfully. [cont-env ] GTK2_RC_FILES: loading... [cont-env ] GTK_THEME: executing... [cont-env ] GTK_THEME: terminated successfully. [cont-env ] GTK_THEME: loading... [cont-env ] HOME: loading... [cont-env ] QT_STYLE_OVERRIDE: executing... [cont-env ] QT_STYLE_OVERRIDE: terminated successfully. [cont-env ] QT_STYLE_OVERRIDE: loading... [cont-env ] TAKE_CONFIG_OWNERSHIP: loading... [cont-env ] XDG_CACHE_HOME: loading... [cont-env ] XDG_CONFIG_HOME: loading... [cont-env ] XDG_DATA_HOME: loading... [cont-env ] XDG_RUNTIME_DIR: loading... [cont-env ] XDG_STATE_HOME: loading... [cont-env ] container environment variables initialized. [cont-secrets] loading container secrets... [cont-secrets] container secrets loaded. [cont-init ] executing container initialization scripts... [cont-init ] 10-certs.sh: executing... [cont-init ] 10-certs.sh: terminated successfully. [cont-init ] 10-check-app-niceness.sh: executing... [cont-init ] 10-check-app-niceness.sh: terminated successfully. [cont-init ] 10-clean-logmonitor-states.sh: executing... [cont-init ] 10-clean-logmonitor-states.sh: terminated successfully. [cont-init ] 10-clean-tmp-dir.sh: executing... [cont-init ] 10-clean-tmp-dir.sh: terminated successfully. [cont-init ] 10-fontconfig-cache-dir.sh: executing... [cont-init ] 10-fontconfig-cache-dir.sh: terminated successfully. [cont-init ] 10-init-users.sh: executing... [cont-init ] 10-init-users.sh: terminated successfully. [cont-init ] 10-nginx.sh: executing... [cont-init ] 10-nginx.sh: terminated successfully. [cont-init ] 10-openbox.sh: executing... [cont-init ] 10-openbox.sh: terminated successfully. [cont-init ] 10-pkgs-mirror.sh: executing... [cont-init ] 10-pkgs-mirror.sh: terminated successfully. [cont-init ] 10-set-tmp-dir-perms.sh: executing... [cont-init ] 10-set-tmp-dir-perms.sh: terminated successfully. [cont-init ] 10-vnc-password.sh: executing... [cont-init ] 10-vnc-password.sh: terminated successfully. [cont-init ] 10-web-data.sh: executing... [cont-init ] 10-web-data.sh: terminated successfully. [cont-init ] 10-x11-unix.sh: executing... [cont-init ] 10-x11-unix.sh: terminated successfully. [cont-init ] 10-xdg-runtime-dir.sh: executing... [cont-init ] 10-xdg-runtime-dir.sh: terminated successfully. [cont-init ] 15-cjk-font.sh: executing... [cont-init ] 15-cjk-font.sh: terminated successfully. [cont-init ] 15-install-pkgs.sh: executing... [cont-init ] 15-install-pkgs.sh: terminated successfully. [cont-init ] 85-take-config-ownership.sh: executing... [cont-init ] 85-take-config-ownership.sh: terminated successfully. [cont-init ] 89-info.sh: executing... ╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮ │ │ │ Application: Backblaze Personal Backup │ │ Application Version: n/a │ │ Docker Image Version: n/a │ │ Docker Image Platform: linux/amd64 │ │ │ ╰――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╯ [cont-init ] 89-info.sh: terminated successfully. [cont-init ] all container initialization scripts executed. [init ] giving control to process supervisor. [supervisor ] loading services... [supervisor ] loading service 'default'... [supervisor ] loading service 'app'... [supervisor ] loading service 'gui'... [supervisor ] loading service 'certsmonitor'... [supervisor ] service 'certsmonitor' is disabled. [supervisor ] loading service 'nginx'... [supervisor ] loading service 'xvnc'... [supervisor ] loading service 'openbox'... [supervisor ] loading service 'logmonitor'... [supervisor ] service 'logmonitor' is disabled. [supervisor ] loading service 'logrotate'... [supervisor ] all services loaded. [supervisor ] starting services... [supervisor ] starting service 'xvnc'... [xvnc ] Xvnc TigerVNC 1.13.1 - built Dec 21 2023 00:39:59 [xvnc ] Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst) [xvnc ] See https://www.tigervnc.org for information on TigerVNC. [xvnc ] Underlying X server release 12014000 [xvnc ] Mon Jan 22 13:31:57 2024 [xvnc ] vncext: VNC extension running! [xvnc ] vncext: Listening for VNC connections on /tmp/vnc.sock (mode 0660) [xvnc ] vncext: Listening for VNC connections on all interface(s), port 5900 [xvnc ] vncext: created VNC server for screen 0 [supervisor ] starting service 'nginx'... [nginx ] Listening for HTTP connections on port 5800. [supervisor ] starting service 'openbox'... [supervisor ] service 'openbox' failed to be started: not ready after 5000 msec, giving up. [supervisor ] stopping service 'openbox'... [supervisor ] stopping service 'nginx'... [supervisor ] service 'nginx' exited (with status 0). [supervisor ] stopping service 'xvnc'... [xvnc ] Mon Jan 22 13:32:04 2024 [xvnc ] ComparingUpdateTracker: 0 pixels in / 0 pixels out [xvnc ] ComparingUpdateTracker: (1:-nan ratio) [supervisor ] service 'xvnc' exited (with status 0). [supervisor ] sending SIGTERM to all processes... [openbox ] XIO: fatal IO error 22 (Invalid argument) on X server ":0" [openbox ] after 166 requests (166 known processed) with 7 events remaining. [supervisor ] service 'openbox' exited (with status 1). [finish ] executing container finish scripts... [finish ] all container finish scripts executed.
JonathanTreffler commented 9 months ago

I don't know what could be causing this, any idea @traktuner ?

cliss commented 9 months ago

For what it's worth, this is manifesting itself in the same way as described on #99 — a black screen on launch.

traktuner commented 9 months ago

When I set up the container initially, I had similar issues (long ago). Also using Synology with an Intel CPU and DSM 7.2 I had to give the container root privileges. Could you please set up everything again, additionally with USER_ID=0 and GROUP_ID=0 ? It's worth a try.

cliss commented 9 months ago

I’ve tried it both ways; the long log file above is with the defaults — which I thought were 0 and 0, right? When I set the IDs to ones that match what the Synology expects, it can’t save the installer.

traktuner commented 9 months ago

I’ve tried it both ways; the long log file above is with the defaults — which I thought were 0 and 0, right? When I set the IDs to ones that match what the Synology expects, it can’t save the installer.

no, 0:0 is not the default. The default is set by Synology which is - I guess - the SYSTEM user and group 1:1 When the installer can't be saved, your permissions are not correct. The container then needs read-write access to the folder where you store the bz files (likely volumeX/docker when it's default) and it needs read-write access to every shared folder which you'd like to back up (read access is sadly not sufficient because backblaze stores a .bzvol folder in the root directory of every shared folder with volume identification IDs) Root 0:0 has read-write access to everything, so it saved me a lot of time fiddling around with permissions. but this also needs a disclaimer:

[!WARNING] Do it at your own risk, the container then has read-write access to all your files and folders on the system. Make sure that you have a good backup strategy in place.

However, for me everything works fine but I had to start with the ubuntu18 image since DSM had troubles starting the container with the ubuntu20 and ubuntu22 image (I guess since DSM 7.2.x it works just fine with the newer image tags)

Please try to use the :ubuntu18 tag for testing purposes and share some details of your Synology NAS (model, RAM, CPU, DSM version, etc) - thanks!

I'll share my docker-compose file here - maybe this helps:


version: "2.2"
services:
  backblaze:
    container_name: backblaze
    init: true
    restart: on-failure
    image: tessypowder/backblaze-personal-wine:ubuntu22
    volumes:
      - "/volume1/docker/backblaze/config/:/config:rw"
      # here all backblaze files get stored (wine path, bz installer, etc)
      # the left part is the real path on your system, the left part where it gets mouted inside the docker container
      # :rw indicates that the folder gets mounted with read write permissions
      - "/volume1/folder1/:/drive_d:rw"
      - "/volume1/folder2/:/drive_e:rw"
      - "/volume2/folder3/:/drive_f:rw"
      # add more folders to back up here
    environment:
      - USER_ID=0
      - GROUP_ID=0
      - KEEP_APP_RUNNING=1
      - FORCE_LATEST_UPDATE=true
      - DISABLE_AUTOUPDATE=false
    ports:
#VNC  - 5900:5900
      - 5800:5800
    healthcheck: # optional
      test: pgrep -f 'bzserv|bztrans|bzfilelist' >/dev/null
      interval: 5s
      timeout: 10s
      retries: 100
cliss commented 9 months ago

Interesting! tl;dr, I think it's working now! :tada:

First Try — Didn't work

At first, it was the same story when run against latest. Highlights:

casey@DiskStation:~$ sudo docker run -p 5800:5800 --init --name backblaze -v "/volume1/docker/backblaze/:/config/:rw" -v "/volume1/Archive/:/drive_d/:rw" -e USER_ID=0 -e GROUP_ID=0 tessypowder/backblaze-personal-wine:latest
[supervisor  ] starting service 'openbox'...
[supervisor  ] service 'openbox' failed to be started: not ready after 5000 msec, giving up.
Full log ``` casey@DiskStation:~$ sudo docker run -p 5800:5800 --init --name backblaze -v "/volume1/docker/backblaze/:/config/:rw" -v "/volume1/Archive/:/drive_d/:rw" -e USER_ID=0 -e GROUP_ID=0 tessypowder/backblaze-personal-wine:latest Password: [init ] container is starting... [cont-env ] loading container environment variables... [cont-env ] APP_NAME: loading... [cont-env ] DISPLAY: executing... [cont-env ] DISPLAY: terminated successfully. [cont-env ] DISPLAY: loading... [cont-env ] DOCKER_IMAGE_PLATFORM: loading... [cont-env ] GTK2_RC_FILES: executing... [cont-env ] GTK2_RC_FILES: terminated successfully. [cont-env ] GTK2_RC_FILES: loading... [cont-env ] GTK_THEME: executing... [cont-env ] GTK_THEME: terminated successfully. [cont-env ] GTK_THEME: loading... [cont-env ] HOME: loading... [cont-env ] QT_STYLE_OVERRIDE: executing... [cont-env ] QT_STYLE_OVERRIDE: terminated successfully. [cont-env ] QT_STYLE_OVERRIDE: loading... [cont-env ] TAKE_CONFIG_OWNERSHIP: loading... [cont-env ] XDG_CACHE_HOME: loading... [cont-env ] XDG_CONFIG_HOME: loading... [cont-env ] XDG_DATA_HOME: loading... [cont-env ] XDG_RUNTIME_DIR: loading... [cont-env ] XDG_STATE_HOME: loading... [cont-env ] container environment variables initialized. [cont-secrets] loading container secrets... [cont-secrets] container secrets loaded. [cont-init ] executing container initialization scripts... [cont-init ] 10-certs.sh: executing... [cont-init ] 10-certs.sh: terminated successfully. [cont-init ] 10-check-app-niceness.sh: executing... [cont-init ] 10-check-app-niceness.sh: terminated successfully. [cont-init ] 10-clean-logmonitor-states.sh: executing... [cont-init ] 10-clean-logmonitor-states.sh: terminated successfully. [cont-init ] 10-clean-tmp-dir.sh: executing... [cont-init ] 10-clean-tmp-dir.sh: terminated successfully. [cont-init ] 10-fontconfig-cache-dir.sh: executing... [cont-init ] 10-fontconfig-cache-dir.sh: terminated successfully. [cont-init ] 10-init-users.sh: executing... [cont-init ] 10-init-users.sh: terminated successfully. [cont-init ] 10-nginx.sh: executing... [cont-init ] 10-nginx.sh: terminated successfully. [cont-init ] 10-openbox.sh: executing... [cont-init ] 10-openbox.sh: terminated successfully. [cont-init ] 10-pkgs-mirror.sh: executing... [cont-init ] 10-pkgs-mirror.sh: terminated successfully. [cont-init ] 10-set-tmp-dir-perms.sh: executing... [cont-init ] 10-set-tmp-dir-perms.sh: terminated successfully. [cont-init ] 10-vnc-password.sh: executing... [cont-init ] 10-vnc-password.sh: terminated successfully. [cont-init ] 10-web-data.sh: executing... [cont-init ] 10-web-data.sh: terminated successfully. [cont-init ] 10-x11-unix.sh: executing... [cont-init ] 10-x11-unix.sh: terminated successfully. [cont-init ] 10-xdg-runtime-dir.sh: executing... [cont-init ] 10-xdg-runtime-dir.sh: terminated successfully. [cont-init ] 15-cjk-font.sh: executing... [cont-init ] 15-cjk-font.sh: terminated successfully. [cont-init ] 15-install-pkgs.sh: executing... [cont-init ] 15-install-pkgs.sh: terminated successfully. [cont-init ] 85-take-config-ownership.sh: executing... [cont-init ] 85-take-config-ownership.sh: terminated successfully. [cont-init ] 89-info.sh: executing... ╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮ │ │ │ Application: Backblaze Personal Backup │ │ Application Version: n/a │ │ Docker Image Version: n/a │ │ Docker Image Platform: linux/amd64 │ │ │ ╰――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╯ [cont-init ] 89-info.sh: terminated successfully. [cont-init ] all container initialization scripts executed. [init ] giving control to process supervisor. [supervisor ] loading services... [supervisor ] loading service 'default'... [supervisor ] loading service 'app'... [supervisor ] loading service 'gui'... [supervisor ] loading service 'certsmonitor'... [supervisor ] service 'certsmonitor' is disabled. [supervisor ] loading service 'nginx'... [supervisor ] loading service 'xvnc'... [supervisor ] loading service 'openbox'... [supervisor ] loading service 'logmonitor'... [supervisor ] service 'logmonitor' is disabled. [supervisor ] loading service 'logrotate'... [supervisor ] all services loaded. [supervisor ] starting services... [supervisor ] starting service 'xvnc'... [xvnc ] Xvnc TigerVNC 1.13.1 - built Dec 21 2023 00:39:59 [xvnc ] Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst) [xvnc ] See https://www.tigervnc.org for information on TigerVNC. [xvnc ] Underlying X server release 12014000 [xvnc ] Tue Jan 23 13:35:28 2024 [xvnc ] vncext: VNC extension running! [xvnc ] vncext: Listening for VNC connections on /tmp/vnc.sock (mode 0660) [xvnc ] vncext: Listening for VNC connections on all interface(s), port 5900 [xvnc ] vncext: created VNC server for screen 0 [supervisor ] starting service 'nginx'... [nginx ] Listening for HTTP connections on port 5800. [supervisor ] starting service 'openbox'... [supervisor ] service 'openbox' failed to be started: not ready after 5000 msec, giving up. [supervisor ] stopping service 'openbox'... [supervisor ] service 'openbox' exited (with status 0). [supervisor ] stopping service 'nginx'... [supervisor ] service 'nginx' exited (with status 0). [supervisor ] stopping service 'xvnc'... [xvnc ] Tue Jan 23 13:35:35 2024 [xvnc ] ComparingUpdateTracker: 0 pixels in / 0 pixels out [xvnc ] ComparingUpdateTracker: (1:-nan ratio) [supervisor ] service 'xvnc' exited (with status 0). [finish ] executing container finish scripts... [finish ] all container finish scripts executed. casey@DiskStation:~$ ```

Second try — success!

However, when I went into Container Manager and granted Execute container using high privilege, and then re-ran the same container using the GUI, it did get past the problems downloading install_backblaze.exe and I did get to this stage:

Screenshot 2024-01-23 at 8 40 04 AM

Summary

It seems like, for Synology users anyway, the combination of GROUP_ID=0, USER_ID=0, and Execute container using high privilege was the magic potion. Perhaps this should be added to the FAQ?

cliss commented 9 months ago

(PS, thanks for your help & patience @traktuner!)

traktuner commented 9 months ago

That's interesting, thanks for sharing! I use docker-compose in combination with Portainer. I guess User+Group as root is for the shared folder permissions only, and the "Execute container using high privilege" flag is for the process permissions.

Just a final question - initially you had an empty folder in "/volume1/docker/backblaze/" with no install_backblaze.exe file, correct?

cliss commented 9 months ago

Just a final question - initially you had an empty folder in "/volume1/docker/backblaze/" with no install_backblaze.exe file, correct?

Yes, that's right.

I generally also use compose & Portainer, but I was trying to eliminate any other moving parts from this particular install process. 😇

traktuner commented 9 months ago

Thank you :) Closing this as resolved