You are not logged in.

#1 2013-10-30 16:20:04

kageurufu
Member
Registered: 2013-04-01
Posts: 17

running mopidy as a service fails when playing with a GStreamer error

My system is configured as such:

Pulseaudio with nearly default configuration, just set autospawn = true

/etc/asound.conf

# Use PulseAudio by default
pcm.pulse {
        type pulse
}

ctl.pulse {
        type pulse
}


pcm.!default {
  type pulse
  fallback "sysdefault"
  hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
  }
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}

.config/mopidy/mopidy.conf

[mpd]
hostname = ::

[spotify]
enabled = false

[local]
media_dir=~/Music

[audio]
output = pulsesink

sudo systemctl status mopidy@frank -l

mopidy@frank.service - mopidy
   Loaded: loaded (/usr/lib/systemd/system/mopidy@.service; disabled)
   Active: active (running) since Wed 2013-10-30 09:16:36 MST; 18s ago
 Main PID: 5277 (mopidy)
   CGroup: /system.slice/system-mopidy.slice/mopidy@frank.service
           └─5277 /usr/bin/python2 /usr/bin/mopidy

Oct 30 09:16:36 franklaptop mopidy[5277]: INFO     Loaded 0 local tracks from /home/frank/Music using /home/frank/.local/share/mopidy/local/tag_cache
Oct 30 09:16:36 franklaptop mopidy[5277]: INFO     Loaded 0 local playlists from /home/frank/.local/share/mopidy/local/playlists
Oct 30 09:16:36 franklaptop mopidy[5277]: INFO     Starting Mopidy core
Oct 30 09:16:36 franklaptop mopidy[5277]: WARNING  Could not find usable audio mixer track
Oct 30 09:16:36 franklaptop mopidy[5277]: INFO     Starting Mopidy frontends: HttpFrontend, MpdFrontend
Oct 30 09:16:36 franklaptop mopidy[5277]: INFO     Using epoll
Oct 30 09:16:36 franklaptop mopidy[5277]: INFO     MPD server running at [::]:6600
Oct 30 09:16:37 franklaptop mopidy[5277]: INFO     HTTP server running at http://127.0.0.1:6680
Oct 30 09:16:37 franklaptop mopidy[5277]: INFO     New MPD connection from [::1]:56262
Oct 30 09:16:51 franklaptop mopidy[5277]: ERROR    GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure. Debug message: gstplaysink.c(1899):
 gen_audio_chain (): /GstPlayBin2:playbin20/GstPlaySink:playsink0

Versions:

alsa-lib 1.0.27.2-1
alsa-plugins 1.0.27-2
alsa-utils 1.0.27.2-1
clutter-gst 2.0.8-1
gst-plugins-bad 1.2.0-2
gst-plugins-base 1.2.0-1
gst-plugins-base-libs 1.2.0-1
gst-plugins-good 1.2.0-1
gstreamer 1.2.0-1
gstreamer0.10 0.10.36-2
gstreamer0.10-base 0.10.36-1
gstreamer0.10-base-plugins 0.10.36-1
gstreamer0.10-good 0.10.31-3
gstreamer0.10-good-plugins 0.10.31-3
gstreamer0.10-python 0.10.22-1
gstreamer0.10-ugly 0.10.19-6
gstreamer0.10-ugly-plugins 0.10.19-6
lib32-alsa-lib 1.0.27.2-1
lib32-flashplugin 11.2.202.310-1
lib32-gstreamer0.10 0.10.36-2
lib32-gstreamer0.10-base 0.10.36-4
libcanberra-pulse 0.30-4
libpulse 4.0-6
mopidy-git v0.16.0-1
pulseaudio 4.0-6
pulseaudio-alsa 2-2

Any ideas on where to go with this?

It only fails If I run this through systemctl, if I start mopidy from command line, it works without issue

Last edited by kageurufu (2013-10-30 16:20:41)

Offline

#2 2013-11-12 17:04:04

Freso
Member
From: Denmark
Registered: 2011-09-09
Posts: 42
Website

Re: running mopidy as a service fails when playing with a GStreamer error

It is probably a pulse access issue due to being run by root systemd vs. being run by the user. For now, I'm just using https://gist.github.com/Freso/7434553 - as the description says, place it in $HOME/.config/systemd/user (or rather: $XDG_CONFIG_HOME/systemd/user) and you can use the user-level systemd to manage it. E.g., `systemctl --user (start,restart,stop,enable,status,...) mopidy`.

If someone has a clue about the pulse issue, I'm all ears.


Machines: Kotake. Tael, Farore
PKGBUILDs: in AUR, at BitBucket

Offline

#3 2013-11-13 19:54:00

kageurufu
Member
Registered: 2013-04-01
Posts: 17

Re: running mopidy as a service fails when playing with a GStreamer error

I had thought of that as well, however, my home pc is running the same setup.

Fresh arch install, pulse, mopidy, mopidy-gmusic

systemd started mopidy@frank

It works fine there, just my laptop that has issues

Offline

#4 2014-03-15 22:43:57

maistho
Member
Registered: 2014-03-15
Posts: 1

Re: running mopidy as a service fails when playing with a GStreamer error

Hi, I'm getting this issue as well. Did you ever resolve the problem?

Offline

#5 2014-03-18 17:06:23

kageurufu
Member
Registered: 2013-04-01
Posts: 17

Re: running mopidy as a service fails when playing with a GStreamer error

Sadly, no. I did reinstall my laptop at one point and it worked for a couple months, and now has the same issue

Offline

#6 2015-01-28 02:00:59

mind_the_gap
Member
Registered: 2010-07-27
Posts: 14

Re: running mopidy as a service fails when playing with a GStreamer error

Just in case one of you has still this problem: I could solve it by running mopidy as the same user that runs pulseaudio (this is the mpd user for me).  So it seems to be a permission problem, just like Freso said. The user can be changed in

/usr/lib/systemd/system/mopidy.service

Of course you would need to accordingly change ownership of all files in

/etc/mopidy/
/var/lib/mopidy/

Offline

#7 2015-02-04 23:40:20

Freso
Member
From: Denmark
Registered: 2011-09-09
Posts: 42
Website

Re: running mopidy as a service fails when playing with a GStreamer error

Or you could use "mopidy@user.service" or the user level mopidy unit ("systemctl --user start mopidy") and you won't need to alter permissions for anything, just use the user configuration files.


Machines: Kotake. Tael, Farore
PKGBUILDs: in AUR, at BitBucket

Offline

Board footer

Powered by FluxBB