[Resolved] GStreamer error - Mopidy on Raspberry Pi 2 running OSMC


I am trying to use mopidy on my Raspberry Pi 2 to listen to Spotify.
When running mopidy everything works fine and I access to the web client through http://:6680/mopify/

But when I click on play I receive the following error message:

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
ERROR    GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.

The thing is the sound output from the Pi is working correctly as I here some sound when typing the following in the terminal: aplay /usr/share/sounds/alsa/Front_Center.wav

I have tried to run with the basic user, osmc or using sudo mopidy but the result is the same in both cases.
Would anybody know how I could fix this?


Traditionally, GStreamer used to try to output audio through JACK on Raspbian wheezy. According to my own testing, this is no longer an issue on Raspbian jessie.

You can work around this by instructing GStreamer to use ALSA directly. To do so, edit your mopidy.conf and set the audio/output config to alsasink, e.g. like this:

output = alsasink

Thanks a lot!

I changed the configuration file as you suggested and ran mopidy again.
On the next run, mopidy has quit with the following error ERROR no element "alsasink"

A quick search later, I found this thread https://github.com/mopidy/mopidy/issues/35 and installed gstreamer0.10-alsa. And now, everything runs smoothly.

Putting the topic as Resolved

gstreamer0.10-alsa is a ‘recommended’ dependency but OSMC doesn’t automatically install recommended packages. We could add this fact to the raspberrypi specific install page.

Worth testing if it just works[tm] when gstreamer0.10-alsa is installed, without setting audio = alsasink. Can you test, @camfrout?


So I just tried, after changing the config file and commenting the alsalink line, when I run mopidy I get the line INFO Audio output set to "autoaudiosink". And then the music is working as expected.

So, yes, the package gstreamer0.10-alsa seemed to be the issue for me at least.