docker-handbrake icon indicating copy to clipboard operation
docker-handbrake copied to clipboard

Service starts, then stops

Open floydboy58 opened this issue 5 years ago • 41 comments

I just installed this on a Synology Diskstation. I set everything up using the advice on this video: https://www.youtube.com/watch?v=E6HgHsxdWIo

Then when I start the service it shuts everything down shortly after. I attached the log.

Thanks,

handbrake_log.log

floydboy58 avatar Nov 07 '19 00:11 floydboy58

Can you provide the output of docker inspect <container name>?

jlesage avatar Nov 07 '19 01:11 jlesage

Getting an error when trying that:

admin@MediaStation:~$ docker inspect handbrake [] Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/handbrake/json: dial unix /var/run/docker.sock: connect: permission denied admin@MediaStation:~$

floydboy58 avatar Nov 07 '19 01:11 floydboy58

Try to run as root: sudo docker inspect <container name>.

jlesage avatar Nov 07 '19 01:11 jlesage

Ok, that worked:

[ { "Id": "3d8982f6c02e4def09e22e047cdc9bffe60e72b28b0c02bf825a7129473edab8", "Created": "2019-11-07T01:26:39.540726572Z", "Path": "/init", "Args": [], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 24556, "ExitCode": 0, "Error": "", "StartedAt": "2019-11-07T01:33:37.258061306Z", "FinishedAt": "2019-11-07T01:30:15.798073516Z", "StartedTs": 1573090417, "FinishedTs": 1573090215 }, "Image": "sha256:d0f6f2c0659f7f4fe8e9baa3c830b3efeda337941eec20bcf26a362cb2592bb4", "ResolvConfPath": "/volume1/@docker/containers/3d8982f6c02e4def09e22e047cdc9bffe60e72b28b0c02bf825a7129473edab8/resolv.conf", "HostnamePath": "/volume1/@docker/containers/3d8982f6c02e4def09e22e047cdc9bffe60e72b28b0c02bf825a7129473edab8/hostname", "HostsPath": "/volume1/@docker/containers/3d8982f6c02e4def09e22e047cdc9bffe60e72b28b0c02bf825a7129473edab8/hosts", "LogPath": "/volume1/@docker/containers/3d8982f6c02e4def09e22e047cdc9bffe60e72b28b0c02bf825a7129473edab8/log.db", "Name": "/handbrake", "RestartCount": 0, "Driver": "aufs", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "docker-default", "ExecIDs": null, "HostConfig": { "Binds": [ "/volume1/movies/MP4:/dsm:rw" ], "ContainerIDFile": "", "LogConfig": { "Type": "db", "Config": {} }, "NetworkMode": "bridge", "PortBindings": { "5800/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "5800" } ], "5900/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "" } ] }, "RestartPolicy": { "Name": "no", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "CapAdd": null, "CapDrop": null, "Dns": null, "DnsOptions": null, "DnsSearch": null, "ExtraHosts": null, "GroupAdd": null, "IpcMode": "shareable", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "LANG=en_US.UTF-8", "S6_BEHAVIOUR_IF_STAGE2_FAILS=3", "S6_SERVICE_DEPS=1", "USER_ID=1024", "GROUP_ID=100", "APP_NAME=HandBrake", "APP_USER=app", "XDG_DATA_HOME=/config/xdg/data", "XDG_CONFIG_HOME=/config/xdg/config", "XDG_CACHE_HOME=/config/xdg/cache", "XDG_RUNTIME_DIR=/tmp/run/user/app", "DISPLAY=:0", "DISPLAY_WIDTH=1280", "DISPLAY_HEIGHT=768", "AUTOMATED_CONVERSION_PRESET=Very Fast 1080p30", "AUTOMATED_CONVERSION_FORMAT=mp4" ], "ConsoleSize": [ 0, 0 ], "Isolation": "", "CpuShares": 50, "Memory": 2248146944, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": null, "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": null, "DeviceCgroupRules": null, "DiskQuota": 0, "KernelMemory": 0, "MemoryReservation": 0, "MemorySwap": 4496293888, "MemorySwappiness": null, "OomKillDisable": false, "PidsLimit": 0, "Ulimits": null, "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0, "MaskedPaths": [ "/proc/asound", "/proc/acpi", "/proc/kcore", "/proc/keys", "/proc/latency_stats", "/proc/timer_list", "/proc/timer_stats", "/proc/sched_debug", "/proc/scsi", "/sys/firmware" ], "ReadonlyPaths": [ "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ] }, "GraphDriver": { "Data": null, "Name": "aufs" }, "Mounts": [ { "Type": "volume", "Name": "7924d6634719d849855cde265e980f0e80d1f59e32c04e2d33996d1fa5cd2239", "Source": "/volume1/@docker/volumes/7924d6634719d849855cde265e980f0e80d1f59e32c04e2d33996d1fa5cd2239/_data", "Destination": "/config", "Driver": "local", "Mode": "", "RW": true, "Propagation": "" }, { "Type": "volume", "Name": "6a11be832433441a8f474738e983861a3be0345c0628ca817f3f3764123ebc58", "Source": "/volume1/@docker/volumes/6a11be832433441a8f474738e983861a3be0345c0628ca817f3f3764123ebc58/_data", "Destination": "/output", "Driver": "local", "Mode": "", "RW": true, "Propagation": "" }, { "Type": "volume", "Name": "766a3e946e5d26b9ca01436abe11d2f595e75814d00189b4146c5fbbed5c712e", "Source": "/volume1/@docker/volumes/766a3e946e5d26b9ca01436abe11d2f595e75814d00189b4146c5fbbed5c712e/_data", "Destination": "/storage", "Driver": "local", "Mode": "", "RW": true, "Propagation": "" }, { "Type": "volume", "Name": "2367646c179fe72869314950753885ed9973592a2f5189190b74d32b00fcad12", "Source": "/volume1/@docker/volumes/2367646c179fe72869314950753885ed9973592a2f5189190b74d32b00fcad12/_data", "Destination": "/watch", "Driver": "local", "Mode": "", "RW": true, "Propagation": "" }, { "Type": "bind", "Source": "/volume1/movies/MP4", "Destination": "/dsm", "Mode": "rw", "RW": true, "Propagation": "rprivate" } ], "Config": { "Hostname": "handbrake", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "5800/tcp": {}, "5900/tcp": {} }, "Tty": true, "OpenStdin": true, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "LANG=en_US.UTF-8", "S6_BEHAVIOUR_IF_STAGE2_FAILS=3", "S6_SERVICE_DEPS=1", "USER_ID=1024", "GROUP_ID=100", "APP_NAME=HandBrake", "APP_USER=app", "XDG_DATA_HOME=/config/xdg/data", "XDG_CONFIG_HOME=/config/xdg/config", "XDG_CACHE_HOME=/config/xdg/cache", "XDG_RUNTIME_DIR=/tmp/run/user/app", "DISPLAY=:0", "DISPLAY_WIDTH=1280", "DISPLAY_HEIGHT=768", "AUTOMATED_CONVERSION_PRESET=Very Fast 1080p30", "AUTOMATED_CONVERSION_FORMAT=mp4" ], "Cmd": [ "/init" ], "ArgsEscaped": true, "Image": "jlesage/handbrake:latest", "Volumes": { "/config": {}, "/output": {}, "/storage": {}, "/watch": {} }, "WorkingDir": "/tmp", "Entrypoint": null, "OnBuild": null, "Labels": { "org.label-schema.description": "Docker container for HandBrake", "org.label-schema.name": "handbrake", "org.label-schema.schema-version": "1.0", "org.label-schema.vcs-url": "https://github.com/jlesage/docker-handbrake", "org.label-schema.version": "1.17.1" }, "DDSM": false }, "NetworkSettings": { "Bridge": "", "SandboxID": "55570b4590cba6ab65dd9cc658d8c5dfc5d4e863fd3d84e8b43cad0b452555e1", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": { "5800/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "5800" } ], "5900/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "32786" } ] }, "SandboxKey": "/var/run/docker/netns/55570b4590cb", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "6aac81318080e202e3ab7b19620fc22d3f7f1d5db884a28be7f551990c2287d2", "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": "8155039d2a532db37e36c0ff597fb43222beee73140b233b9978f7534a7b5198", "EndpointID": "6aac81318080e202e3ab7b19620fc22d3f7f1d5db884a28be7f551990c2287d2", "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 } } } } ]

floydboy58 avatar Nov 07 '19 01:11 floydboy58

Just re-installed and noticed the service keeps running now. However when I open the container in a browser I just get a black box...

floydboy58 avatar Nov 07 '19 01:11 floydboy58

Are you seeing the header with the 3 buttons?

jlesage avatar Nov 07 '19 01:11 jlesage

I think so: Capture

floydboy58 avatar Nov 07 '19 01:11 floydboy58

Did you defined memory limitation? If yes, try to remove it.

jlesage avatar Nov 07 '19 01:11 jlesage

I did have a limit of 2000 but I took that out and now when I tried to restart the container it is back to crashing again :(

floydboy58 avatar Nov 07 '19 01:11 floydboy58

You should have a setting somewhere that cause the issue...

Can you try to run the following command and see if the container is crashing?

sudo docker exec --rm jlesage/makemkv

Press ctrl+c to stop it.

jlesage avatar Nov 08 '19 13:11 jlesage

Got unknown flag: --rm: Capture

floydboy58 avatar Nov 09 '19 18:11 floydboy58

Sorry, I provided the wrong command. The correct one is:

sudo docker run --rm jlesage/makemkv

jlesage avatar Nov 10 '19 19:11 jlesage

Ok, so that seemed to download and install a new container - laughing_cohen/jlesage/makemkv

I tried starting the handbrake container after that installed and it still started up and then auto stopped about 20 seconds later

floydboy58 avatar Nov 10 '19 19:11 floydboy58

But does the container created by the command automatically stopped?

jlesage avatar Nov 13 '19 01:11 jlesage

No it was running.  I checked on it later after I closed the console window and the entire container was gone.

Not sure if it matters but the container was for MakeMKV and the container I want to use is for Handbrake.

floydboy58 avatar Nov 13 '19 01:11 floydboy58

Oh sorry, then it should be sudo docker run --rm jlesage/handbrake.

Running this command creates and run the container without parameters. If it doesn't stop itself, then this confirms that the container created via Synology UI uses a parameter that makes the container to crash.

I would try to re-create the container (via Synology UI) without any parameter and then add a new parameter one by one. Make sure to verify, between each step, that the container runs fine.

jlesage avatar Nov 13 '19 02:11 jlesage

Looks like it is crashing even when I execute that command:

Unable to find image 'jlesage/handbrake:latest' locally latest: Pulling from jlesage/handbrake 9d48c3bd43c5: Pull complete eeb7ea1757bf: Pull complete 7a1ec17dd1f6: Pull complete 645603d01a7a: Pull complete 5997f0534db5: Pull complete cff767dd420e: Pull complete 5d70b7907e00: Pull complete c00523a9bb16: Pull complete 7fc49f8e32d1: Pull complete 75a0b2f3a03d: Pull complete e003c50766c5: Pull complete 389f553a09cc: Pull complete c21eafd3244d: Pull complete c3ba57a53bfc: Pull complete fb1eacf8cfe9: Pull complete 5f2ae8b4acc1: Pull complete 2c47e7fb61d3: Pull complete 58cb683b51c8: Pull complete ccd6aa05e7d4: Pull complete 5e00d4027c17: Pull complete Digest: sha256:9b9325f1b7695ea4b4d598867de5c23eda228d6e1abf1c1a0eb985279e9d8a0b Status: Downloaded newer image for jlesage/handbrake:latest [s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-app-niceness.sh: executing... [cont-init.d] 00-app-niceness.sh: exited 0. [cont-init.d] 00-app-script.sh: executing... [cont-init.d] 00-app-script.sh: exited 0. [cont-init.d] 00-app-user-map.sh: executing... [cont-init.d] 00-app-user-map.sh: exited 0. [cont-init.d] 00-clean-logmonitor-states.sh: executing... [cont-init.d] 00-clean-logmonitor-states.sh: exited 0. [cont-init.d] 00-clean-tmp-dir.sh: executing... [cont-init.d] 00-clean-tmp-dir.sh: exited 0. [cont-init.d] 00-set-app-deps.sh: executing... [cont-init.d] 00-set-app-deps.sh: exited 0. [cont-init.d] 00-set-home.sh: executing... [cont-init.d] 00-set-home.sh: exited 0. [cont-init.d] 00-take-config-ownership.sh: executing... [cont-init.d] 00-take-config-ownership.sh: exited 0. [cont-init.d] 00-xdg-runtime-dir.sh: executing... [cont-init.d] 00-xdg-runtime-dir.sh: exited 0. [cont-init.d] 10-certs.sh: executing... [cont-init.d] 10-certs.sh: exited 0. [cont-init.d] 10-cjk-font.sh: executing... [cont-init.d] 10-cjk-font.sh: exited 0. [cont-init.d] 10-nginx.sh: executing... [cont-init.d] 10-nginx.sh: exited 0. [cont-init.d] 10-vnc-password.sh: executing... [cont-init.d] 10-vnc-password.sh: exited 0. [cont-init.d] 10-web-index.sh: executing... [cont-init.d] 10-web-index.sh: exited 0. [cont-init.d] 95-check-optical-drive.sh: executing... [cont-init.d] 95-check-optical-drive.sh: looking for usable optical drives... [cont-init.d] 95-check-optical-drive.sh: no usable optical drive found. [cont-init.d] 95-check-optical-drive.sh: exited 0. [cont-init.d] 95-check-qsv.sh: executing... [cont-init.d] 95-check-qsv.sh: Processor: Intel(R) Atom(TM) CPU D2700 @ 2.13GHz [cont-init.d] 95-check-qsv.sh: Intel Quick Sync Video not supported: device directory /dev/dri not exposed to the container. [cont-init.d] 95-check-qsv.sh: exited 0. [cont-init.d] handbrake.sh: executing... [cont-init.d] handbrake.sh: generating machine-id... [cont-init.d] handbrake.sh: core dump file location: |/usr/syno/sbin/syno-dump-core.sh /volume1 %e [cont-init.d] handbrake.sh: core dump file size: unlimited (blocks) [cont-init.d] handbrake.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] starting s6-fdholderd... [services.d] starting xvfb... [xvfb] starting... The XKEYBOARD keymap compiler (xkbcomp) reports:

Warning: Unsupported high keycode 372 for name <I372> ignored X11 cannot support keycodes above 255. This warning only shows for the first high keycode. Internal error: Could not resolve keysym XF86MonBrightnessCycle Internal error: Could not resolve keysym XF86RotationLockToggle Errors from xkbcomp are not fatal to the X server The XKEYBOARD keymap compiler (xkbcomp) reports: Warning: Unsupported high keycode 372 for name <I372> ignored X11 cannot support keycodes above 255. This warning only shows for the first high keycode. Internal error: Could not resolve keysym XF86MonBrightnessCycle Internal error: Could not resolve keysym XF86RotationLockToggle Errors from xkbcomp are not fatal to the X server [services.d] starting openbox... [openbox] starting... [services.d] starting nginx... [services.d] starting autovideoconverter... [nginx] starting... [services.d] starting statusmonitor... [services.d] starting x11vnc... [services.d] starting certsmonitor... [statusmonitor] no file to monitor: disabling service... [x11vnc] starting... [services.d] starting logmonitor... [logmonitor] no file to monitor: disabling service... [certsmonitor] disabling service: secure connection not enabled. [services.d] starting app... [autovideoconverter] starting... [app] starting HandBrake... [services.d] done. [autovideoconverter] Processing watch folder '/watch'... [autovideoconverter] Watch folder '/watch' processing terminated. 14/11/2019 20:01:13 passing arg to libvncserver: -rfbport 14/11/2019 20:01:13 passing arg to libvncserver: 5900 14/11/2019 20:01:13 passing arg to libvncserver: -rfbportv6 14/11/2019 20:01:13 passing arg to libvncserver: -1 14/11/2019 20:01:13 passing arg to libvncserver: -httpportv6 14/11/2019 20:01:13 passing arg to libvncserver: -1 14/11/2019 20:01:13 passing arg to libvncserver: -desktop 14/11/2019 20:01:13 passing arg to libvncserver: HandBrake 14/11/2019 20:01:13 x11vnc version: 0.9.14 lastmod: 2015-11-14 pid: 854 14/11/2019 20:01:13 Using X display :0 14/11/2019 20:01:13 rootwin: 0x43 reswin: 0x400001 dpy: 0x517fac0 14/11/2019 20:01:13 14/11/2019 20:01:13 ------------------ USEFUL INFORMATION ------------------ 14/11/2019 20:01:13 X DAMAGE available on display, using it for polling hints. 14/11/2019 20:01:13 To disable this behavior use: '-noxdamage' 14/11/2019 20:01:13 14/11/2019 20:01:13 Most compositing window managers like 'compiz' or 'beryl' 14/11/2019 20:01:13 cause X DAMAGE to fail, and so you may not see any screen 14/11/2019 20:01:13 updates via VNC. Either disable 'compiz' (recommended) or 14/11/2019 20:01:13 supply the x11vnc '-noxdamage' command line option. 14/11/2019 20:01:13 X COMPOSITE available on display, using it for window polling. 14/11/2019 20:01:13 To disable this behavior use: '-noxcomposite' 14/11/2019 20:01:13 14/11/2019 20:01:13 Wireframing: -wireframe mode is in effect for window moves. 14/11/2019 20:01:13 If this yields undesired behavior (poor response, painting 14/11/2019 20:01:13 errors, etc) it may be disabled: 14/11/2019 20:01:13 - use '-nowf' to disable wireframing completely. 14/11/2019 20:01:13 - use '-nowcr' to disable the Copy Rectangle after the 14/11/2019 20:01:13 moved window is released in the new position. 14/11/2019 20:01:13 Also see the -help entry for tuning parameters. 14/11/2019 20:01:13 You can press 3 Alt_L's (Left "Alt" key) in a row to 14/11/2019 20:01:13 repaint the screen, also see the -fixscreen option for 14/11/2019 20:01:13 periodic repaints. 14/11/2019 20:01:13 GrabServer control via XTEST. 14/11/2019 20:01:13 14/11/2019 20:01:13 Scroll Detection: -scrollcopyrect mode is in effect to 14/11/2019 20:01:13 use RECORD extension to try to detect scrolling windows 14/11/2019 20:01:13 (induced by either user keystroke or mouse input). 14/11/2019 20:01:13 If this yields undesired behavior (poor response, painting 14/11/2019 20:01:13 errors, etc) it may be disabled via: '-noscr' 14/11/2019 20:01:13 Also see the -help entry for tuning parameters. 14/11/2019 20:01:13 You can press 3 Alt_L's (Left "Alt" key) in a row to 14/11/2019 20:01:13 repaint the screen, also see the -fixscreen option for 14/11/2019 20:01:13 periodic repaints. 14/11/2019 20:01:13 14/11/2019 20:01:13 XKEYBOARD: number of keysyms per keycode 7 is greater 14/11/2019 20:01:13 than 4 and 51 keysyms are mapped above 4. 14/11/2019 20:01:13 Automatically switching to -xkb mode. 14/11/2019 20:01:13 If this makes the key mapping worse you can 14/11/2019 20:01:13 disable it with the "-noxkb" option. 14/11/2019 20:01:13 Also, remember "-remap DEAD" for accenting characters. 14/11/2019 20:01:13 14/11/2019 20:01:13 X FBPM extension not supported. Xlib: extension "DPMS" missing on display ":0". 14/11/2019 20:01:13 X display is not capable of DPMS. 14/11/2019 20:01:13 -------------------------------------------------------- 14/11/2019 20:01:13 14/11/2019 20:01:13 Default visual ID: 0x21 14/11/2019 20:01:13 Read initial data from X display into framebuffer. 14/11/2019 20:01:13 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120 14/11/2019 20:01:13 14/11/2019 20:01:13 X display :0 is 32bpp depth=24 true color 14/11/2019 20:01:13 14/11/2019 20:01:13 Listening for VNC connections on TCP port 5900 14/11/2019 20:01:13 14/11/2019 20:01:13 Xinerama is present and active (e.g. multi-head). 14/11/2019 20:01:13 Xinerama: number of sub-screens: 1 14/11/2019 20:01:13 Xinerama: no blackouts needed (only one sub-screen) 14/11/2019 20:01:13 14/11/2019 20:01:13 fb read rate: 275 MB/sec 14/11/2019 20:01:13 fast read: reset -wait ms to: 10 14/11/2019 20:01:13 fast read: reset -defer ms to: 10 14/11/2019 20:01:13 The X server says there are 10 mouse buttons. 14/11/2019 20:01:13 screen setup finished. 14/11/2019 20:01:13

The VNC desktop is: 3499ec877dac:0 PORT=5900


Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster retrieval. It should work with any VNC viewer. Try it by running:

x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion. More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

GLib-GIO-Message: 20:01:16.608: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. [services.d] stopping services [services.d] stopping app... [services.d] stopping logmonitor... [services.d] stopping certsmonitor... [services.d] stopping x11vnc... caught signal: 15 14/11/2019 20:01:22 deleted 40 tile_row polling images. [services.d] stopping statusmonitor... [services.d] stopping autovideoconverter... [services.d] stopping nginx... [services.d] stopping openbox... [services.d] stopping xvfb... The XKEYBOARD keymap compiler (xkbcomp) reports:

Warning: Unsupported high keycode 372 for name <I372> ignored X11 cannot support keycodes above 255. This warning only shows for the first high keycode. Internal error: Could not resolve keysym XF86MonBrightnessCycle Internal error: Could not resolve keysym XF86RotationLockToggle Errors from xkbcomp are not fatal to the X server [services.d] stopping s6-fdholderd... [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] syncing disks. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting.

floydboy58 avatar Nov 14 '19 20:11 floydboy58

Not sure what's wrong... Is your Synology up-to-date, especially the Docker package? How much memory your Synology has? Which Docker version it runs (docker version)?

jlesage avatar Nov 20 '19 02:11 jlesage

My Synology 1812+ is up to date with version DSM 6.2.2-24922 Update 4.

My Docker version is 18.09.0-0506.

The NAS has 3GB of RAM and around 2GB of that is typically free.

floydboy58 avatar Nov 20 '19 16:11 floydboy58

Try to set the HANDBRAKE_DEBUG environment variable to 1 when creating the container. This should log more detail in /config/log/hb/handbrake.debug.log (container folder).

jlesage avatar Nov 26 '19 02:11 jlesage

I did this and then connected to my server via SSH and it appears I don't have a "log" directory inside of the "config" directory. Inside config I have the directories of "pool", "rodsys", "target", "volume" and "vsys" only.

floydboy58 avatar Nov 26 '19 05:11 floydboy58

The /config directory is the one inside the container. If you didn't mapped it to the host, you can login into the container to look at the files: docker exec -ti <container name> sh.

jlesage avatar Nov 27 '19 23:11 jlesage

It seems I cannot do that because the container won't stay alive. I just get this message when trying to run that command:

"Error response from daemon: Container 57c1efbb0e291d0ba484b42dc0184c3491c94eb34b100c80cd8da06fd7040b63 is not running"

floydboy58 avatar Nov 30 '19 00:11 floydboy58

Ok then if you map the /config folder to the host (via the -v argument) you will be able to access the files from the host.

jlesage avatar Nov 30 '19 01:11 jlesage

Sorry I don't really know how to do that. Could you give an example of how I would map that with the -v argument?

floydboy58 avatar Nov 30 '19 01:11 floydboy58

Here you go:

sudo docker run --rm -e HANDBRAKE_DEBUG=1 -v /tmp/handbrake:/config jlesage/handbrake

You would then be able to access the log files under /tmp/handbrake on the host.

jlesage avatar Dec 02 '19 01:12 jlesage

This is what I got when running it:

admin@MediaStation:~$ sudo docker run --rm -e HANDBRAKE_DEBUG=1 -v /tmp/handbrake:config jlesage/handbrake Password: docker: Error response from daemon: invalid volume specification: '/tmp/handbrake:config': invalid mount config for type "bind": invalid mount path: 'config' mount path must be absolute.

floydboy58 avatar Dec 02 '19 15:12 floydboy58

I think you did a typo: you forget the slash before config for the -v parameter.

jlesage avatar Dec 05 '19 00:12 jlesage

Argh, can't believe I missed that. Ok, I ran the correct command and got this:

admin@MediaStation:~$ sudo docker run --rm -e HANDBRAKE_DEBUG=1 -v /tmp/handbrake:/config jlesage/handbrake docker: Error response from daemon: Bind mount failed: '/tmp/handbrake' does not exists.

I tried creating a tmp/handbrake folder structure inside my docker folder on the Synology and that didn't help.

floydboy58 avatar Dec 05 '19 01:12 floydboy58

Did you try to create the folder from the command line?

mkdir /tmp/handbrake

jlesage avatar Dec 05 '19 23:12 jlesage

I also have a synology and have been having the same issues. running the last command still causes the same issue for me. sudo docker run --rm -e HANDBRAKE_DEBUG=1 -v /tmp/handbrake:/config jlesage/handbrake

I also followed these same steps in this video but dont get the results. https://www.youtube.com/watch?v=E6HgHsxdWIo

if it helps, When I start with a fresh clean config folder docker does startup and I can bring up handbrake in the browser, however I get no UI outside of the header and I see the black screen like mentioned earlier. All other attempts always end up in an immediate docker shutdown.

The makeMKV works fine without problems

elimuir avatar Dec 06 '19 06:12 elimuir

I had a similar issue. If I did a "docker run" from a terminal, I had no problem, but trying to run this through the Synology docker manager did not work; it just shuts down after about 15 seconds.

I have my volume mapping set up as:

handbrake

I have the USER_ID/GROUP_ID set to 1024/100 ("admin"), and that user has read/write access to the "handbrake" shared volume, which has the "config" etc folders in it, with correct ownership/permissions:

$ ls -l
total 0
drwxrwxrwx+ 1 admin users  0 Dec 21 10:31 config
drwxrwxrwx+ 1 root  root  52 Dec 21 10:07 @eaDir
drwxrwxrwx+ 1 admin users  0 Dec 21 09:30 output
drwxrwxrwx+ 1 root  root  34 Dec 21 10:09 #recycle
drwxrwxrwx+ 1 admin users  0 Dec 21 09:30 storage
drwxrwxrwx+ 1 admin users  0 Dec 21 09:30 watch

From the logs I could see this problem:

mkdir: cannot create directory ‘/config’: Permission denied

I had to go to the Syno control panel and grant the "users" group read/write access to the "handbrake" shared volume.

Untitled

and then it starts up and looks like it will work.

gramster avatar Dec 21 '19 18:12 gramster

@elimuir , did you try to access the container from another browser?

@gramster, thanks for sharing your solution.

jlesage avatar Dec 23 '19 03:12 jlesage

Hi all, @jlesage,

I've tried everything here but I'm unable to run handbrake even from command line. It starts and a couple of seconds later it just dies. The folders seems correctly configured, I've tried both with the admin and my own users, and enabled debug logs. Unfortunately the log just adds this single line every time so I'm stuck:

~/Temp/logs$ tail -f log/hb/handbrake.debug.log (null): create_builder_or_die() (null): create_builder_or_die() (null): create_builder_or_die() (null): create_builder_or_die()

These are the container logs jlesage-handbrake.zip

Any recommendations? I have a DS1812+ running DSM 6.2.2-24922 Update 4. Docker version is 18.09.8 for the client and 18.09.6 for the server. Also makemkv container run without issues.

milikitorr avatar Jan 12 '20 16:01 milikitorr

Do you have the same issue when running the container without any config:

docker run --rm jlesage/handbrake

jlesage avatar Jan 13 '20 01:01 jlesage

Yes, even so. It fails without any parameters as well.

milikitorr avatar Jan 13 '20 07:01 milikitorr

This is what I get: :~$ sudo docker run --rm jlesage/handbrake Password: [s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-app-niceness.sh: executing... [cont-init.d] 00-app-niceness.sh: exited 0. [cont-init.d] 00-app-script.sh: executing... [cont-init.d] 00-app-script.sh: exited 0. [cont-init.d] 00-app-user-map.sh: executing... [cont-init.d] 00-app-user-map.sh: exited 0. [cont-init.d] 00-clean-logmonitor-states.sh: executing... [cont-init.d] 00-clean-logmonitor-states.sh: exited 0. [cont-init.d] 00-clean-tmp-dir.sh: executing... [cont-init.d] 00-clean-tmp-dir.sh: exited 0. [cont-init.d] 00-set-app-deps.sh: executing... [cont-init.d] 00-set-app-deps.sh: exited 0. [cont-init.d] 00-set-home.sh: executing... [cont-init.d] 00-set-home.sh: exited 0. [cont-init.d] 00-take-config-ownership.sh: executing... [cont-init.d] 00-take-config-ownership.sh: exited 0. [cont-init.d] 00-xdg-runtime-dir.sh: executing... [cont-init.d] 00-xdg-runtime-dir.sh: exited 0. [cont-init.d] 10-certs.sh: executing... [cont-init.d] 10-certs.sh: exited 0. [cont-init.d] 10-cjk-font.sh: executing... [cont-init.d] 10-cjk-font.sh: exited 0. [cont-init.d] 10-nginx.sh: executing... [cont-init.d] 10-nginx.sh: exited 0. [cont-init.d] 10-vnc-password.sh: executing... [cont-init.d] 10-vnc-password.sh: exited 0. [cont-init.d] 10-web-index.sh: executing... [cont-init.d] 10-web-index.sh: exited 0. [cont-init.d] 95-check-optical-drive.sh: executing... [cont-init.d] 95-check-optical-drive.sh: looking for usable optical drives... [cont-init.d] 95-check-optical-drive.sh: no usable optical drive found. [cont-init.d] 95-check-optical-drive.sh: exited 0. [cont-init.d] 95-check-qsv.sh: executing... [cont-init.d] 95-check-qsv.sh: Processor: Intel(R) Atom(TM) CPU D2701 @ 2.13GHz [cont-init.d] 95-check-qsv.sh: Intel Quick Sync Video not supported: device directory /dev/dri not exposed to the container. [cont-init.d] 95-check-qsv.sh: exited 0. [cont-init.d] handbrake.sh: executing... [cont-init.d] handbrake.sh: generating machine-id... [cont-init.d] handbrake.sh: core dump file location: |/usr/syno/sbin/syno-dump-core.sh /volume1 %e [cont-init.d] handbrake.sh: core dump file size: unlimited (blocks) [cont-init.d] handbrake.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] starting s6-fdholderd... [services.d] starting xvfb... [xvfb] starting... The XKEYBOARD keymap compiler (xkbcomp) reports:

Warning: Unsupported high keycode 372 for name <I372> ignored X11 cannot support keycodes above 255. This warning only shows for the first high keycode. Internal error: Could not resolve keysym XF86MonBrightnessCycle Internal error: Could not resolve keysym XF86RotationLockToggle Errors from xkbcomp are not fatal to the X server The XKEYBOARD keymap compiler (xkbcomp) reports: Warning: Unsupported high keycode 372 for name <I372> ignored X11 cannot support keycodes above 255. This warning only shows for the first high keycode. [services.d] starting autovideoconverter... [services.d] starting x11vnc... [services.d] starting nginx... [x11vnc] starting... [services.d] starting logmonitor... [nginx] starting... [services.d] starting certsmonitor... [certsmonitor] disabling service: secure connection not enabled. Internal error: Could not resolve keysym XF86MonBrightnessCycle Internal error: Could not resolve keysym XF86RotationLockToggle Errors from xkbcomp are not fatal to the X server [logmonitor] no file to monitor: disabling service... [services.d] starting statusmonitor... [services.d] starting openbox... 13/01/2020 09:08:45 passing arg to libvncserver: -rfbport 13/01/2020 09:08:45 passing arg to libvncserver: 5900 13/01/2020 09:08:45 passing arg to libvncserver: -rfbportv6 13/01/2020 09:08:45 passing arg to libvncserver: -1 13/01/2020 09:08:45 passing arg to libvncserver: -httpportv6 13/01/2020 09:08:45 passing arg to libvncserver: -1 13/01/2020 09:08:45 passing arg to libvncserver: -desktop 13/01/2020 09:08:45 passing arg to libvncserver: HandBrake 13/01/2020 09:08:45 x11vnc version: 0.9.14 lastmod: 2015-11-14 pid: 807 13/01/2020 09:08:45 Using X display :0 13/01/2020 09:08:45 rootwin: 0x43 reswin: 0x200001 dpy: 0x65929ac0 13/01/2020 09:08:45 13/01/2020 09:08:45 ------------------ USEFUL INFORMATION ------------------ [statusmonitor] no file to monitor: disabling service... [openbox] starting... [autovideoconverter] starting... 13/01/2020 09:08:45 X DAMAGE available on display, using it for polling hints. 13/01/2020 09:08:45 To disable this behavior use: '-noxdamage' 13/01/2020 09:08:45 13/01/2020 09:08:45 Most compositing window managers like 'compiz' or 'beryl' 13/01/2020 09:08:45 cause X DAMAGE to fail, and so you may not see any screen 13/01/2020 09:08:45 updates via VNC. Either disable 'compiz' (recommended) or 13/01/2020 09:08:45 supply the x11vnc '-noxdamage' command line option. 13/01/2020 09:08:45 X COMPOSITE available on display, using it for window polling. 13/01/2020 09:08:45 To disable this behavior use: '-noxcomposite' 13/01/2020 09:08:45 13/01/2020 09:08:45 Wireframing: -wireframe mode is in effect for window moves. 13/01/2020 09:08:45 If this yields undesired behavior (poor response, painting 13/01/2020 09:08:45 errors, etc) it may be disabled: 13/01/2020 09:08:45 - use '-nowf' to disable wireframing completely. 13/01/2020 09:08:45 - use '-nowcr' to disable the Copy Rectangle after the 13/01/2020 09:08:45 moved window is released in the new position. 13/01/2020 09:08:45 Also see the -help entry for tuning parameters. 13/01/2020 09:08:45 You can press 3 Alt_L's (Left "Alt" key) in a row to 13/01/2020 09:08:45 repaint the screen, also see the -fixscreen option for 13/01/2020 09:08:45 periodic repaints. 13/01/2020 09:08:45 GrabServer control via XTEST. 13/01/2020 09:08:45 13/01/2020 09:08:45 Scroll Detection: -scrollcopyrect mode is in effect to 13/01/2020 09:08:45 use RECORD extension to try to detect scrolling windows 13/01/2020 09:08:45 (induced by either user keystroke or mouse input). 13/01/2020 09:08:45 If this yields undesired behavior (poor response, painting 13/01/2020 09:08:45 errors, etc) it may be disabled via: '-noscr' 13/01/2020 09:08:45 Also see the -help entry for tuning parameters. 13/01/2020 09:08:45 You can press 3 Alt_L's (Left "Alt" key) in a row to 13/01/2020 09:08:45 repaint the screen, also see the -fixscreen option for 13/01/2020 09:08:45 periodic repaints. 13/01/2020 09:08:45 13/01/2020 09:08:45 XKEYBOARD: number of keysyms per keycode 7 is greater 13/01/2020 09:08:45 than 4 and 51 keysyms are mapped above 4. 13/01/2020 09:08:45 Automatically switching to -xkb mode. 13/01/2020 09:08:45 If this makes the key mapping worse you can 13/01/2020 09:08:45 disable it with the "-noxkb" option. 13/01/2020 09:08:45 Also, remember "-remap DEAD" for accenting characters. 13/01/2020 09:08:45 13/01/2020 09:08:45 X FBPM extension not supported. Xlib: extension "DPMS" missing on display ":0". 13/01/2020 09:08:45 X display is not capable of DPMS. 13/01/2020 09:08:45 -------------------------------------------------------- 13/01/2020 09:08:45 13/01/2020 09:08:45 Default visual ID: 0x21 13/01/2020 09:08:45 Read initial data from X display into framebuffer. 13/01/2020 09:08:45 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120 13/01/2020 09:08:45 13/01/2020 09:08:45 X display :0 is 32bpp depth=24 true color 13/01/2020 09:08:45 13/01/2020 09:08:45 Listening for VNC connections on TCP port 5900 13/01/2020 09:08:45 13/01/2020 09:08:45 Xinerama is present and active (e.g. multi-head). 13/01/2020 09:08:45 Xinerama: number of sub-screens: 1 13/01/2020 09:08:45 Xinerama: no blackouts needed (only one sub-screen) 13/01/2020 09:08:45 [autovideoconverter] Processing watch folder '/watch'... 13/01/2020 09:08:45 fb read rate: 258 MB/sec 13/01/2020 09:08:45 fast read: reset -wait ms to: 10 13/01/2020 09:08:45 fast read: reset -defer ms to: 10 13/01/2020 09:08:45 The X server says there are 10 mouse buttons. 13/01/2020 09:08:45 screen setup finished. 13/01/2020 09:08:45

The VNC desktop is: 188548bcf007:0 PORT=5900


Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster retrieval. It should work with any VNC viewer. Try it by running:

x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion. More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

[autovideoconverter] Watch folder '/watch' processing terminated. [services.d] starting app... [app] starting HandBrake... [services.d] done. GLib-GIO-Message: 09:08:49.848: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. [services.d] stopping services [services.d] stopping app... [services.d] stopping openbox... [services.d] stopping statusmonitor... [services.d] stopping certsmonitor... [services.d] stopping logmonitor... [services.d] stopping nginx... [services.d] stopping x11vnc... caught signal: 15 13/01/2020 09:08:52 deleted 40 tile_row polling images. [services.d] stopping autovideoconverter... The XKEYBOARD keymap compiler (xkbcomp) reports:

Warning: Unsupported high keycode 372 for name <I372> ignored X11 cannot support keycodes above 255. This warning only shows for the first high keycode. Internal error: Could not resolve keysym XF86MonBrightnessCycle Internal error: Could not resolve keysym XF86RotationLockToggle Errors from xkbcomp are not fatal to the X server [services.d] stopping xvfb... [services.d] stopping s6-fdholderd... [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] syncing disks. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting.

milikitorr avatar Jan 13 '20 09:01 milikitorr

@jlesage Any recommendations? Are there any logs I could try to enable to further debug this issue? I'm pretty stuck for the time being. Thanks

milikitorr avatar Jan 15 '20 14:01 milikitorr

Can you try with the debug build? Make sure to create the container with the environment variable HANDBRAKE_DEBUG=1.

https://github.com/jlesage/docker-handbrake#debug-builds

Make sure to gather any core and debug logs (/config/log/hb/handbrake.debug.log),

jlesage avatar Jan 16 '20 02:01 jlesage

I had this same problem where I would instantly get disconnected from the VNC server and only get the banner in my browser and a server disconnected 1006 message.

I switched from accessing via http://FQDN:5800 to http://IP:5800 and it works now.

EDIT (addition):

Doing some further testing.... as well as using the IP address, using my .local FQDN works fine, using my .com (hybrid DNS) is what breaks the connection.

I also had problems with the container rebooting, and I'm sure it's old info here but ~~it was because I didn't have the storage volume mapped correctly. I'm guessing if any of the required container paths aren't mapped correctly (/config, /storage, /output) you're going to be stuck in reboot city.~~ I had to change the permissions on the /output directory.

bcurran3 avatar Feb 04 '20 23:02 bcurran3

I use Synology NAS too and get same error in browser by http://ip:5800.

I use vnc instead:

by default docker-handbrake listened 127.0.0.1:5900 for ipv4 network, so you can only access docker-handbrake locally.

but it listened :::5900 in ipv6, so if you have ipv6 address ,you can use vnc viewer to access docker-handbrake

[ipv6 address for you nas]:0

[1234:5678:1234:5878...]:0

liuhe36 avatar Feb 10 '20 15:02 liuhe36