# Connection refused (1) error when using pulsesink

**URL:** https://discourse.mopidy.com/t/connection-refused-1-error-when-using-pulsesink/1133
**Category:** Misc
**Created:** [February 23, 2016, 8:44pm UTC](https://discourse.mopidy.com/t/connection-refused-1-error-when-using-pulsesink/1133 "2016-02-23T20:44:41Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![StanSvec](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@StanSvec](https://discourse.mopidy.com/u/StanSvec)
#### Post date: [February 23, 2016, 8:44pm UTC](https://discourse.mopidy.com/t/connection-refused-1-error-when-using-pulsesink/1133/1 "2016-02-23T20:44:41Z")

</div>

Hi everyone,

My setup is Raspberry Pi 2 with Raspbian operating system. Together with Mopidy running as a service I also use Kodi on that device. Unfortunately Kodi cannot play sounds or has another issues when Mopidy is running and both are using Alsa output. So I installed pulseaudio to cope with this problem. But when I set:

> ```
> [audio]
> output = pulsesink
> 
> ```

in mopidy.conf then I cannot play anything with Mopidy. The following error messages are in mopidy log:

> ```
> 2016-02-23 20:39:16,285 ERROR [484:MainThread] mopidy.audio.gst: GStreamer error: gst-resource-error-quark: Failed to connect: Connection refused (1)
> 2016-02-23 20:39:16,289 WARNING [484:Audio-2] mopidy.audio.actor: Setting GStreamer state to GST_STATE_PLAYING failed
> 
> ```

I also found this in /var/log/messages, but don’t know whether it is somehow related:

> pulseaudio[1798]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11  
> pulseaudio[1798]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

Kodi is able to play sound using pulseaudio flawlessly. For any help will be very grateful!

Many thanks,

Stan

---

<div class="post-metadata">

### Author: ![StanSvec](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@StanSvec](https://discourse.mopidy.com/u/StanSvec)
#### Post date: [February 26, 2016, 12:01am UTC](https://discourse.mopidy.com/t/connection-refused-1-error-when-using-pulsesink/1133/2 "2016-02-26T00:01:30Z")

</div>

Finally I found the solution here: [https://github.com/mopidy/mopidy/issues/954](https://github.com/mopidy/mopidy/issues/954) in post from trygveaa. Added load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 into /etc/pulse/default.pa and output = pulsesink server=127.0.0.1 into mopidy config.

---

<div class="post-metadata">

### Author: ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)
#### Post date: [February 26, 2016, 12:34am UTC](https://discourse.mopidy.com/t/connection-refused-1-error-when-using-pulsesink/1133/3 "2016-02-26T00:34:17Z")

</div>

For anyone else landing here, the Mopidy documentation at [https://docs.mopidy.com/en/latest/service/#configure-pulseaudio](https://docs.mopidy.com/en/latest/service/#configure-pulseaudio) should be your first port of call.

---

<div class="post-metadata">

### Author: ![StanSvec](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@StanSvec](https://discourse.mopidy.com/u/StanSvec)
#### Post date: [February 26, 2016, 2:03am UTC](https://discourse.mopidy.com/t/connection-refused-1-error-when-using-pulsesink/1133/4 "2016-02-26T02:03:39Z")

</div>

Thanks for the link! I couldn’t find this page using google search with mopidy and pulseaudio keywords.

---

<div class="post-metadata">

### Author: ![ayoungcoder](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/ayoungcoder/32/551_2.png) [@ayoungcoder](https://discourse.mopidy.com/u/ayoungcoder)
#### Post date: [March 10, 2017, 3:48pm UTC](https://discourse.mopidy.com/t/connection-refused-1-error-when-using-pulsesink/1133/5 "2017-03-10T15:48:18Z")

</div>

> [@StanSvec](#):
>
> module-native-protocol-tcp auth-ip-acl=127.0.0.1

funny with that setup i got the exact same error yes, i also put it in my mopidy conf

any other fixes?

---

<div class="post-metadata">

### Author: ![philippkeller](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/philippkeller/32/597_2.png) [@philippkeller](https://discourse.mopidy.com/u/philippkeller)
#### Post date: [May 24, 2017, 2:21pm UTC](https://discourse.mopidy.com/t/connection-refused-1-error-when-using-pulsesink/1133/6 "2017-05-24T14:21:58Z")

</div>

I also had the error when adding the configs into pulseaudio and mopidy as described in the doc.

What finally worked for me:

- install paprefs
- enable network access (without auth) for localhost
- restart pulseaudio with `sudo killall pulseaudio` and `pulseaudio --start`
