[GH-ISSUE #169] Pulse unable to connect, access failed #110

Closed
opened 2026-10-15 12:56:34 +00:00 by bsakaguchi · 6 comments
Owner

Originally created by @Wizofgoz on GitHub (Jan 25, 2025).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/169

First off, awesome project you have here. Thank you for taking the time to maintain it!

When Wolf starts, I'm seeing this in the log:

...
XDG_RUNTIME_DIR (/tmp/sockets) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
04:02:16.320204835 WARN  | [PULSE] Unable to connect, Access denied
04:02:16.320304754 INFO  | Starting PulseAudio docker container
04:02:16.322022138 WARN  | [DOCKER] Container WolfPulseAudio already present, removing first
04:02:16.322026005 INFO  | HTTPS server listening on port: 47984 
04:02:16.322607050 ERROR | mDNS error: Error: Failed to open any client sockets
04:02:19.523342187 WARN  | [PULSE] Unable to connect, Access denied
...

It seems like the pulseaudio container might be getting started wrong but I'm not sure how to remedy it. The permissions on /tmp/sockets/pulse seem vastly different from /tmp/sockets/pulse-socket so that also seemed fishy:

/tmp/sockets$ ls -al
total 0
drwxr-xr-x  3 csi  csi   80 Jan 24 20:09 .
drwxrwxrwt 10 root root 200 Jan 24 20:09 ..
drwx------  2 csi  csi   60 Jan 24 20:09 pulse
srwxrwxrwx  1 csi  csi    0 Jan 24 20:09 pulse-socket

This leads to the audio out device showing as "null" and the only default app that plays audio is the test ball.

Here's my docker-compose for wolf as well:

services:
  wolf:
    device_cgroup_rules:
      - c 13:* rmw
    devices:
      - /dev/dri
      - /dev/uinput
      - /dev/uhid
    environment:
      - XDG_RUNTIME_DIR=/tmp/sockets
      - HOST_APPS_STATE_FOLDER=/etc/wolf
    image: ghcr.io/games-on-whales/wolf:stable
    network_mode: host
    restart: unless-stopped
    volumes:
      - /etc/wolf/:/etc/wolf
      - /tmp/sockets:/tmp/sockets:rw
      - /var/run/docker.sock:/var/run/docker.sock:rw
      - /dev/:/dev/:rw
      - /run/udev:/run/udev:rw
Originally created by @Wizofgoz on GitHub (Jan 25, 2025). Original GitHub issue: https://github.com/games-on-whales/wolf/issues/169 First off, awesome project you have here. Thank you for taking the time to maintain it! When Wolf starts, I'm seeing this in the log: ``` ... XDG_RUNTIME_DIR (/tmp/sockets) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.) 04:02:16.320204835 WARN | [PULSE] Unable to connect, Access denied 04:02:16.320304754 INFO | Starting PulseAudio docker container 04:02:16.322022138 WARN | [DOCKER] Container WolfPulseAudio already present, removing first 04:02:16.322026005 INFO | HTTPS server listening on port: 47984 04:02:16.322607050 ERROR | mDNS error: Error: Failed to open any client sockets 04:02:19.523342187 WARN | [PULSE] Unable to connect, Access denied ... ``` It seems like the pulseaudio container might be getting started wrong but I'm not sure how to remedy it. The permissions on `/tmp/sockets/pulse` seem vastly different from `/tmp/sockets/pulse-socket` so that also seemed fishy: ``` /tmp/sockets$ ls -al total 0 drwxr-xr-x 3 csi csi 80 Jan 24 20:09 . drwxrwxrwt 10 root root 200 Jan 24 20:09 .. drwx------ 2 csi csi 60 Jan 24 20:09 pulse srwxrwxrwx 1 csi csi 0 Jan 24 20:09 pulse-socket ``` This leads to the audio out device showing as "null" and the only default app that plays audio is the test ball. Here's my docker-compose for wolf as well: ```yaml services: wolf: device_cgroup_rules: - c 13:* rmw devices: - /dev/dri - /dev/uinput - /dev/uhid environment: - XDG_RUNTIME_DIR=/tmp/sockets - HOST_APPS_STATE_FOLDER=/etc/wolf image: ghcr.io/games-on-whales/wolf:stable network_mode: host restart: unless-stopped volumes: - /etc/wolf/:/etc/wolf - /tmp/sockets:/tmp/sockets:rw - /var/run/docker.sock:/var/run/docker.sock:rw - /dev/:/dev/:rw - /run/udev:/run/udev:rw ```
Author
Owner

@ABeltramo commented on GitHub (Jan 25, 2025):

Those permissions warning are normal, that's not the issue.
It might just be Pulseaudio a bit slow to start and so we timeout whilst waiting for it to be up and running.

You can control the timeout by setting the env variable WOLF_PULSE_CONTAINER_TIMEOUT_MS (defaults to 2000, 2 seconds), try setting it to 10000 (10 seconds) and see if that helps.

<!-- gh-comment-id:2613854055 --> @ABeltramo commented on GitHub (Jan 25, 2025): Those permissions warning are normal, that's not the issue. It might just be Pulseaudio a bit slow to start and so we timeout whilst waiting for it to be up and running. You can control the timeout by setting the env variable `WOLF_PULSE_CONTAINER_TIMEOUT_MS` (defaults to `2000`, 2 seconds), try setting it to `10000` (10 seconds) and see if that helps.
Author
Owner

@Wizofgoz commented on GitHub (Jan 25, 2025):

Works like a charm! Now to fix the custom udev rules getting wiped out but that's definitely because my host machine is running TrueNAS Scale so I'm going to close this

<!-- gh-comment-id:2614015773 --> @Wizofgoz commented on GitHub (Jan 25, 2025): Works like a charm! Now to fix the custom udev rules getting wiped out but that's definitely because my host machine is running TrueNAS Scale so I'm going to close this
Author
Owner

@ankit2951 commented on GitHub (Feb 20, 2025):

Works like a charm! Now to fix the custom udev rules getting wiped out but that's definitely because my host machine is running TrueNAS Scale so I'm going to close this

Did you do anything else besides adding that env variable? I have a different post regarding the same issue and came around your post. Changing WOLF_PULSE_CONTAINER_TIMEOUT_MS to 10000 didn't work. In the pulse audio container it complaining about Unable to contact D-Bus but for the life of me I can't figure out why or how to fix it so I can get audio working.

https://github.com/games-on-whales/wolf/issues/175#issuecomment-2669955041

<!-- gh-comment-id:2672508301 --> @ankit2951 commented on GitHub (Feb 20, 2025): > Works like a charm! Now to fix the custom udev rules getting wiped out but that's definitely because my host machine is running TrueNAS Scale so I'm going to close this Did you do anything else besides adding that env variable? I have a different post regarding the same issue and came around your post. Changing `WOLF_PULSE_CONTAINER_TIMEOUT_MS` to `10000` didn't work. In the pulse audio container it complaining about `Unable to contact D-Bus` but for the life of me I can't figure out why or how to fix it so I can get audio working. https://github.com/games-on-whales/wolf/issues/175#issuecomment-2669955041
Author
Owner

@ConsularParadi commented on GitHub (Feb 26, 2025):

Hi @ankit2951, I was facing the issue and setting timeout didn't help. So I stopped all wolf related containers (WOLF, WOLFPULSEAUDIO, WOLF_LUTRIS), removed all of them using docker remove <all-container-names> and restarted wolf. This fixed the problem for me

<!-- gh-comment-id:2684258011 --> @ConsularParadi commented on GitHub (Feb 26, 2025): Hi @ankit2951, I was facing the issue and setting timeout didn't help. So I stopped all wolf related containers (`WOLF, WOLFPULSEAUDIO, WOLF_LUTRIS`), removed all of them using `docker remove <all-container-names>` and restarted wolf. This fixed the problem for me
Author
Owner

@royaltongue commented on GitHub (Mar 8, 2025):

Also having this same error. Running on OpenMediaVault and Docker

<!-- gh-comment-id:2708293973 --> @royaltongue commented on GitHub (Mar 8, 2025): Also having this same error. Running on OpenMediaVault and Docker
Author
Owner

@Ameb commented on GitHub (Mar 8, 2025):

I had the same errors but sound worked, as long as i set sound in moonlight client to Stereo.
I realized if i set audio settings on moonlight client to 5.1 or 7.1 it wouldn't work properly.

<!-- gh-comment-id:2708307696 --> @Ameb commented on GitHub (Mar 8, 2025): I had the same errors but sound worked, as long as i set sound in moonlight client to Stereo. I realized if i set audio settings on moonlight client to 5.1 or 7.1 it wouldn't work properly.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/wolf#110
No description provided.