MPD Server startup failed: [Errno 98] Adress already in use

Hello guys. I have an issue I would like to understand how to fix.
Every time I am trying to start mopidy from my terminal (I am using a Raspberry Pi 3 B+) I am having this error (I have PrtScn so you can see better).

I have seen a lot of topics here and followed all the routes they suggest but I have no luck so far.
My mopidy version is 2.2.1 by the way.
I installed mopidy with the way i found here: http://jasperproject.github.io/documentation/configuration/#spotify-integration (apt-get install)

This is my “mopidy deps output”.

/usr/lib/python2.7/dist-packages/mopidy/ext.py:202: PkgResourcesDeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.
extension_class = entry_point.load(require=False)
Executable: /usr/bin/mopidy
Platform: Linux-4.14.79-v7±armv7l-with-debian-9.6
Python: CPython 2.7.13 from /usr/lib/python2.7
Mopidy: 2.2.1 from /usr/lib/python2.7/dist-packages
Mopidy-Mopify: 1.6.1 from /usr/local/lib/python2.7/dist-packages
Mopidy>=0.19: 2.2.1 from /usr/lib/python2.7/dist-packages
setuptools: 40.6.3 from /usr/local/lib/python2.7/dist-packages
ConfigObj: 5.0.6 from /usr/local/lib/python2.7/dist-packages
six: 1.10.0 from /usr/lib/python2.7/dist-packages
Mopidy-Local-SQLite: 1.0.0 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify: 3.1.0 from /usr/lib/python2.7/dist-packages
Mopidy>=2.0: 2.2.1 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
cffi>=1.0.0: 1.9.1 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.5.0 from /usr/local/lib/python2.7/dist-packages
GStreamer: 1.10.4.0 from /usr/lib/python2.7/dist-packages/gi
Detailed information:
Python wrapper: python-gi 3.22.0
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
pulsesink
id3demux
id3v2mux
lamemp3enc
mad
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
flump3dec

Also, this is my “mopidy config” output.

/usr/lib/python2.7/dist-packages/mopidy/ext.py:202: PkgResourcesDeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.
extension_class = entry_point.load(require=False)
[core]
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = $XDG_DATA_DIR/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
debug_file = mopidy.log
config_file =

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

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

[mopify]
enabled = true
debug = false

[mpd]
enabled = true
hostname = ::
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u

[http]
enabled = true
hostname = ::
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname
allowed_origins =
csrf_protection = true

[stream]
enabled = false ; Extension disabled by user config.

[m3u]
enabled = true
base_dir = $XDG_MUSIC_DIR
default_encoding = latin-1
default_extension = .m3u8
playlists_dir =

[softwaremixer]
enabled = true

[file]
enabled = true
media_dirs =
$XDG_MUSIC_DIR|Music
~/|Home
excluded_file_extensions =
.jpg
.jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local]
enabled = true
library = sqlite
media_dir = $XDG_MUSIC_DIR
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions =
.directory
.html
.jpeg
.jpg
.log
.nfo
.png
.txt

[spotify]
enabled = true
username = 3o77nr6smj7j51w92jod8s8lg
password = ********
client_id = a2c14586-11f2-4812-9547-25009fbcbcc3
client_secret = ********
bitrate = 160
volume_normalization = true
private_session = false
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =

[local-sqlite]
enabled = true
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_album_mbid_uri = true
use_artist_mbid_uri = false
use_artist_sortname = false

I really have to make this to work, so please help!

Use netstat -tlpn | grep 6680 to see which process is listening on port 6680 (standard port mopidy http-frontend) and stop it.

Another solution is to change the port in the [http] section of your config to some port not in use.

We have installation instructions at https://docs.mopidy.com/en/latest/installation/raspberrypi/

Once you’ve read them, also read https://docs.mopidy.com/en/latest/service/

The instructions you’ve linked have bad advice (running as the root user). Also, In future, please paste text logs rather than screenshots.

Hello, thank you very much for your reply!
Could you please provide some alternative port avalable for use? (for example, could it be 5500 or something familiar?)
Also, why should I edit the “HTTP” section of config? It was my understanding that the MPD section should be edited

Hello and thank you for your reply!
I can’t understand what you mean by “the instructions have bad advice”. Could you please explain?
(No more screenshots from now on :smile: )

I did.

They are also suggesting using crontab for some strange reason. Since you’ve now read the “Running as a service” link you should understand the correct way to run Mopidy automatically. The link may also explain why port 6600 is already in use.

If you still need to change the [mpd] port then you can use whatever free port you like that is equal or greater than 1024. Port numbers below 1024 can only be used by the root user. Only you can find out what ports are free on your system but it’s likely that port 6601 is free.

Ok sir, I found available ports to use as u said, now my output is this:

/usr/lib/python2.7/dist-packages/mopidy/ext.py:202: PkgResourcesDeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.
extension_class = entry_point.load(require=False)
INFO Starting Mopidy 2.2.1
INFO Loading config from builtin defaults
INFO Loading config from /home/pi/.config/mopidy/mopidy.conf
INFO Loading config from command line options
INFO Enabled extensions: mopify, spotify, mpd, http, m3u, softwaremixer, file, local, local-sqlite
INFO Disabled extensions: stream
INFO Starting Mopidy mixer: SoftwareMixer
INFO Starting Mopidy audio
INFO Starting Mopidy backends: M3UBackend, FileBackend, LocalBackend, SpotifyBackend
INFO Loaded 0 local tracks using sqlite
INFO Audio output set to “autoaudiosink”
INFO Starting Mopidy core
INFO Logged in to Spotify in offline mode
INFO Starting Mopidy frontends: QueueManagerFrontend, MpdFrontend, HttpFrontend
INFO MPD server running at [::]:6601
INFO HTTP server running at [::]:6681
INFO Starting GLib mainloop
INFO Logged in to Spotify in online mode

Shouldn’t my playlists be visible here? (I have premium spotify account of course)

Ideally yes they would, but Spotify Playlist support is currently broken. So no.

Alright, so I can’t play a Spotify Playlist directly from mopidy on the terminal, right? So, what should I do now?
(I’m sorry if I sound stupid, I’m new to this whole configuration stuff)

I don’t know what you are trying to do so I can’t answer that. But maybe I was not clear before, Spotify playlist support is currently broken in Mopidy. Search works, and you can play anything you have a track URI for. But you do not have any access to playlists. That’s the case regardless of how you interact with Mopidy, be it using the terminal, a web client, MPD (including anything that uses MPD e.g. that Jasper thing by the looks of it).

1 Like

Thank you for your reply sir, much appreciated! Unfortunately it looks like I may have to abandon this project :frowning:

Some ETA when playlists will come back? And what happend? Or is it a “company secret”?


Bare en nyskjerrig nordmann.