jlesage / docker-mkvtoolnix

Docker container for MKVToolNix
MIT License
220 stars 19 forks source link

[Bug] Getting constant MKVToolNix - Disconnected in google chrome #73

Open rafapirotto opened 8 months ago

rafapirotto commented 8 months ago

Current Behavior

Basically the title, every now and then I get this disconnected error. I am using google chrome image

Expected Behavior

The error should not appear

Steps To Reproduce

I just have to wait and the error appears

Environment

Container creation

I run everything using docker compose

mkvtoolnix:
    << : [*common-restart-policy]
    image: jlesage/mkvtoolnix
    container_name: mkvtoolnix
    ports:
      - "${SERVER_IP}:5800:5800"
    volumes:
      - /media/my-user/Main extra storage/Plex library:/media/disk-1
      - /media/my-user/Secondary 1/Plex library:/media/disk-2
      - /media/my-user/Secondary 2/Plex library:/media/disk-3
      - /media/my-user/Secondary 3/Plex library:/media/disk-4
      - /media/my-user/More space/Plex library:/media/disk-5
      - /media/my-user/Secondary 4/Plex library:/media/disk-6
      - /media/my-user/Biggest Drive/Plex library:/media/disk-7
      - ${ROOT_DIR}/${CONFIG_DIR}/mkvtoolnix:/config
    environment:
      - SECURE_CONNECTION=1

Container log

I think this is the relevant part:

[xvnc        ] Tue Jan 16 18:24:39 2024
[xvnc        ]  VNCSConnST:  closing /tmp/vnc.sock: Clean disconnection
[xvnc        ]  EncodeManager: Framebuffer updates: 3684
[xvnc        ]  EncodeManager:   Tight:
[xvnc        ]  EncodeManager:     Solid: 112 rects, 2.60956 Mpixels
[xvnc        ]  EncodeManager:            1.75 KiB (1:5825.66 ratio)
[xvnc        ]  EncodeManager:     Bitmap RLE: 335 rects, 28.343 kpixels
[xvnc        ]  EncodeManager:                 8.42285 KiB (1:13.6107 ratio)
[xvnc        ]  EncodeManager:     Indexed RLE: 420 rects, 942.32 kpixels
[xvnc        ]  EncodeManager:                  103.739 KiB (1:35.53 ratio)
[xvnc        ]  EncodeManager:   Tight (JPEG):
[xvnc        ]  EncodeManager:     Full Colour: 3.583 krects, 4.45373 Mpixels
[xvnc        ]  EncodeManager:                  4.97961 MiB (1:3.42008 ratio)
[xvnc        ]  EncodeManager:   Total: 4.45 krects, 8.03396 Mpixels
[xvnc        ]  EncodeManager:          5.09085 MiB (1:6.03004 ratio)
[xvnc        ]  Connections: closed: /tmp/vnc.sock
[xvnc        ]  ComparingUpdateTracker: 4.36783 Gpixels in / 2.17929 Mpixels out
[xvnc        ]  ComparingUpdateTracker: (1:2004.25 ratio)

Container inspect

No response

Anything else?

I used the SECURE_CONNECTION=1 because I was having issues without it at first. Then I used this (I don't know exactly how certificates work) and the error disappeared. However, I am now seeing it again.

jlesage commented 8 months ago

Do you have the same issue in an incognito window ? With another browser ?

rafapirotto commented 8 months ago

This is with incognito: image I tried with safari and the same happens: image

jlesage commented 8 months ago

Is 192.168.13.5 the IP of the machine running the container ? Are you accessing the interface via a reverse proxy or something like that ? How much time do you have to wait for the problem to appear ?

rafapirotto commented 8 months ago

You are correct, 192.168.13.5 is the ip of the host machine. I did that to limit the access to only that ip. I am not using any reverse proxy or anything. The time is different, sometimes is almost instant, some other times it takes a bit. The multiplexing is never interrupted though, every time I refresh, everything continues as if nothing ever happened. I think it has something to do with the VNC maybe? Because the processes continue without any issues. Do you think it may have something to do with the static ip?

rafapirotto commented 8 months ago

@jlesage I just tried to run this without the static ip and I am still seeing the error

rafapirotto commented 8 months ago

This is the exact error that happens when the app crashes:

[app ] qt.svg: :/icons/mkvtoolnix-gui/oxygen/small/16x16/document-new.svg:552:178: Could not resolve property: #linearGradient5167 [app ] qt.svg: :/icons/mkvtoolnix-gui/oxygen/small/16x16/document-new.svg:552:178: Could not resolve property: #linearGradient5167 [app ] qt.svg: :/icons/mkvtoolnix-gui/oxygen/small/16x16/document-new.svg:552:178: Could not resolve property: #linearGradient5167

@jlesage

rafapirotto commented 7 months ago

Hey, sorry to bother you, but are there any updates with this issue @jlesage ?Thanks!

jlesage commented 7 months ago

You can try to activate debug logging by using the URL http://192.168.13.5:5800/?logging=debug Then open the browser's developper tool to access the JavaScript console. Maybe we will get more details when the disconnection happens.

jlesage commented 7 months ago

Also, do you have the same behaviour accessing the container from different machines ?

rafapirotto commented 7 months ago

This is what I gathered from the console:

image

I will try accessing from another machine and I will come back @jlesage

jlesage commented 7 months ago

Do you have any firewall installed ? Looks like something is closing the connection.

rafapirotto commented 7 months ago

Not that I am aware of. And if I have it, shouldn't it affect the other computer's behavior? Because I haven't notice that same points

jlesage commented 7 months ago

You mean that you don't see the problem when accessing the container from another computer ?

rafapirotto commented 7 months ago

Exactly

rafapirotto commented 7 months ago

Hey! Do you need anything else from my side @jlesage ?

jlesage commented 7 months ago

Sorry, since the problem seems to be one of your machine accessing the container (and not the container itself), I'm not sure what else I can do...

rafapirotto commented 7 months ago

Maybe the logs I sent were useful to debug the problem?

jlesage commented 7 months ago

Unfortunately, no. They show that the connection is terminated... but how and by who, I don't know.

jlesage commented 7 months ago

What OS this client machine is running ?

rafapirotto commented 7 months ago

The latest macos version!

jlesage commented 7 months ago

I also use MacOS without issue. Is the firewall (under Setting->Network) turned on ?

rafapirotto commented 7 months ago

Yes it is!

jlesage commented 7 months ago

Can you try to turn it off to see if problem persists?

rafapirotto commented 7 months ago

I can't, but I have added google chrome to this list: image Screenshot 2024-02-16 at 14 07 52

rafapirotto commented 7 months ago

This did not make a difference

jlesage commented 7 months ago

Incoming connections are not needed for the browser, so I don't expect any impact related to this.

Still, it could be other functionalities of the firewall that could impact, or another (security related?) software installed on your machine.

rafapirotto commented 7 months ago

Okay, I will try using another macos machine

rafapirotto commented 6 months ago

Just wanted to say that I tried this again on another mac computer I have (which has the firewall off) and I encountered the same problem. This might me useful @jlesage:


[xvnc        ]  VNCSConnST:  closing /tmp/vnc.sock: Clean disconnection
[xvnc        ]  EncodeManager: Framebuffer updates: 466
[xvnc        ]  EncodeManager:   Tight:
[xvnc        ]  EncodeManager:     Solid: 1.048 krects, 3.68524 Mpixels
[xvnc        ]  EncodeManager:            16.375 KiB (1:879.863 ratio)
[xvnc        ]  EncodeManager:     Bitmap RLE: 309 rects, 51.088 kpixels
[xvnc        ]  EncodeManager:                 8.89453 KiB (1:22.8437 ratio)
[xvnc        ]  EncodeManager:     Indexed RLE: 3.529 krects, 3.44261 Mpixels
[xvnc        ]  EncodeManager:                  723.592 KiB (1:18.6418 ratio)
[xvnc        ]  EncodeManager:   Tight (JPEG):
[xvnc        ]  EncodeManager:     Full Colour: 1.593 krects, 6.44605 Mpixels
[xvnc        ]  EncodeManager:                  5.23404 MiB (1:4.70153 ratio)
[xvnc        ]  EncodeManager:   Total: 6.479 krects, 13.625 Mpixels
[xvnc        ]  EncodeManager:          5.96535 MiB (1:8.72529 ratio)
[xvnc        ]  Connections: closed: /tmp/vnc.sock
[xvnc        ]  ComparingUpdateTracker: 331.654 Mpixels in / 8.97796 Mpixels out
[xvnc        ]  ComparingUpdateTracker: (1:36.9409 ratio)
[xvnc        ] Fri Feb 23 14:57:07 2024
[xvnc        ]  Connections: accepted: /tmp/vnc.sock
[xvnc        ]  SConnection: Client needs protocol version 3.8
[xvnc        ]  SConnection: Client requests security type None(1)
[xvnc        ]  VNCSConnST:  Server default pixel format depth 24 (32bpp) little-endian rgb888
[xvnc        ]  VNCSConnST:  Client pixel format depth 24 (32bpp) little-endian bgr888
[xvnc        ] Fri Feb 23 14:57:25 2024
[xvnc        ]  VNCSConnST:  closing /tmp/vnc.sock: Clean disconnection
[xvnc        ]  EncodeManager: Framebuffer updates: 62
[xvnc        ]  EncodeManager:   Tight:
[xvnc        ]  EncodeManager:     Solid: 46 rects, 1.01426 Mpixels
[xvnc        ]  EncodeManager:            736 B (1:5513.05 ratio)
[xvnc        ]  EncodeManager:     Bitmap RLE: 4 rects, 1 kpixels
[xvnc        ]  EncodeManager:                 130 B (1:31.1385 ratio)
[xvnc        ]  EncodeManager:     Indexed RLE: 97 rects, 526.817 kpixels
[xvnc        ]  EncodeManager:                  26.3711 KiB (1:78.0785 ratio)
[xvnc        ]  EncodeManager:   Tight (JPEG):
[xvnc        ]  EncodeManager:     Full Colour: 154 rects, 1.69236 Mpixels
[xvnc        ]  EncodeManager:                  983.366 KiB (1:6.72443 ratio)
[xvnc        ]  EncodeManager:   Total: 301 rects, 3.23444 Mpixels
[xvnc        ]  EncodeManager:          1010.58 KiB (1:12.5057 ratio)
[xvnc        ]  Connections: closed: /tmp/vnc.sock
[xvnc        ]  ComparingUpdateTracker: 8.29939 Mpixels in / 150.816 kpixels out
[xvnc        ]  ComparingUpdateTracker: (1:55.0299 ratio)
rafapirotto commented 6 months ago

Hey @jlesage , were my logs helpful? Thanks!

jlesage commented 6 months ago

No, same thing as before: they just show that a disconnection happened.

jgeorgeson commented 2 weeks ago

I am seeing similar issue from Chrome on Windows 11 and a Chromebook. Container is deployed in Synology using DSM 7 container manager.

  mkvtoolnix:
    image: jlesage/mkvtoolnix
    ports:
      - "5800:5800"
    volumes:
      - "/volume1/docker/mkvtoolnix:/config:rw"
      - "/volume1/torrents/conversions/output:/output:rw"
      - "/volume1/torrents/completed:/storage:ro"
      - "/volume1/EmbyMedia:/emby_media:ro"
      - "/volume1/PlexMedia:/plex_media:ro"
    environment:
      - USER_ID=1034
      - GROUP_ID=65538
      - DISPLAY_WIDTH=1280
      - DISPLAY_HEIGHT=720
      - INSTALL_PACKAGES=jq
      - SUP_GROUP_IDS=240699
      - VNC_PASSWORD=[redact]
    restart: unless-stopped

I am using a a reverse proxy configuration in the DSM (https is using a valid LetsEncrypt cert setup in DSM Security)

image

image

jlesage commented 2 weeks ago

@jgeorgeson, this is most likely caused by the reverse proxy. Do you have the same problem if you access directly the container, without the reverse proxy?

jgeorgeson commented 2 weeks ago

Actually I think it was a permissions problem. In adding the plex/emby media folder mounts, I had changed the UID/GID and just noticed this morning that the application was unable to access the /storage and /output mounts. I had reset the UID/GID to what I shared in my config and restarted the container before posting my comment and started working on something else. Going back to that tab now it was still connected where as before it would disconnect in just a couple minutes without interaction. I'll keep watching, and try connecting direct if it comes back.

rafapirotto commented 2 weeks ago

I still have issues: image

  mkvtoolnix:
    <<: [*common-restart-policy]
    image: jlesage/mkvtoolnix
    container_name: mkvtoolnix
    ports:
      - '${SERVER_IP}:5800:5800'
    volumes:
      - /media/user-name/Main extra storage/Plex library:/media/disk-1
      - /media/user-name/Secondary 1/Plex library:/media/disk-2
      - /media/user-name/Secondary 2/Plex library:/media/disk-3
      - /media/user-name/Secondary 3/Plex library:/media/disk-4
      - /media/user-name/More space/Plex library:/media/disk-5
      - /media/user-name/Secondary 4/Plex library:/media/disk-6
      - /media/user-name/Biggest Drive/Plex library:/media/disk-7
      - ${ROOT_DIR}/${CONFIG_DIR}/mkvtoolnix:/config
    environment:
      - SECURE_CONNECTION=1
      - USER_ID=${USER_ID}
      - GROUP_ID=${GROUP_ID}

Logs:

[init        ] container is starting...
[cont-env    ] loading container environment variables...
[cont-env    ] APP_NAME: loading...
[cont-env    ] APP_VERSION: loading...
[cont-env    ] DISPLAY: executing...
[cont-env    ] DISPLAY: terminated successfully.
[cont-env    ] DISPLAY: loading...
[cont-env    ] DOCKER_IMAGE_PLATFORM: loading...
[cont-env    ] DOCKER_IMAGE_VERSION: loading...
[cont-env    ] EGL_LOG_LEVEL: executing...
[cont-env    ] EGL_LOG_LEVEL: terminated successfully.
[cont-env    ] EGL_LOG_LEVEL: loading...
[cont-env    ] GSK_RENDERER: executing...
[cont-env    ] GSK_RENDERER: terminated successfully.
[cont-env    ] GSK_RENDERER: loading...
[cont-env    ] GTK2_RC_FILES: executing...
[cont-env    ] GTK2_RC_FILES: terminated successfully.
[cont-env    ] GTK2_RC_FILES: not setting variable.
[cont-env    ] GTK_THEME: executing...
[cont-env    ] GTK_THEME: terminated successfully.
[cont-env    ] GTK_THEME: not setting variable.
[cont-env    ] HOME: loading...
[cont-env    ] LIBGL_DRIVERS_PATH: executing...
[cont-env    ] LIBGL_DRIVERS_PATH: terminated successfully.
[cont-env    ] LIBGL_DRIVERS_PATH: loading...
[cont-env    ] PULSE_CONFIG_PATH: executing...
[cont-env    ] PULSE_CONFIG_PATH: terminated successfully.
[cont-env    ] PULSE_CONFIG_PATH: not setting variable.
[cont-env    ] PULSE_COOKIE: executing...
[cont-env    ] PULSE_COOKIE: terminated successfully.
[cont-env    ] PULSE_COOKIE: not setting variable.
[cont-env    ] PULSE_SERVER: executing...
[cont-env    ] PULSE_SERVER: terminated successfully.
[cont-env    ] PULSE_SERVER: not setting variable.
[cont-env    ] QT_LOGGING_RULES: loading...
[cont-env    ] QT_STYLE_OVERRIDE: executing...
[cont-env    ] QT_STYLE_OVERRIDE: terminated successfully.
[cont-env    ] QT_STYLE_OVERRIDE: not setting variable.
[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-pulse.sh: executing...
[cont-init   ] 10-pulse.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-webauth.sh: executing...
[cont-init   ] 10-webauth.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   ] 55-mkvtoolnix.sh: executing...
[cont-init   ] 55-mkvtoolnix.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:           MKVToolNix                                    │
    │ Application Version:   85.0                                          │
    │ Docker Image Version:  24.07.1                                       │
    │ 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 'xcompmgr'...
[supervisor  ] loading service 'openbox'...
[supervisor  ] loading service 'xvnc'...
[supervisor  ] loading service 'audiorecorder'...
[supervisor  ] service 'audiorecorder' is disabled.
[supervisor  ] loading service 'pulseaudio'...
[supervisor  ] service 'pulseaudio' is disabled.
[supervisor  ] loading service 'certsmonitor'...
[supervisor  ] loading service 'nginx'...
[supervisor  ] loading service 'webauth'...
[supervisor  ] service 'webauth' is disabled.
[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 Jun 29 2024 04:32:51
[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        ] Thu Aug 29 17:26:13 2024
[xvnc        ]  vncext:      VNC extension running!
[xvnc        ]  vncext:      Listening for VNC connections on /tmp/vnc.sock (mode 0660)
[xvnc        ]  vncext:      created VNC server for screen 0
[supervisor  ] starting service 'openbox'...
[supervisor  ] starting service 'xcompmgr'...
[supervisor  ] starting service 'nginx'...
[nginx       ] Listening for HTTPs connections on port 5800.
[supervisor  ] starting service 'app'...
[app         ] mkvtoolnix-gui v85.0 ('Shame For You') 64-bit
[supervisor  ] all services started.
[app         ] startNextAutoJob numRunning 0 toStart QList()
[app         ] cleanupAtEndOfQueue
[app         ] qt.qpa.gl: Xcb EGL gl-integration initialize failed
[app         ] saveTextToFile "/tmp/MKVToolNix-GUI-MuxConfig-wjdubY"
[xvnc        ] Thu Aug 29 17:26:42 2024
[xvnc        ]  Connections: accepted: /tmp/vnc.sock
[xvnc        ]  SConnection: Client needs protocol version 3.8
[xvnc        ]  SConnection: Client requests security type None(1)
[xvnc        ]  VNCSConnST:  Server default pixel format depth 24 (32bpp) little-endian rgb888
[xvnc        ]  VNCSConnST:  Client pixel format depth 24 (32bpp) little-endian bgr888