Docker Community Forums

Share and learn in the Docker community.

PulseAudio server connection failure

docker

(Rdesfo) #1

I’m getting the following error when I run my vlc container:

vlc [0000000000e0c238] pulse audio output error: PulseAudio server connection failure: Connection refused [0000000000e13768] dbus interface error: Failed to connect to the D-Bus session daemon: /usr/bin/dbus-launch terminated abnormally without any error message [0000000000e13768] core interface error: no suitable interface module [0000000000d39178] core libvlc error: interface "dbus,none" initialization failed [0000000000d39178] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. libGL error: failed to open drm device: Permission denied libGL error: failed to load driver: i965 ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default [0000000000e0c238] alsa audio output error: cannot open ALSA device "default": No such file or directory [0000000000e0c238] core audio output error: module not functional [00007fd7b402e9c8] core decoder error: failed to create audio output [00007fd798001ed8] dbus_screensaver inhibit error: cannot connect to session bus: /usr/bin/dbus-launch terminated abnormally without any error message [00007fd798001268] xcb vout display error: shared memory server-side error: X11 error 10 [00007fd798001268] xcb vout display error: same error on retry: X11 error 10 [00007fd798001268] xcb_xv vout display: using buggy X11 server - SSH proxying? [00007fd798001268] xcb vout display error: shared memory server-side error: X11 error 10 [00007fd798001268] xcb vout display error: same error on retry: X11 error 10 [00007fd798001268] xcb_xv vout display: using buggy X11 server - SSH proxying? [00007fd798001268] xcb vout display error: shared memory server-side error: X11 error 10 [00007fd798001268] xcb vout display error: same error on retry: X11 error 10 [00007fd798001268] xcb_xv vout display: using buggy X11 server - SSH proxying? QObject::~QObject: Timers cannot be stopped from another thread

Dockerfile:
`
FROM ubuntu:16.04

RUN echo ‘deb http://archive.ubuntu.com/ubuntu/ xenial multiverse’ >> /etc/apt/sources.list &&
echo ‘deb-src http://archive.ubuntu.com/ubuntu/ xenial multiverse’ >> /etc/apt/sources.list

RUN apt-get update
&& apt-get install -y --no-install-recommends
vlc
vlc-plugin-*
&& rm -rf /var/lib/apt/lists/*

RUN groupadd -g 1000 user \
&& useradd --create-home -d /home/user -g user -u 1000 user
&& usermod -a -G audio,video user

USER user
WORKDIR /home/user

ENTRYPOINT [“vlc”]
`

run command:

docker run -d \ -v /etc/localtime:/etc/localtime:ro \ --device /dev/snd \ --device /dev/dri \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e DISPLAY=unix$DISPLAY \ --name vlc \ rdesfo/vlc

host system:
$cat /etc/os-release NAME=openSUSE VERSION="Tumbleweed" VERSION_ID="20160516" PRETTY_NAME="openSUSE Tumbleweed (20160516) (x86_64)" ID=opensuse ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:opensuse:20160516" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/" ID_LIKE="suse"

What configuration does docker expect when running a container with --device /dev/snd?


(Martinvdm) #2

Did you ever solved to run pulseaudo in docker? same issue here