Mopidy Discourse

Mpd server takes a long time to start


I have mopidy running on Raspbian Buster Lite and my only issue is that the mpd server takes a long time to start after boot and I can’t figure out why. It takes about 20 seconds after the system is up until I can connect to the mpd server with mpc. Before that mpc status returns mpd error: Connection refused. Once mpd is running it works perfectly.

I already tried disabling all mopidy extensions (local, http, spotify, m3u, iris) but that makes no difference at all.

Any ideas?

I’m a bit confused about logging. If you could tell me how to provide a useful log file for this problem I would be very grateful.

Here is the output of sudo mopdiyctl config:

Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config" as user mopidy
INFO     [MainThread] mopidy.__main__ Starting Mopidy 3.1.1
DEBUG    [MainThread] mopidy.ext Loading entry point: mpd = mopidy_mpd:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-MPD 3.1.0
DEBUG    [MainThread] mopidy.ext Loading entry point: iris = mopidy_iris:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-Iris 3.57.0
DEBUG    [MainThread] mopidy.ext Loading entry point: file = mopidy.file:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-File 3.1.1
DEBUG    [MainThread] mopidy.ext Loading entry point: http = mopidy.http:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-HTTP 3.1.1
DEBUG    [MainThread] mopidy.ext Loading entry point: m3u = mopidy.m3u:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-M3U 3.1.1
DEBUG    [MainThread] mopidy.ext Loading entry point: softwaremixer = mopidy.softwaremixer:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-SoftwareMixer 3.1.1
DEBUG    [MainThread] mopidy.ext Loading entry point: stream =
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-Stream 3.1.1
DEBUG    [MainThread] mopidy.ext Loading entry point: spotify = mopidy_spotify:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-Spotify 4.1.0
DEBUG    [MainThread] mopidy.ext Loading entry point: local = mopidy_local:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-Local 3.2.0
DEBUG    [MainThread] mopidy.ext Discovered extensions: mpd, iris, file, http, m3u, softwaremixer, stream, spotify, local
DEBUG    [MainThread] mopidy.config.keyring Fetching passwords from your keyring failed. Any passwords stored in the keyring will not be available. (org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11)
INFO     [MainThread] mopidy.config Loading config from builtin defaults
INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy-local.conf
INFO     [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
INFO     [MainThread] mopidy.config Loading config from command line options
DEBUG    [MainThread] mopidy.ext Validating extension: mpd
DEBUG    [MainThread] mopidy.ext Validating extension: iris
DEBUG    [MainThread] mopidy.ext Validating extension: file
DEBUG    [MainThread] mopidy.ext Validating extension: http
DEBUG    [MainThread] mopidy.ext Validating extension: m3u
DEBUG    [MainThread] mopidy.ext Validating extension: softwaremixer
DEBUG    [MainThread] mopidy.ext Validating extension: stream
DEBUG    [MainThread] mopidy.ext Validating extension: spotify
DEBUG    [MainThread] mopidy.ext Validating extension: local
INFO     [MainThread] mopidy.__main__ Enabled extensions: file, iris, mpd, http, stream, spotify, softwaremixer, local
INFO     [MainThread] mopidy.__main__ Disabled extensions: m3u
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

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

mixer = software
mixer_volume = 30
output = autoaudiosink
buffer_time = 100

scheme = 
hostname = 
port = 
username = 
password = 

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
country = DE
locale = en_GB
spotify_authorization_url =
lastfm_authorization_url =
genius_authorization_url =
data_dir = $XDG_DATA_DIR/iris

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 = false  ; Extension disabled by user config.

enabled = true

enabled = true
protocols = 
metadata_blacklist = 
timeout = 5000

enabled = true
username = peg5qrb02ii1sb3zyjuoyauet
password = ********
client_id = 0ff0b158-bcf3-4379-b087-c8c2169de312
client_secret = ********
bitrate = 96
volume_normalization = true
private_session = false
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = false
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries = 

enabled = true
max_search_results = 100
media_dir = /var/lib/mopidy/media
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 =