wernight/docker-mopidy

PulseAudio over network test fails

Opened this issue · 4 comments

Hi, I tested the container on my Ubuntu system with /dev/snd and it works correctly but when trying the PulseAudio over network it logs some errors/warnings and it doesn't play anything:

AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0: Failed to connect: Connection refused
Additional debug info:
pulsesink.c(615): gst_pulseringbuffer_open_device (): /GstPulseSink:autoaudiosink0-actual-sink-pulse
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

What can be the problem?

I get the same errors, did you find a sollution?

I couldn't find a solution. I gave up using this application.

same error here. It also logged at the start the /entrypoint.sh: line 5: /var/lib/mopidy/pulse.cookie: Permission denied

Jans-MBP:nuc-jan-audio jan$ docker run --rm     --user $UID:$GID -v /run/user/$UID/pulse:/run/user/1041/pulse     wernight/mopidy     gst-launch-1.0 audiotestsrc ! audioresample ! autoaudiosink
/entrypoint.sh: line 5: /var/lib/mopidy/pulse.cookie: Permission denied
Setting pipeline to PAUSED ...
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0: Failed to connect: Connection refused
Additional debug info:
pulsesink.c(615): gst_pulseringbuffer_open_device (): /GstPulseSink:autoaudiosink0-actual-sink-pulse
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

FYI the permissions of the pulse cookie file:

I have no name!@e0c1399069e1:~$ ls -l /var/lib/mopidy/pulse.cookie 
-rw-r--r--. 1 mopidy audio 0 Jul 30 13:33 /var/lib/mopidy/pulse.cookie

# following command shows that it is running as user ID 501
I have no name!@e0c1399069e1:~$ whoami
whoami: cannot find name for user ID 501

Update when I use as UID = 105 (= ID of mopidy user) then it is no longer logging the pulse cookie error but still all the other messages.

Jans-MBP:nuc-jan-audio jan$ docker run --rm     --user 105 -v /run/user/105/pulse:/run/user/1041/pulse     wernight/mopidy     gst-launch-1.0 audiotestsrc ! audioresample ! autoaudiosink
Setting pipeline to PAUSED ...
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0: Failed to connect: Connection refused
Additional debug info:
pulsesink.c(615): gst_pulseringbuffer_open_device (): /GstPulseSink:autoaudiosink0-actual-sink-pulse
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

I fixed the issue by specifying -e "PULSE_SERVER=..." in the docker run command.