Gstreamer fails to run in Apalis iMX8 using Docker container method

Hi,

we are trying to run gstreamer in Apalis iMX8 machine using container method using the instructions given in the following link,

https://developer.toradex.com/knowledge-base/using-gstreamer-in-a-docker-container-with-torizon

The Apalis iMX8 machine was flashed with torizon core docker yocto image using the toradex easy installer. The image was build using the instructions given in the following link,(Zeus branch)

Build TorizonCore With Yocto Project/OpenEmbedded

But when following that procedure, we face the following issue,

**torizon@apalis-imx8-06506349:~$ sudo docker-compose -f docker-compose.arm64.yaml up
Starting torizon_weston_1 ... done
torizon_wayland_1 is up-to-date
Attaching to torizon_weston_1, torizon_wayland_1
weston_1   | NXP EULA has already been accepted.
weston_1   | Switching to VT 7
wayland_1  | Setting pipeline to PAUSED ...
wayland_1  | ERROR: Pipeline doesn't want to pause.
wayland_1  | WARNING: from element /GstPipeline:pipeline0/GstWaylandSink:waylandsink0: Could not initialise Wayland output
wayland_1  | Additional debug info:
wayland_1  | gstwaylandsink.c(333): gst_wayland_sink_find_display (): /GstPipeline:pipeline0/GstWaylandSink:waylandsink0:
wayland_1  | Failed to create GstWlDisplay: 'Failed to connect to the wayland display '(default)''
wayland_1  | Setting pipeline to NULL ...
wayland_1  | Freeing pipeline ...
wayland_1  | Setting pipeline to PAUSED ...
wayland_1  | ERROR: Pipeline doesn't want to pause.
wayland_1  | WARNING: from element /GstPipeline:pipeline0/GstWaylandSink:waylandsink0: Could not initialise Wayland output
wayland_1  | Additional debug info:
wayland_1  | gstwaylandsink.c(333): gst_wayland_sink_find_display (): /GstPipeline:pipeline0/GstWaylandSink:waylandsink0:
wayland_1  | Failed to create GstWlDisplay: 'Failed to connect to the wayland display '(default)''
wayland_1  | Setting pipeline to NULL ...
wayland_1  | Freeing pipeline ...
wayland_1  | Setting pipeline to PAUSED ...
wayland_1  | ERROR: Pipeline doesn't want to pause.
wayland_1  | WARNING: from element /GstPipeline:pipeline0/GstWaylandSink:waylandsink0: Could not initialise Wayland output
wayland_1  | Additional debug info:
wayland_1  | gstwaylandsink.c(333): gst_wayland_sink_find_display (): /GstPipeline:pipeline0/GstWaylandSink:waylandsink0:
wayland_1  | Failed to create GstWlDisplay: 'Failed to connect to the wayland display '(default)''
wayland_1  | Setting pipeline to NULL ...
wayland_1  | Freeing pipeline ...
wayland_1  | Setting pipeline to PAUSED ...
wayland_1  | WARNING: from element /GstPipeline:pipeline0/GstWaylandSink:waylandsink0: Could not initialise Wayland output
wayland_1  | Additional debug info:
wayland_1  | gstwaylandsink.c(333): gst_wayland_sink_find_display (): /GstPipeline:pipeline0/GstWaylandSink:waylandsink0:
wayland_1  | Failed to create GstWlDisplay: 'Failed to connect to the wayland display '(default)''
wayland_1  | ERROR: Pipeline doesn't want to pause.
wayland_1  | Setting pipeline to NULL ...
wayland_1  | Freeing pipeline ...
wayland_1  | Setting pipeline to PAUSED ...
wayland_1  | ERROR: Pipeline doesn't want to pause.
wayland_1  | WARNING: from element /GstPipeline:pipeline0/GstWaylandSink:waylandsink0: Could not initialise Wayland output
wayland_1  | Additional debug info:
wayland_1  | gstwaylandsink.c(333): gst_wayland_sink_find_display (): /GstPipeline:pipeline0/GstWaylandSink:waylandsink0:
wayland_1  | Failed to create GstWlDisplay: 'Failed to connect to the wayland display '(default)''
wayland_1  | Setting pipeline to NULL ...
wayland_1  | Freeing pipeline ...
wayland_1  | Setting pipeline to PAUSED ...
wayland_1  | ERROR: Pipeline doesn't want to pause.
wayland_1  | WARNING: from element /GstPipeline:pipeline0/GstWaylandSink:waylandsink0: Could not initialise Wayland output
wayland_1  | Additional debug info:
wayland_1  | gstwaylandsink.c(333): gst_wayland_sink_find_display (): /GstPipeline:pipeline0/GstWaylandSink:waylandsink0:
wayland_1  | Failed to create GstWlDisplay: 'Failed to connect to the wayland display '(default)''
wayland_1  | Setting pipeline to NULL ...
wayland_1  | Freeing pipeline ...
wayland_1  | Setting pipeline to PAUSED ...
wayland_1  | ERROR: Pipeline doesn't want to pause.
wayland_1  | WARNING: from element /GstPipeline:pipeline0/GstWaylandSink:waylandsink0: Could not initialise Wayland output
wayland_1  | Additional debug info:
wayland_1  | gstwaylandsink.c(333): gst_wayland_sink_find_display (): /GstPipeline:pipeline0/GstWaylandSink:waylandsink0:
wayland_1  | Failed to create GstWlDisplay: 'Failed to connect to the wayland display '(default)''
wayland_1  | Setting pipeline to NULL ...
wayland_1  | Freeing pipeline ...
wayland_1  | Setting pipeline to PAUSED ...
wayland_1  | ERROR: Pipeline doesn't want to pause.
wayland_1  | WARNING: from element /GstPipeline:pipeline0/GstWaylandSink:waylandsink0: Could not initialise Wayland output
wayland_1  | Additional debug info:
wayland_1  | gstwaylandsink.c(333): gst_wayland_sink_find_display (): /GstPipeline:pipeline0/GstWaylandSink:waylandsink0:
wayland_1  | Failed to create GstWlDisplay: 'Failed to connect to the wayland display '(default)''
wayland_1  | Setting pipeline to NULL ...
weston_1   | NXP EULA has already been accepted.
wayland_1  | Freeing pipeline ...
wayland_1  | Setting pipeline to PAUSED ...
wayland_1  | ERROR: Pipeline doesn't want to pause.
wayland_1  | WARNING: from element /GstPipeline:pipeline0/GstWaylandSink:waylandsink0: Could not initialise Wayland output
wayland_1  | Additional debug info:
wayland_1  | gstwaylandsink.c(333): gst_wayland_sink_find_display (): /GstPipeline:pipeline0/GstWaylandSink:waylandsink0:
wayland_1  | Failed to create GstWlDisplay: 'Failed to connect to the wayland display '(default)''
wayland_1  | Setting pipeline to NULL ...
wayland_1  | Freeing pipeline ...
weston_1   | touch: cannot touch '/tmp/nxp-eula-accepted': Permission denied
weston_1   | Date: 2020-06-12 UTC
weston_1   | [09:57:04.833] weston 5.0.0
weston_1   |                https://wayland.freedesktop.org
weston_1   |                Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
weston_1   |                Build: unknown (not built from git or tarball)
weston_1   | [09:57:04.833] Command line: /usr/bin/weston --current-mode
weston_1   | [09:57:04.833] OS: Linux, 4.14.159-0.0.0-devel+git.fff496c2a1bd, #1 SMP PREEMPT Mon Dec 23 23:24:32 UTC 2019, aarch64
weston_1   | [09:57:04.833] Using config file '/etc/xdg/weston/weston.ini'
weston_1   | [09:57:04.834] Output repaint window is 16 ms maximum.
weston_1   | [09:57:04.834] Loading module '/usr/lib/aarch64-linux-gnu/libweston-5/drm-backend.so'
weston_1   | [09:57:04.836] initializing drm backend
weston_1   | [09:57:04.839] using /dev/dri/card0
weston_1   | [09:57:04.839] DRM: supports universal planes
weston_1   | [09:57:04.839] DRM: supports atomic modesetting
weston_1   | [09:57:04.839] DRM: does not support picture aspect ratio
weston_1   | [09:57:04.840] Loading module '/usr/lib/aarch64-linux-gnu/libweston-5/gl-renderer.so'
weston_1   | [09:57:04.852] EGL client extensions: EGL_EXT_client_extensions
weston_1   |                EGL_EXT_platform_base EGL_KHR_platform_wayland
weston_1   |                EGL_EXT_platform_wayland EGL_KHR_platform_gbm
weston_1   | [     1] Failed to open device: No such file or directory, Try again...
weston_1   | [     2] Failed to open device: No such file or directory, Try again...
weston_1   | [     3] Failed to open device: No such file or directory, Try again...
weston_1   | [     4] Failed to open device: No such file or directory, Try again...
weston_1   | [     5] _OpenDevice(1228): FATAL: Failed to open device, errno=No such file or directory.
weston_1   | [     6] Failed to open device: No such file or directory, Try again...
weston_1   | [     7] Failed to open device: No such file or directory, Try again...
weston_1   | [     8] Failed to open device: No such file or directory, Try again...
weston_1   | [     9] Failed to open device: No such file or directory, Try again...
weston_1   | [    10] _OpenDevice(1228): FATAL: Failed to open device, errno=No such file or directory.
weston_1   | failed to restore keyboard mode: Invalid argument
torizon_weston_1 exited with code 1
torizon_wayland_1 exited with code 255**

We are using Ubuntu18.04 system for docker build. Kindly help us to run gstreamer commands successfully in the Apalis iMX8 machine using docker method.

Hi @Dharanitharan!

I have recently tried the Gstreamer demos from our documentation on Torizon and they should be working fine.

Instead of your own image build, can you try that on the default TorizonCore image that’s available on our Toradex Easy Installer feeds?

Also, on a side note, you don’t necessarily need to use sudo to run docker or docker-compose on Torizon since the torizon user already has the proper permissions to do so.