[solved] Fail to start mopidy.service on archlinux

Hi,

I’m giving a try to mopidy and encoutering issues to start the service. The machine is running archlinux, up to date:

uname -a
Linux zinj 5.16.8-arch1-1 #1 SMP PREEMPT Tue, 08 Feb 2022 21:21:08 +0000 x86_64 GNU/Linux

I followed the documentation on https://docs.mopidy.com and installed mopidy from the arch community repository.

The configuration is as follow:

sudo mopidyctl config
Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config" as user mopidy
INFO     2022-02-15 10:51:31,493 [57666:MainThread] mopidy.__main__
  Starting Mopidy 3.2.0
INFO     2022-02-15 10:51:31,504 [57666:MainThread] mopidy.config
  Loading config from builtin defaults
INFO     2022-02-15 10:51:31,505 [57666:MainThread] mopidy.config
  Loading config from file:///etc/mopidy/mopidy.conf
INFO     2022-02-15 10:51:31,505 [57666:MainThread] mopidy.config
  Loading config from command line options
WARNING  2022-02-15 10:51:31,507 [57666:MainThread] mopidy.config
  Ignoring config section 'local' because no matching extension was found
INFO     2022-02-15 10:51:31,565 [57666:MainThread] mopidy.__main__
  Enabled extensions: stream, http, softwaremixer, m3u, file
INFO     2022-02-15 10:51:31,565 [57666:MainThread] mopidy.__main__
  Disabled extensions: none
[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
verbosity = 4
format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n  %(message)s
color = true
config_file = /etc/mopidy/logging.conf

[audio]
mixer = software
mixer_volume = 
output = autoaudiosink
buffer_time = 

[proxy]
scheme = 
hostname = 
port = 
username = 
password = 

[file]
enabled = true
media_dirs = 
  $XDG_MUSIC_DIR|Music
  ~/|Home
excluded_file_extensions = 
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .pdf
  .png
  .txt
  .zip
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

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

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir = /var/lib/mopidy/playlists

[softwaremixer]
enabled = true

[stream]
enabled = true
protocols = 
  http
  https
  mms
  rtmp
  rtmps
  rtsp
metadata_blacklist = 
timeout = 5000

And the dependencies:

sudo mopidyctl deps
Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf deps" as user mopidy
INFO     2022-02-15 11:01:10,044 [57724:MainThread] mopidy.__main__
  Starting Mopidy 3.2.0
  Loading config from builtin defaults
INFO     2022-02-15 11:01:10,056 [57724:MainThread] mopidy.config
  Loading config from file:///etc/mopidy/mopidy.conf
INFO     2022-02-15 11:01:10,057 [57724:MainThread] mopidy.config
  Loading config from command line options
WARNING  2022-02-15 11:01:10,059 [57724:MainThread] mopidy.config
  Ignoring config section 'local' because no matching extension was found
INFO     2022-02-15 11:01:10,116 [57724:MainThread] mopidy.__main__
  Enabled extensions: stream, http, file, softwaremixer, m3u
INFO     2022-02-15 11:01:10,116 [57724:MainThread] mopidy.__main__
  Disabled extensions: none
Executable: /usr/bin/mopidy
Platform: Linux-5.16.8-arch1-1-x86_64-with-glibc2.35
Python: CPython 3.10.2 from /usr/lib/python3.10
Mopidy: 3.2.0 from /usr/lib/python3.10/site-packages
  Pykka: 3.0.2 from /usr/lib/python3.10/site-packages
  requests: 2.27.0 from /usr/lib/python3.10/site-packages
    chardet: 4.0.0 from /usr/lib/python3.10/site-packages
    idna: 3.3 from /usr/lib/python3.10/site-packages
    idna: 3.3 from /usr/lib/python3.10/site-packages
    urllib3: 1.26.8 from /usr/lib/python3.10/site-packages
  setuptools: 59.3.0 from /usr/lib/python3.10/site-packages
  tornado: 6.1 from /usr/lib/python3.10/site-packages
GStreamer: 1.20.0.0 from /usr/lib/python3.10/site-packages/gi
  Detailed information: 
    Python wrapper: python-gi 3.42.0
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        pulsesink
        id3demux
        id3v2mux
        lamemp3enc
        mpegaudioparse
        mpg123audiodec
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
        shout2send
      Not found:
        flump3dec
        mad

The mopidy.service file is as follow:

[Unit]
Description=Mopidy music server
After=avahi-daemon.service
After=dbus.service
After=network-online.target
Wants=network-online.target
After=nss-lookup.target
After=pulseaudio.service
After=remote-fs.target
After=sound.target

[Service]
User=mopidy
ExecStart=/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf

[Install]
WantedBy=multi-user.target

When starting the mopidy service with sudo systemctl start mopidy.service, I get the following logs:

sudo journalctl -f -u mopidy
fév 15 10:16:00 zinj systemd[1]: Started Mopidy music server.
fév 15 10:16:00 zinj systemd[57275]: mopidy.service: Failed to determine user credentials: No such process
fév 15 10:16:00 zinj systemd[57275]: mopidy.service: Failed at step USER spawning /usr/bin/mopidy: No such process
fév 15 10:16:00 zinj systemd[1]: mopidy.service: Main process exited, code=exited, status=217/USER
fév 15 10:16:00 zinj systemd[1]: mopidy.service: Failed with result 'exit-code'.

I try to look for it on the web, but couldn’t find anything that I could understand or use.

Just to check, I tried to launch mopidy with the mopidy user (sudo -u mopidy /usr/bin/mopidy) with success.

Any help or idea is very much welcomed. :slightly_smiling_face:

Oh. I’ve restarted the server, and yet the mopidy.service is up and running. o_0
Good news, but I don’t understand what changed.

Now, let’s configure mopidy!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.