Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

Docker, pulseaudio and "Home directory not accessible: Permission denied" #1690

Open
DB-CL opened this issue May 3, 2020 · 4 comments
Open
Labels
in: docker Issues in the test module. stale This label will be removed soon status: waiting-for-feedback The replication have not been confirmed yet. Or no implementer or no PRs or tips to solve yet. type: question A general question.

Comments

@DB-CL
Copy link

DB-CL commented May 3, 2020

Problem description

I'm using AirSonic with Docker (actually, docker-compose) and I'm having difficulties to set up the jukebox mode.

I've read the guide here : https://airsonic.github.io/docs/jukebox/#using-docker and I've setup everything according to the guide, except the group_add parameter which was removed from docker-compose 3 (but I've added my user to the "audio" group manually, which should be good enough).

The jukebox mode is not working, and there is a very clear error in the logs, but I cannot figure it out.

The error is the following :

2020-05-03 18:38:27.242  INFO --- o.a.p.io.TranscodeInputStream            : Starting transcoder: [/config/transcode/ffmpeg] [-ss] [0] [-i] [/music/mymusic.wma] [-map] [0:0] [-v] [0] [-ar] [44100] [-ac] [2] [-f] [s16be] [-] 
Home directory not accessible: Permission denied
2020-05-03 18:38:27.268 ERROR --- o.a.p.s.JukeboxLegacySubsonicService     : Error in jukebox: javax.sound.sampled.LineUnavailableException

javax.sound.sampled.LineUnavailableException: null
	at org.classpath.icedtea.pulseaudio.PulseAudioMixer.openImpl(PulseAudioMixer.java:714) ~[icedtea-sound.jar:na]
	at org.classpath.icedtea.pulseaudio.PulseAudioMixer.openLocal(PulseAudioMixer.java:588) ~[icedtea-sound.jar:na]
	at org.classpath.icedtea.pulseaudio.PulseAudioMixer.openLocal(PulseAudioMixer.java:584) ~[icedtea-sound.jar:na]
	at org.classpath.icedtea.pulseaudio.PulseAudioMixer.open(PulseAudioMixer.java:579) ~[icedtea-sound.jar:na]
	at org.classpath.icedtea.pulseaudio.PulseAudioDataLine.open(PulseAudioDataLine.java:94) ~[icedtea-sound.jar:na]
	at org.classpath.icedtea.pulseaudio.PulseAudioSourceDataLine.open(PulseAudioSourceDataLine.java:75) ~[icedtea-sound.jar:na]
	at org.classpath.icedtea.pulseaudio.PulseAudioSourceDataLine.open(PulseAudioSourceDataLine.java:90) ~[icedtea-sound.jar:na]
	at org.airsonic.player.service.jukebox.AudioPlayer.<init>(AudioPlayer.java:62) ~[classes!/:10.6.1-RELEASE]
	at org.airsonic.player.service.jukebox.AudioPlayerFactory.createAudioPlayer(AudioPlayerFactory.java:12) ~[classes!/:10.6.1-RELEASE]
	at org.airsonic.player.service.JukeboxLegacySubsonicService.play(JukeboxLegacySubsonicService.java:116) [classes!/:10.6.1-RELEASE]

The Home directory not accessible: Permission denied error is not there when I use the webplayer instead of jukebox.

I've checked everything I could on my host system, and inside the docker image (home directories are there, writable, everything should work properly).

Which "Home directory" is it ?? How can I get more information on what is going on ?

System information

  • Airsonic version: 10.6.1
  • Operating system: Host is debian 10 but airsonic is running in a docker image apprently built on top of Ubuntu 18.04.4 LTS
  • Java version: openjdk version "1.8.0_252"

Additional information

Pulse audio is working fine on the host system and I'm able to test my speakers properly with speaker-test

I can provide all the information you need,

Thanks

@tesshucom tesshucom added in: docker Issues in the test module. type: question A general question. status: waiting-for-feedback The replication have not been confirmed yet. Or no implementer or no PRs or tips to solve yet. labels May 8, 2020
@stale
Copy link

stale bot commented Aug 8, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale This label will be removed soon label Aug 8, 2020
@yannok
Copy link

yannok commented Feb 16, 2021

I face exactly the same issue on a raspberry Pi 4
If I attach to the container, I see that the user running airsonic is 'abc'
abc 257 97.9 6.3 1236936 231736 ? Ssl 18:33 11:10 \_ java -Dairsonic.defaultMusicFolder=/music -Dairsonic.defaultPlaylistFolder=/playlists -Dairsonic.defaultPodcastFolder=/podcasts -Dairsonic.home=/config -Djava.awt.headless=true -Dserver.contextPath=/ -Dserver.host=0.0.0.0 -Dserver.port=4040 -Xmx1g -jar airsonic.war

and this user has home in /config :
abc:x:1000:1000::/config:/bin/false

but user seems to have access to its home folder :
drwxr-xr-x 5 abc abc 4096 Feb 16 18:34 config

"chmoding" to 0777 does not help.

Any idea?

@deisi
Copy link

deisi commented Jun 6, 2021

I'm with you guys. However I have a slightly different message:

airsonic    | W: [pulseaudio] core-util.c: Failed to open configuration file '/root/.config/pulse//daemon.conf': Permission denied

So for some reason it is not using the abc user, but tries to read the daemon.conf of the root user. However changing permissions there or mounting another volume to store the config doesn't really solve the problem.

@deisi
Copy link

deisi commented Jun 6, 2021

pass it HOME=/config as env and it works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in: docker Issues in the test module. stale This label will be removed soon status: waiting-for-feedback The replication have not been confirmed yet. Or no implementer or no PRs or tips to solve yet. type: question A general question.
Projects
None yet
Development

No branches or pull requests

4 participants