Pulsesink connection refused error


This is a long shot but was wondering if anyone had a similar issue or could point me in the right direction.

I have installed mopidy, mopidy-local, mopidy-mpd, and ncmpcpp.

On attempting to play a track from ncmpcpp nothing happens. Not just no audio, the track doesn’t begin playback, no feedback from the front end at all as far as I can tell.

I’m assuming it’s something odd about my pulseaudio setup but my ignorance runs deep. My system is the latest Ubuntu running on a dell xps13.

Any pointers would be appreciated or if anyone can spot an obvious clanger in my config.

Many thanks.

sudo GST_DEBUG=3 mopidyctl -v

And attempting to play a track shows the following error

DEBUG    [LocalBackend-6] mopidy.backend Backend translated URI from local:track:NIN/Together/05%20-%20Nine%20Inch%20Nails%20-%20Apart.mp3 to file:///home/cutts/Music/NIN/Together/05%20-%20Nine%20Inch%20Nails%20-%20Apart.mp3
DEBUG    [SoftwareMixer-1] mopidy.mixer Mixer event: volume_changed(volume=100)
DEBUG    [SoftwareMixer-1] mopidy.listener Sending volume_changed to MixerListener: {'volume': 100}
0:00:24.827407054 16367 0x7fb89c045ef0 WARN                   pulse pulsesink.c:614:gst_pulseringbuffer_open_device:<pulsesink0> error: Failed to connect: Connection refused
0:00:24.827598237 16367 0x7fb89c045ef0 ERROR                playbin gstplaybin2.c:5466:activate_group:<playbin0> failed to activate sinks
ERROR    [MainThread] mopidy.audio.gst GStreamer error: Failed to connect: Connection refused
DEBUG    [MainThread] mopidy.audio.gst Got ERROR bus message: error=GLib.Error('Failed to connect: Connection refused', 'gst-resource-error-quark', 1) debug='pulsesink.c(614): gst_pulseringbuffer_open_device (): /GstBin:audio-sink/mopidy+audio+actor+_Outputs:mopidy+audio+actor+_outputs0/GstBin:bin0/GstPulseSink:pulsesink0'
DEBUG    [Audio-2] mopidy.audio.gst Changing state to GST_STATE_PLAYING: result=GST_STATE_CHANGE_FAILURE
WARNING  [Audio-2] mopidy.audio.actor Setting GStreamer state to GST_STATE_PLAYING failed

I have made the change in /etc/pulse/default.pa as per the docs
### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
load-module module-native-protocol-tcp ip-acl=
#load-module module-zeroconf-publish

My mopidy config:
Running “/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config” as user mopidy
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

verbosity = 0
format = %(levelname)-8s [%(threadName)s] %(name)s %(message)s
color = false
config_file =

mixer = software
mixer_volume = 
output = pulsesink server=
buffer_time = 

scheme = 
hostname = 
port = 
username = 
password = 

enabled = true
media_dirs = 
excluded_file_extensions = 
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

enabled = true
hostname =
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins = 
csrf_protection = true
default_app = mopidy

enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir =

enabled = true

enabled = true
protocols = 
metadata_blacklist = 
timeout = 5000

enabled = true
hostname = ::
port = 6600
password = 
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist = 
default_playlist_scheme = m3u

enabled = true
media_dir = /home/cutts/Music
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
included_file_extensions = 
excluded_file_extensions = 
directories = 
  Albums                  local:directory?type=album
  Artists                 local:directory?type=artist
  Composers               local:directory?type=artist&role=composer
  Genres                  local:directory?type=genre
  Performers              local:directory?type=artist&role=performer
  Release Years           local:directory?type=date&format=%25Y
  Tracks                  local:directory?type=track
  Last Week's Updates     local:directory?max-age=604800
  Last Month's Updates    local:directory?max-age=2592000
timeout = 10
use_artist_sortname = false
album_art_files = 

That’s not a supported way to run Mopidy. The two supported ways are in the documentation.

Indeed, but after the music had failed to play when running mopidyctl with systemdctl (which showed the mopidy.audio.gst GStreamer error).

I read this section in the docs, and ran the previously mentioned command in an attempt to view any extra GStreamer debug information as I thought it might be helpful.

Anyway, I was unable to figure out what was incorrect about my audio setup. I’ve resorted to launching mopidy in my startup script to sidestep the issue.