jlesage / docker-makemkv

Docker container for MakeMKV
MIT License
435 stars 50 forks source link

[Bug] Autodiscripper not starting / detecting a disk being inserted #221

Open gwenbrunn opened 1 week ago

gwenbrunn commented 1 week ago

Current Behavior

Running into an issue where the docker will start and MakeMKV will both open and detect the disk and move to a ready state but the autodiskripper script doesn't appear to notice the status change and start the process of ripping. I had it working previously however after a reinstall of the docker container in unRaid it's refusing to work. I've reinstalled, enabled the feature, and even provided privileged mode just in case to no avail. I'm able to start the disk ripping manually so I know MakeMKV is working correctly. Any ideas?

Expected Behavior

I expect that the script would detect a disk has been inserted and begin the ripping process automatically.

Steps To Reproduce

For me just download the docker container via the app store in UnRaid.

Environment

Container creation

image

Container log

╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮
    │                                                                      │
    │ Application:           MakeMKV                                       │
    │ Application Version:   1.17.7                                        │
    │ 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 'audiorecorder'...
[supervisor  ] service 'audiorecorder' is disabled.
[supervisor  ] loading service 'certsmonitor'...
[supervisor  ] service 'certsmonitor' is disabled.
[supervisor  ] loading service 'nginx'...
[supervisor  ] loading service 'webauth'...
[supervisor  ] service 'webauth' is disabled.
[supervisor  ] loading service 'xvnc'...
[supervisor  ] loading service 'openbox'...
[supervisor  ] loading service 'pulseaudio'...
[supervisor  ] service 'pulseaudio' is disabled.
[supervisor  ] loading service 'xcompmgr'...
[supervisor  ] loading service 'logmonitor'...
[supervisor  ] service 'logmonitor' is disabled.
[supervisor  ] loading service 'logrotate'...
[supervisor  ] loading service 'autodiscripper-0'...
[supervisor  ] service 'autodiscripper-0' is disabled.
[supervisor  ] loading service 'autodiscripper-1'...
[supervisor  ] service 'autodiscripper-1' is disabled.
[supervisor  ] loading service 'autodiscripper-10'...
[supervisor  ] service 'autodiscripper-10' is disabled.
[supervisor  ] loading service 'autodiscripper-11'...
[supervisor  ] service 'autodiscripper-11' is disabled.
[supervisor  ] loading service 'autodiscripper-12'...
[supervisor  ] service 'autodiscripper-12' is disabled.
[supervisor  ] loading service 'autodiscripper-13'...
[supervisor  ] service 'autodiscripper-13' is disabled.
[supervisor  ] loading service 'autodiscripper-14'...
[supervisor  ] service 'autodiscripper-14' is disabled.
[supervisor  ] loading service 'autodiscripper-15'...
[supervisor  ] service 'autodiscripper-15' is disabled.
[supervisor  ] loading service 'autodiscripper-2'...
[supervisor  ] service 'autodiscripper-2' is disabled.
[supervisor  ] loading service 'autodiscripper-3'...
[supervisor  ] service 'autodiscripper-3' is disabled.
[supervisor  ] loading service 'autodiscripper-4'...
[supervisor  ] service 'autodiscripper-4' is disabled.
[supervisor  ] loading service 'autodiscripper-5'...
[supervisor  ] service 'autodiscripper-5' is disabled.
[supervisor  ] loading service 'autodiscripper-6'...
[supervisor  ] service 'autodiscripper-6' is disabled.
[supervisor  ] loading service 'autodiscripper-7'...
[supervisor  ] service 'autodiscripper-7' 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'...
[supervisor  ] service 'autodiscripper' is disabled.
[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        ] Wed Sep 25 14:33:42 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  ] starting service 'xcompmgr'...
[supervisor  ] starting service 'app'...
[supervisor  ] all services started.
[xvnc        ] Wed Sep 25 14:33:47 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        ]  ComparingUpdateTracker: 0 pixels in / 0 pixels out
[xvnc        ]  ComparingUpdateTracker: (1:-nan ratio)

Container inspect

[
    {
        "Id": "6fdbf32a27ad7c355adb81b1d06aba57be60bcbb82998e72f9b5e5ba28092061",
        "Created": "2024-09-25T21:33:41.224520653Z",
        "Path": "/init",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 31284,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2024-09-25T21:33:41.518449677Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:375ed3468b85d6957b58df6e6e2c6ef3efa373791a926a106638d697c3de9ae5",
        "ResolvConfPath": "/var/lib/docker/containers/6fdbf32a27ad7c355adb81b1d06aba57be60bcbb82998e72f9b5e5ba28092061/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/6fdbf32a27ad7c355adb81b1d06aba57be60bcbb82998e72f9b5e5ba28092061/hostname",
        "HostsPath": "/var/lib/docker/containers/6fdbf32a27ad7c355adb81b1d06aba57be60bcbb82998e72f9b5e5ba28092061/hosts",
        "LogPath": "/var/lib/docker/containers/6fdbf32a27ad7c355adb81b1d06aba57be60bcbb82998e72f9b5e5ba28092061/6fdbf32a27ad7c355adb81b1d06aba57be60bcbb82998e72f9b5e5ba28092061-json.log",
        "Name": "/MakeMKV",
        "RestartCount": 0,
        "Driver": "btrfs",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/mnt/user:/storage:ro",
                "/mnt/user/Media/MakeMKV-Output/:/output:rw",
                "/mnt/user/appdata/MakeMKV:/config:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "bridge",
            "PortBindings": {
                "5800/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "7806"
                    }
                ],
                "5900/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "7906"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "ConsoleSize": [
                0,
                0
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "private",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": true,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": [
                "label=disable"
            ],
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": [],
            "BlkioDeviceWriteBps": [],
            "BlkioDeviceReadIOps": [],
            "BlkioDeviceWriteIOps": [],
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [
                {
                    "PathOnHost": "/dev/sr0",
                    "PathInContainer": "/dev/sr0",
                    "CgroupPermissions": "rwm"
                },
                {
                    "PathOnHost": "/dev/sg0",
                    "PathInContainer": "/dev/sg0",
                    "CgroupPermissions": "rwm"
                },
                {
                    "PathOnHost": "/dev/sr1",
                    "PathInContainer": "/dev/sr1",
                    "CgroupPermissions": "rwm"
                },
                {
                    "PathOnHost": "/dev/sg4",
                    "PathInContainer": "/dev/sg4",
                    "CgroupPermissions": "rwm"
                },
                {
                    "PathOnHost": "/dev/sr2",
                    "PathInContainer": "/dev/sr2",
                    "CgroupPermissions": "rwm"
                },
                {
                    "PathOnHost": "/dev/sg5",
                    "PathInContainer": "/dev/sg5",
                    "CgroupPermissions": "rwm"
                }
            ],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": null,
            "PidsLimit": 2048,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": null,
            "ReadonlyPaths": null
        },
        "GraphDriver": {
            "Data": null,
            "Name": "btrfs"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/mnt/user",
                "Destination": "/storage",
                "Mode": "ro",
                "RW": false,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/mnt/user/Media/MakeMKV-Output",
                "Destination": "/output",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/mnt/user/appdata/MakeMKV",
                "Destination": "/config",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "6fdbf32a27ad",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "5800/tcp": {},
                "5900/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "AUTO_DISC_RIPPER_BD_MODE=mkv",
                "USER_ID=99",
                "SECURE_CONNECTION_VNC_METHOD=SSL",
                "AUTO_DISC_RIPPER_MIN_TITLE_LENGTH=",
                "MAKEMKV_KEY=T-WaI15n3jLrzWU88y7liOljd7UIR0mormcZo2oO5xt_9CSj3Mg6mOxR1eUvU_CA569e",
                "AUTO_DISC_RIPPER_EJECT=1",
                "GROUP_ID=100",
                "MAKEMKV_GUI=1",
                "AUTO_DISC_RIPPER_INTERVAL=5",
                "HOST_CONTAINERNAME=MakeMKV",
                "DARK_MODE=0",
                "WEB_AUDIO=0",
                "AUTO_DISC_RIPPER_FORCE_UNIQUE_OUTPUT_DIR=0",
                "SECURE_CONNECTION_CERTS_CHECK_INTERVAL=60",
                "APP_NICENESS=0",
                "WEB_AUTHENTICATION_PASSWORD=",
                "TZ=America/Los_Angeles",
                "DISPLAY_HEIGHT=1080",
                "SECURE_CONNECTION=0",
                "AUTO_DISC_RIPPER_MAKEMKV_PROFILE=",
                "AUTO_DISC_RIPPER_NO_GUI_PROGRESS=0",
                "AUTO_DISC_RIPPER=1",
                "AUTO_DISC_RIPPER_PARALLEL_RIP=1",
                "UMASK=0000",
                "WEB_AUTHENTICATION_USERNAME=",
                "WEB_LISTENING_PORT=5800",
                "VNC_LISTENING_PORT=5900",
                "HOST_OS=Unraid",
                "DISPLAY_WIDTH=1920",
                "WEB_AUTHENTICATION=0",
                "HOST_HOSTNAME=Plex",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/base/sbin:/opt/base/bin",
                "ENV=/root/.docker_rc",
                "SUP_GROUP_IDS=",
                "LANG=en_US.UTF-8",
                "KEEP_APP_RUNNING=0",
                "INSTALL_PACKAGES=",
                "PACKAGES_MIRROR=",
                "CONTAINER_DEBUG=0",
                "VNC_PASSWORD=",
                "ENABLE_CJK_FONT=0",
                "WEB_AUTHENTICATION_DEFAULT_USERNAME=",
                "WEB_AUTHENTICATION_DEFAULT_PASSWORD="
            ],
            "Cmd": [
                "/init"
            ],
            "Image": "jlesage/makemkv",
            "Volumes": {
                "/config": {},
                "/output": {},
                "/storage": {}
            },
            "WorkingDir": "/tmp",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "net.unraid.docker.icon": "https://raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/makemkv-icon.png",
                "net.unraid.docker.managed": "dockerman",
                "net.unraid.docker.webui": "http://[IP]:[PORT:5800]",
                "org.label-schema.description": "Docker container for MakeMKV",
                "org.label-schema.name": "makemkv",
                "org.label-schema.schema-version": "1.0",
                "org.label-schema.vcs-url": "https://github.com/jlesage/docker-makemkv",
                "org.label-schema.version": "24.07.1"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "4a88c9433c03a244f3d6316ec33b9146890aa65c1fcd96137f91605ee8d5dbc4",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "5800/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "7806"
                    },
                    {
                        "HostIp": "::",
                        "HostPort": "7806"
                    }
                ],
                "5900/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "7906"
                    },
                    {
                        "HostIp": "::",
                        "HostPort": "7906"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/4a88c9433c03",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "eaead17f2800e3625372e40def48f04ef66a0bc20b737da4366daf817ac332ee",
            "Gateway": "172.17.0.1",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.2",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:02",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "175cccb0754b3b2cb53f966fb97ecb58e62f76c50a6f06a498a55ab52c8185e4",
                    "EndpointID": "eaead17f2800e3625372e40def48f04ef66a0bc20b737da4366daf817ac332ee",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:02",
                    "DriverOpts": null
                }
            }
        }
    }
]

Anything else?

No response

gwenbrunn commented 1 week ago

While looking into the logs I realized I was viewing a truncated version of the log. It looks like makemkv.sh is trying to detect the drives and is running into an issue.

[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/sr0, /dev/sg0], group 19. [cont-init ] 54-check-optical-drive.sh: found optical drive [/dev/sr1, /dev/sg4], group 19. [cont-init ] 54-check-optical-drive.sh: found optical drive [/dev/sr2, /dev/sg5], group 19. [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: Segmentation fault [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...