# Mopidy fail to start as a Debian Jessie service

**URL:** <https://discourse.mopidy.com/t/mopidy-fail-to-start-as-a-debian-jessie-service/1289>\
**Category:** Misc\
**Created:** [July 24, 2016, 10:05am UTC](https://discourse.mopidy.com/t/mopidy-fail-to-start-as-a-debian-jessie-service/1289 "2016-07-24T10:05:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pierre\_Doleans](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/pierre_doleans/32/431_2.png) [@Pierre\_Doleans](https://discourse.mopidy.com/u/Pierre_Doleans)\
**Post date:** [July 24, 2016, 10:05am UTC](https://discourse.mopidy.com/t/mopidy-fail-to-start-as-a-debian-jessie-service/1289/1 "2016-07-24T10:05:42Z")

</div>

```
root@rmsbox:/home# /etc/init.d/mopidy status
   mopidy.service - Mopidy music server
   Loaded: loaded (/lib/systemd/system/mopidy.service; enabled)
   Active: failed (Result: signal) since Sun 2016-07-24 11:53:30 CEST; 3min 10s ago
  Process: 3859 ExecStart=/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf (code=killed, signal=SEGV)
 Main PID: 3859 (code=killed, signal=SEGV)

Jul 24 11:53:28 rmsbox mopidy[3859]: INFO Loading config from builtin defaults
Jul 24 11:53:28 rmsbox mopidy[3859]: INFO Loading config from /etc/mopidy/mopidy.conf
Jul 24 11:53:28 rmsbox mopidy[3859]: INFO Loading config from command line options
Jul 24 11:53:28 rmsbox mopidy[3859]: INFO Enabled extensions: mopify, spotify, mpd, alsamixer, http, stream, m3u, softwaremixer, file, local
Jul 24 11:53:28 rmsbox mopidy[3859]: INFO Disabled extensions: none
Jul 24 11:53:30 rmsbox mopidy[3859]: INFO Starting Mopidy mixer: SoftwareMixer
Jul 24 11:53:30 rmsbox mopidy[3859]: INFO Starting Mopidy audio
Jul 24 11:53:30 rmsbox mopidy[3859]: INFO Starting Mopidy backends: SpotifyBackend, StreamBackend, M3UBackend, FileBackend, LocalBackend
Jul 24 11:53:30 rmsbox systemd[1]: mopidy.service: main process exited, code=killed, status=11/SEGV
Jul 24 11:53:30 rmsbox systemd[1]: Unit mopidy.service entered failed state.

==> /var/log/kern.log <==
Jul 24 23:07:48 rmsbox kernel: [1147.058711] mopidy[2291]: segfault at 0 ip 00007fbd6b67db9e sp 00007fbd5bda76e0 error 4 in libspotify.so.12.1.51[7fbd6b4e0000+25c000]

```

Any ideas ? I Can’t find a previous topic with this error.

---

<div class="post-metadata">

**Author:** ![Pierre\_Doleans](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/pierre_doleans/32/431_2.png) [@Pierre\_Doleans](https://discourse.mopidy.com/u/Pierre_Doleans)\
**Post date:** [July 29, 2016, 6:27am UTC](https://discourse.mopidy.com/t/mopidy-fail-to-start-as-a-debian-jessie-service/1289/3 "2016-07-29T06:27:38Z")

</div>

Solved by reinstalling everything with apt

---

<div class="post-metadata">

**Author:** ![yara](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/yara/32/751_2.png) [@yara](https://discourse.mopidy.com/u/yara)\
**Post date:** [November 6, 2017, 8:36am UTC](https://discourse.mopidy.com/t/mopidy-fail-to-start-as-a-debian-jessie-service/1289/4 "2017-11-06T08:36:35Z")

</div>

Hi,

just got the same issue. I installed mopidy incl. some extras on RaspberryPi3 powered by raspbian (jessie indeed).  
First I ran it as via `sudo mopidy --config /etc/mopidy/mopidy.conf` to run some tests and configure my setup.  
Once ready I tried to run mopidy as a service and… same error as above.  
In my case here’s what I did:

1. `sudo mopidyctl --config /etc/mopidy/mopidy.conf -vvv`  
this showed me that mopidy crashes on spotify module loading /var/cache/mopidy/…

2. I checked all paths mentioned in /etc/mopidy/mopidy.conf in scope of ownership

Conclusion: because I ran previously via `sudo mopidy`, files and folders were created for root:root.  
Solution:  
`sudo chown -R mopidy:audio /var/cache/mopidy`  
`sudo chown -R mopidy:audio /var/lib/mopidy`

the above did the trick. mopidy up and running, fully repleced mpd.

---

<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:** [November 6, 2017, 9:50am UTC](https://discourse.mopidy.com/t/mopidy-fail-to-start-as-a-debian-jessie-service/1289/5 "2017-11-06T09:50:40Z")

</div>

So in conclusion, don’t run the service as the root user, it’s not designed to be used that way. And there is a need to improve the error messages so you don’t need to run with verbose logging to discover this. Thanks.
