XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (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.)

#1

I’ve had this issue posted in the mic arrays topic for a while but I’m not getting any responses. So, trying here.

Seeed respeaker core v2
Snips seems to start up fine except for the snips-audio-server.service. I’ve tried a lot of things and still no-go. The title of this post is the main error message I get and it baffles me. :slight_smile:

RESTART - NOT SUDO
respeaker@v2:~ systemctl restart snips-audio-server ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to restart ‘snips-audio-server.service’. Authenticating as: root Password: polkit-agent-helper-1: pam_authenticate failed: Authentication failure ==== AUTHENTICATION FAILED === Failed to restart snips-audio-server.service: Access denied See system logs and ‘systemctl status snips-audio-server.service’ for details. respeaker@v2:~ systemctl status snips-audio-server.service
? snips-audio-server.service - Snips Audio Server
Loaded: loaded (/lib/systemd/system/snips-audio-server.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: timeout) since Wed 2019-05-08 21:54:55 UTC; 2s ago
Process: 724 ExecStartPre=/usr/local/bin/wait_for_pulse_devices.sh (code=killed, signal=TERM)

May 08 21:54:55 v2 systemd[1]: snips-audio-server.service: Unit entered failed state.
May 08 21:54:55 v2 systemd[1]: snips-audio-server.service: Failed with result ‘timeout’.
respeaker@v2:~$

respeaker@v2:~$ journalctl -f -u snips-audio-server
– Logs begin at Wed 2019-05-08 20:39:04 UTC. –
May 08 21:58:34 v2 wait_for_pulse_devices.sh[4339]: pa_context_connect() failed: Connection refused
May 08 21:58:35 v2 wait_for_pulse_devices.sh[4339]: XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (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.)
May 08 21:58:35 v2 wait_for_pulse_devices.sh[4339]: Connection failure: Connection refused
May 08 21:58:35 v2 wait_for_pulse_devices.sh[4339]: pa_context_connect() failed: Connection refused
May 08 21:58:36 v2 wait_for_pulse_devices.sh[4339]: XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (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.)
May 08 21:58:36 v2 wait_for_pulse_devices.sh[4339]: Connection failure: Connection refused
May 08 21:58:36 v2 wait_for_pulse_devices.sh[4339]: pa_context_connect() failed: Connection refused
May 08 21:58:37 v2 wait_for_pulse_devices.sh[4339]: XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (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.)

LET’S TRY WITH SUDO
espeaker@v2:~ sudo systemctl restart snips-audio-server [sudo] password for respeaker: Job for snips-audio-server.service failed because a timeout was exceeded. See “systemctl status snips-audio-server.service” and “journalctl -xe” for details. respeaker@v2:~ systemctl status snips-audio-server.service
? snips-audio-server.service - Snips Audio Server
Loaded: loaded (/lib/systemd/system/snips-audio-server.service; enabled; vendor preset: enabled)
Active: activating (start-pre) since Wed 2019-05-08 22:49:51 UTC; 52s ago
Cntrl PID: 10248 (wait_for_pulse_)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/snips-audio-server.service
??control
??10248 /bin/bash /usr/local/bin/wait_for_pulse_devices.sh
??10905 sleep 1

May 08 22:50:40 v2 wait_for_pulse_devices.sh[10248]: pa_context_connect() failed: Connection refused
May 08 22:50:41 v2 wait_for_pulse_devices.sh[10248]: XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (This could e g happen if you try to connect to a non-root Pu
May 08 22:50:41 v2 wait_for_pulse_devices.sh[10248]: Connection failure: Connection refused
May 08 22:50:41 v2 wait_for_pulse_devices.sh[10248]: pa_context_connect() failed: Connection refused
May 08 22:50:42 v2 wait_for_pulse_devices.sh[10248]: XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (This could e g happen if you try to connect to a non-root Pu
May 08 22:50:42 v2 wait_for_pulse_devices.sh[10248]: Connection failure: Connection refused
May 08 22:50:42 v2 wait_for_pulse_devices.sh[10248]: pa_context_connect() failed: Connection refused
May 08 22:50:43 v2 wait_for_pulse_devices.sh[10248]: XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (This could e g happen if you try to connect to a non-root Pu
May 08 22:50:43 v2 wait_for_pulse_devices.sh[10248]: Connection failure: Connection refused
May 08 22:50:43 v2 wait_for_pulse_devices.sh[10248]: pa_context_connect() failed: Connection refused

respeaker@v2:~$

  • uid 0 is root of course, uid 113 is _snips
  • I chmod’ed /etc/snips-audio-server/pulse/ and /etc/snips-audio-server/ to 777.

So root is trying to start snips-audio and _snips won’t let him have the permissions.

What exactly does this mean? How do we fix it?
(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.)

If anybody is listening…please help.

Thanks
Jeff

#2

NM

I reinstalled respeaker and snips for the fourth time and now it starts.

I just dunno…:tumbler_glass:

Another Update

After rebooting it doesn’t work anymore. Same errors as before. :tumbler_glass::tumbler_glass::tumbler_glass::tumbler_glass::tumbler_glass::tumbler_glass::tumbler_glass::tumbler_glass::tumbler_glass:

Last Post, I Promise

reinstalled everything again.
Made users $user, _snips, respeaker and root part of the pulse and pulse-access groups. Sorry I forgot to save the list of usermod commands but basically I made all relevant users members of all relevant groups. You get the idea. At the same time, the Snips masters released an update today and that got thrown into the mix as well.

At any rate, Snips now detects the hotword and tries to decode it. He doesn’t do a very good job but that was happening before. I think my skills and apps need some work but that’s a story for another day.

Cheers all!
Jeff :partying_face::parasol_on_ground::beach_umbrella::taco::taco::cocktail::cocktail::cocktail::cocktail:

P.S. I hope this helps someone.