jlesage / docker-makemkv

Docker container for MakeMKV

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] AUTO_DISC_RIPPER_INTERVAL not being honored

int-rnd opened this issue · comments

Current Behavior

Have been using the container with much success. This started today - I noticed that it now takes 8-10 minutes to detect a disc. Took seconds before. Rebuilt the container, swapped drives, rebooted, adjusting AUTO_DISC_RIPPER_INTERVAL - all seems to have no affect. The funny thing is that the disc is immediately detected in the GUI but the auto ripper won't see it for up to 10 minutes. In that time I can rip most of a DVD manually in the GUI.

Also a funny thing, this happened right as a new MakeMKV license was made available. Wondering if the underlying commands that the autoripper is using have changed/broke/froze and are impacting it. It's just odd that it started minutes after UTC time went to Aug 1. Not sure if that is related.

Expected Behavior

It should detect the disc as as defined by AUTO_DISC_RIPPER_INTERVAL and be on its way.

Steps To Reproduce

Pull the image from docker.
Map the srX and sgY, settings
The container
Insert a disc
See the disc in the GUI - read a ready to go
NOTHING HAPPENS
Wait 8-10 min and then it finally sees it via the Auto Ripper

Environment

  • OS: Ubuntu
  • OS version: 2204 LTS
  • CPU: x86
  • Docker version:
  • Device model: Docker CE
  • Browser/OS: Chrome

Container creation

makemkv0:
image: jlesage/makemkv
volumes:
- "/home/docker/makemkv/config0:/config:rw"
- "/home/docker/makemkv/storage0:/storage:rw"
- "/home/docker/makemkv/output0:/output:rw"
devices:
- "/dev/sr0:/dev/sr0"
- "/dev/sg2:/dev/sg2"
environment:
- AUTO_DISC_RIPPER=1
- AUTO_DISC_RIPPER_EJECT=1
- USER_ID=1001
- GROUP_ID=1000
- DARK_MODE=1
restart: always
networks:
********

Container log

[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    ] 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    ] SUP_GROUP_IDS_INTERNAL: executing...


[cont-env    ] SUP_GROUP_IDS_INTERNAL: terminated successfully.


[cont-env    ] SUP_GROUP_IDS_INTERNAL: 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-cjk-font.sh: executing...


[cont-init   ] 10-cjk-font.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-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-install-pkgs.sh: executing...


[cont-init   ] 15-install-pkgs.sh: terminated successfully.


[cont-init   ] 54-check-optical-drive.sh: executing...


[cont-init   ] 54-check-optical-drive.sh: looking for usable optical drives...


[cont-init   ] 54-check-optical-drive.sh: found optical drive [/dev/sr1, /dev/sg3], but it is not usable because:


[cont-init   ] 54-check-optical-drive.sh:   --> the host device /dev/sr1 is not exposed to the container.


[cont-init   ] 54-check-optical-drive.sh:   --> the host device /dev/sg3 is not exposed to the container.


[cont-init   ] 54-check-optical-drive.sh: found optical drive [/dev/sr0, /dev/sg2], group 24.


[cont-init   ] 54-check-optical-drive.sh: terminated successfully.


[cont-init   ] 55-makemkv.sh: executing...


[cont-init   ] 55-makemkv.sh: registration key already up-to-date.


[cont-init   ] 55-makemkv.sh: getting supported drives...


[cont-init   ] 55-makemkv.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:           MakeMKV                                       │


    │ Application Version:   1.17.4                                        │


    │ Docker Image Version:  23.06.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 'logrotate'...


[supervisor  ] loading service 'logmonitor'...


[supervisor  ] service 'logmonitor' is disabled.


[supervisor  ] loading service 'app'...


[supervisor  ] loading service 'gui'...


[supervisor  ] loading service 'openbox'...


[supervisor  ] loading service 'xvnc'...


[supervisor  ] loading service 'nginx'...


[supervisor  ] loading service 'certsmonitor'...


[supervisor  ] service 'certsmonitor' is disabled.


[supervisor  ] loading service 'autodiscripper-1'...


[supervisor  ] service 'autodiscripper-1' is disabled.


[supervisor  ] loading service 'autodiscripper-4'...


[supervisor  ] service 'autodiscripper-4' is disabled.


[supervisor  ] loading service 'autodiscripper-12'...


[supervisor  ] service 'autodiscripper-12' is disabled.


[supervisor  ] loading service 'autodiscripper'...


[supervisor  ] loading service 'autodiscripper-3'...


[supervisor  ] service 'autodiscripper-3' is disabled.


[supervisor  ] loading service 'autodiscripper-6'...


[supervisor  ] service 'autodiscripper-6' is disabled.


[supervisor  ] loading service 'autodiscripper-2'...


[supervisor  ] service 'autodiscripper-2' is disabled.


[supervisor  ] loading service 'autodiscripper-0'...


[supervisor  ] service 'autodiscripper-0' is disabled.


[supervisor  ] loading service 'autodiscripper-11'...


[supervisor  ] service 'autodiscripper-11' is disabled.


[supervisor  ] loading service 'autodiscripper-13'...


[supervisor  ] service 'autodiscripper-13' is disabled.


[supervisor  ] loading service 'autodiscripper-8'...


[supervisor  ] service 'autodiscripper-8' is disabled.


[supervisor  ] loading service 'autodiscripper-9'...


[supervisor  ] service 'autodiscripper-9' is disabled.


[supervisor  ] loading service 'autodiscripper-5'...


[supervisor  ] service 'autodiscripper-5' is disabled.


[supervisor  ] loading service 'autodiscripper-15'...


[supervisor  ] service 'autodiscripper-15' is disabled.


[supervisor  ] loading service 'autodiscripper-7'...


[supervisor  ] service 'autodiscripper-7' is disabled.


[supervisor  ] loading service 'autodiscripper-14'...


[supervisor  ] service 'autodiscripper-14' is disabled.


[supervisor  ] loading service 'autodiscripper-10'...


[supervisor  ] service 'autodiscripper-10' is disabled.


[supervisor  ] all services loaded.


[supervisor    ] starting services...


[supervisor    ] starting service 'xvnc'...


[xvnc          ] Xvnc TigerVNC 1.13.1 - built May 16 2023 17:43:49


[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 Aug  1 05:03:34 2023


[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 'openbox'...


[supervisor    ] starting service 'nginx'...


[nginx         ] Listening for HTTP connections on port 5800.


[supervisor    ] starting service 'app'...


[supervisor    ] starting service 'autodiscripper'...


[supervisor    ] all services started.

Container inspect

No response

Anything else?

No response

So I dug into the auto ripper code and I think I found the problem.

When you run the below command as pulled from the autoripper, the output is the same regardless of the container being on the internet or not. The difference is that when the container is on the Internet, the command returns(exits). When there is no internet, the command hangs even though the output is identical. Seems there is some required connectivity and indicates the problem is not in the autoripper but rather makemkvcon. It feels like it is trying to call home and can't.

I wonder if setting app_UpdateEnable = "0" in ~/.MakeMKV/settings.conf would prevent it from attempting to call home and hanging. Not sure how I would test this as there appears to be some caching.

/tmp # env HOME=/config LD_PRELOAD=/opt/makemkv/lib/libwrapper.so /opt/makemkv/bin/makemkvcon -r --cache=1 info disc:9999 MSG:1005,0,1,"MakeMKV v1.17.4 linux(x64-release) started","%1 started","MakeMKV v1.17.4 linux(x64-release)" DRV:0,2,999,28,"BD-ROM hp BD CMB UJ160 1.00 HN32 003368","SOMETITLEHERE","/dev/sr0" DRV:1,256,999,0,"","","" DRV:2,256,999,0,"","","" DRV:3,256,999,0,"","","" DRV:4,256,999,0,"","","" DRV:5,256,999,0,"","","" DRV:6,256,999,0,"","","" DRV:7,256,999,0,"","","" DRV:8,256,999,0,"","","" DRV:9,256,999,0,"","","" DRV:10,256,999,0,"","","" DRV:11,256,999,0,"","","" DRV:12,256,999,0,"","","" DRV:13,256,999,0,"","","" DRV:14,256,999,0,"","","" DRV:15,256,999,0,"","","" MSG:5010,0,0,"Failed to open disc","Failed to open disc" TCOUNT:0

Either way, it appears that this would only impact people trying to rip without an active internet connection. Hope the helps.

Feel free to either dig into this or close. Either way, I hope this helps anyone that has similar issues where their jlesage makemkv containers are not able to get to the internet.

Also thanks for an awesome project!

Reporting back after extended testing. Here is what I can confirm and two approaches to manually fix + 1 recommendation:

True issue - the Auto Disc Ripper is dependent on makemkvcon which periodically requires network connectivity to the mothership for updates. When there is no internet and it's time to check for updates this is a blocking action and prevents makemkvcon from returning and thereby breaks anything dependent on it.

User based solutions:

  • Get your internet back online / allow the container to get to the internet.
  • Set app_UpdateEnable = "0" in settings.conf in /config and restart the container.

Recommendation:

  • Add an environmental variable that configures app_UpdateEnable when the container is stood up. This will help with headless installs and anyone that has crappy internet

Risks of implementing the recommendation:

  • While MakeMKV is able to run without internet connectivity, the updating is there for a reason. Turing it off and pulling a new container when one is released may leave things in an outdated state. Recommend that if an environmental variable is created that it be defaulted to 1/On so that the user needs to make a conscious decision understanding the risks of turning off this setting.

Lastly - I wonder if this may account for other weirdness with the autodiscripper reported here. Wondering if turning it off may make some other problems go away. A blocking process can break tons of downstream things. When mine broke, it broke in stages and progressively got worse. Once I configured that setting everything came back.