[Errno 98] Adress already in use (no good changing port in config)

Hello.

After an upgrade to Raspbian Buster I removed mopidy via APT (with --purge option) and did a fresh install of mopidy. A local scan was successful and GMPC can see local files and play them.

However, there is a main problem: I cannot connect from Mopidy Mobile on my phone. Here are some things I noticed:

  • Changing the port in the [mpd] part of the config (which is at /etc/mopidy/mopidy.conf since I run it as a service) only results in sudo netstat -n -l -p | grep XXXX adapting its output: if I set the port to 6600 the above command with XXXX = 6600 will return tcp6 0 0 :::6600 :::* LISTEN 19224/python3 , and so on

So note that unlike answers to other similar questions, in my case changing the port does not help.

  • Running sudo journalctl -u mopidy | grep error with verbosity=4 in [logging] results in

avr 07 09:04:07 raspberrypi mopidy[13599]: DEBUG [MpdSession-16] mopidy_mpd.network Unexpected client error: [Errno 32] Broken pipe

and a bunch of

avr 07 09:04:07 raspberrypi mopidy[13599]: DEBUG [MpdSession-16] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor

I believe that is related to me trying to connect from Mopidy Mobile and failing (time stamps match).

I am at a loss here. I’ve spent lots of time googling and do not know what to do. I’ll be happy to post config files whenever needed!

All help appreciated. Thank you everyone for your time and help!

EDIT: here is the output of sudo mopidyctl deps which I forgot to include:

Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf deps" as user mopidy
INFO     [MainThread] mopidy.__main__ Starting Mopidy 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: file = mopidy.file:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-File 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: http = mopidy.http:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-HTTP 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: m3u = mopidy.m3u:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-M3U 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: softwaremixer = mopidy.softwaremixer:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-SoftwareMixer 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: stream = mopidy.stream:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-Stream 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: mpd = mopidy_mpd:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-MPD 3.0.0
DEBUG    [MainThread] mopidy.ext Loading entry point: local = mopidy_local:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-Local 3.1.1
DEBUG    [MainThread] mopidy.ext Loading entry point: alsamixer = mopidy_alsamixer:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-ALSAMixer 2.0.0
DEBUG    [MainThread] mopidy.ext Discovered extensions: file, http, m3u, softwaremixer, stream, mpd, local, alsamixer
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.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.
)
INFO     [MainThread] mopidy.config Loading config from builtin defaults
INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy-local.conf
INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.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: 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: mpd
DEBUG    [MainThread] mopidy.ext Validating extension: local
DEBUG    [MainThread] mopidy.ext Validating extension: alsamixer
INFO     [MainThread] mopidy.__main__ Enabled extensions: file, local, stream, alsamixer, softwaremixer, mpd, m3u
INFO     [MainThread] mopidy.__main__ Disabled extensions: http
Executable: /usr/bin/mopidy
Platform: Linux-4.19.97-v7+-armv7l-with-debian-10.3
Python: CPython 3.7.3 from /usr/lib/python3.7
Mopidy: 3.0.2 from /usr/lib/python3/dist-packages
Mopidy-MPD: 3.0.0 from /usr/lib/python3/dist-packages
Mopidy-Local: 3.1.1 from /usr/lib/python3/dist-packages
Mopidy-ALSAMixer: 2.0.0 from /usr/lib/python3/dist-packages
GStreamer: 1.14.4.0 from /usr/lib/python3/dist-packages/gi
  Detailed information: 
    Python wrapper: python-gi 3.30.4
    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

and here is the output of sudo mopidyctl 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.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: file = mopidy.file:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-File 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: http = mopidy.http:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-HTTP 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: m3u = mopidy.m3u:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-M3U 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: softwaremixer = mopidy.softwaremixer:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-SoftwareMixer 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: stream = mopidy.stream:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-Stream 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: mpd = mopidy_mpd:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-MPD 3.0.0
DEBUG    [MainThread] mopidy.ext Loading entry point: local = mopidy_local:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-Local 3.1.1
DEBUG    [MainThread] mopidy.ext Loading entry point: alsamixer = mopidy_alsamixer:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-ALSAMixer 2.0.0
DEBUG    [MainThread] mopidy.ext Discovered extensions: file, http, m3u, softwaremixer, stream, mpd, local, alsamixer
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.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.
)
INFO     [MainThread] mopidy.config Loading config from builtin defaults
INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy-local.conf
INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.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: 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: mpd
DEBUG    [MainThread] mopidy.ext Validating extension: local
DEBUG    [MainThread] mopidy.ext Validating extension: alsamixer
INFO     [MainThread] mopidy.__main__ Enabled extensions: stream, mpd, m3u, local, alsamixer, softwaremixer, file
INFO     [MainThread] mopidy.__main__ Disabled extensions: http
[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 [%(threadName)s] %(name)s %(message)s
color = false
config_file =

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

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

[file]
enabled = true
media_dirs = 
  /media/pi/MUMAK/Musik ; changed from $XDG_MUSIC_DIR|Music [new line] ~/|Home
excluded_file_extensions = 
  .jpg
  .jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 3000

[http]
enabled = false  ; Extension disabled due to config errors.
hostname =   ; Must be a resolveable hostname or valid ip
port = 6681
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 =

[softwaremixer]
enabled = true

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

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

[local]
enabled = true
media_dir = /media/pi/MUMAK/Musik
scan_timeout = 3000
scan_flush_threshold = 100
scan_follow_symlinks = false
included_file_extensions = 
excluded_file_extensions = 
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .png
  .txt
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 = 
  *.jpg
  *.jpeg
  *.png

[alsamixer]
enabled = true
card = 0
control = Master
min_volume = 0
max_volume = 100
volume_scale = cubic

What’s going on with your http hostname config setting? Are you sure you correctly adjusted the port numbers bring used by both gmpc and mopidy-mobile after changing to these non-standard ones?

Hey there, thanks for replying!

Hmm here is how my /etc/mopidy/mopidy.config reads:

# For information about configuration values that can be set in this file see:
#
#   https://docs.mopidy.com/en/latest/config/
#
# Run `sudo mopidyctl config` to see the current effective config, based on
# both defaults and this configuration file.

[mpd]
enabled = true
hostname = ::
port = 6680

[audio]
output = alsasink

[logging]
verbosity = 4

[local]
media_dir = /media/pi/MUMAK/Musik
enabled = true
library = sqlite
scan_timeout = 3000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions = 
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .png
  .txt

[file]
enabled = true
media_dirs = /media/pi/MUMAK/Musik ; changed from $XDG_MUSIC_DIR|Music [new line] ~/|Home
excluded_file_extensions = 
  .jpg
  .jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 3000

[http]
enabled = true
hostname = :: ; changed from 127.0.0.1
port = 6681

Its weird, sudo mopidyctl config does not seem to pick up on that as we see above. Note I changed hostname in [http] to :: just like I did for the [mpd] field (because I thought we ought to do so… maybe only for mpd?).

In any case, yes, when trying to connect with Mopidy Mobile I adjusted the port numbers after I set them to the non-standard values. Note I changed these ports to non-standard values simply to check if maybe the standard 6600 was problematic, not for any particular reason.

Inline comments dont work in Mopidy v3 (see https://github.com/mopidy/mopidy/issues/1868). You need to change the hostname for both if you are using both frontends from remote devices. 6600 is only problematic if you have Mopidy (or mpd) already running. I would guess the issue here is the inline comment. I’m surprised we display an “address in use” error message for that though…

Hey there. I have removed the inline comments, sorry I did not know they were no longer allowed.

I’ve changed the ports back to 6600 and 6680 (mpd and http respectively), and both hostnames now read ::. Note I only use Mopidy Mobile from Android, nothing else. It still does not work, in the sense that Mopidy Mobile cannot connect to the server (of course I did change the port back to 6600 also there).

Here is the output of sudo systemctl status mopidy:

● mopidy.service - Mopidy music server
   Loaded: loaded (/lib/systemd/system/mopidy.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-04-07 10:47:39 CEST; 5s ago
  Process: 32228 ExecStartPre=/bin/mkdir -p /var/cache/mopidy (code=exited, status=0/SUCCESS)
  Process: 32235 ExecStartPre=/bin/chown mopidy:audio /var/cache/mopidy (code=exited, status=0/SUCCESS)
 Main PID: 32237 (mopidy)
    Tasks: 12 (limit: 2077)
   Memory: 27.2M
   CGroup: /system.slice/mopidy.service
           └─32237 /usr/bin/python3 /usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf

avr 07 10:47:42 raspberrypi mopidy[32237]:     '/mopidy/rpc': <class 'mopidy.http.handlers.JsonRpcHandler'>
avr 07 10:47:42 raspberrypi mopidy[32237]:     '/mopidy/(.+)': <class 'mopidy.http.handlers.StaticFileHandler'>
avr 07 10:47:42 raspberrypi mopidy[32237]:     '/mopidy/': <class 'mopidy.http.handlers.ClientListHandler'>
avr 07 10:47:42 raspberrypi mopidy[32237]:     '/local': <class 'mopidy.http.handlers.AddSlashHandler'>
avr 07 10:47:42 raspberrypi mopidy[32237]:     '/local/(index.html)?': <class 'mopidy_local.web.IndexHandler'>
avr 07 10:47:42 raspberrypi mopidy[32237]:     '/local/(.+)': <class 'mopidy_local.web.ImageHandler'>
avr 07 10:47:42 raspberrypi mopidy[32237]:     '/': <class 'tornado.web.RedirectHandler'>
avr 07 10:47:42 raspberrypi mopidy[32237]: DEBUG    [MpdFrontend-10] mopidy.zeroconf Zeroconf service 'Mopidy MPD server on raspberrypi' (_mpd._tcp at []:6600): Published
avr 07 10:47:42 raspberrypi mopidy[32237]: DEBUG    [HttpFrontend-9] mopidy.zeroconf Zeroconf service 'Mopidy HTTP server on raspberrypi' (_http._tcp at []:6680): Published
avr 07 10:47:42 raspberrypi mopidy[32237]: DEBUG    [HttpFrontend-9] mopidy.zeroconf Zeroconf service 'Mopidy HTTP server on raspberrypi' (_mopidy-http._tcp at []:6680): Published

The output of sudo journalctl -u mopidy | grep error remains the same.

Here is the updated config file at /etc/mopidy/mopidy.config:

# For information about configuration values that can be set in this file see:
#
#   https://docs.mopidy.com/en/latest/config/
#
# Run `sudo mopidyctl config` to see the current effective config, based on
# both defaults and this configuration file.

[mpd]
enabled = true
hostname = ::
port = 6600

[audio]
output = alsasink

[logging]
verbosity = 4

[local]
media_dir = /media/pi/MUMAK/Musik
enabled = true
library = sqlite
scan_timeout = 3000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions = 
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .png
  .txt

[file]
enabled = true
media_dirs = /media/pi/MUMAK/Musik
excluded_file_extensions = 
  .jpg
  .jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 3000

[http]
enabled = true
hostname = ::
port = 6680

with sudo mopidyctl config now returning:

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.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: file = mopidy.file:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-File 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: http = mopidy.http:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-HTTP 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: m3u = mopidy.m3u:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-M3U 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: softwaremixer = mopidy.softwaremixer:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-SoftwareMixer 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: stream = mopidy.stream:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-Stream 3.0.2
DEBUG    [MainThread] mopidy.ext Loading entry point: mpd = mopidy_mpd:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-MPD 3.0.0
DEBUG    [MainThread] mopidy.ext Loading entry point: local = mopidy_local:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-Local 3.1.1
DEBUG    [MainThread] mopidy.ext Loading entry point: alsamixer = mopidy_alsamixer:Extension
DEBUG    [MainThread] mopidy.ext Loaded extension: Mopidy-ALSAMixer 2.0.0
DEBUG    [MainThread] mopidy.ext Discovered extensions: file, http, m3u, softwaremixer, stream, mpd, local, alsamixer
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.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.
)
INFO     [MainThread] mopidy.config Loading config from builtin defaults
INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy-local.conf
INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.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: 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: mpd
DEBUG    [MainThread] mopidy.ext Validating extension: local
DEBUG    [MainThread] mopidy.ext Validating extension: alsamixer
INFO     [MainThread] mopidy.__main__ Enabled extensions: stream, http, mpd, file, local, softwaremixer, m3u, alsamixer
INFO     [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 [%(threadName)s] %(name)s %(message)s
color = false
config_file =

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

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

[file]
enabled = true
media_dirs = 
  /media/pi/MUMAK/Musik
excluded_file_extensions = 
  .jpg
  .jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 3000

[http]
enabled = true
hostname = ::
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 =

[softwaremixer]
enabled = true

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

[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

[local]
enabled = true
media_dir = /media/pi/MUMAK/Musik
scan_timeout = 3000
scan_flush_threshold = 100
scan_follow_symlinks = false
included_file_extensions = 
excluded_file_extensions = 
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .png
  .txt
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 = 
  *.jpg
  *.jpeg
  *.png

[alsamixer]
enabled = true
card = 0
control = Master
min_volume = 0
max_volume = 100
volume_scale = cubic

Is there anything else I should post ?

Hey there. Thanks for answering. Just crafted a reply with some outputs but Akismet has hidden the reply :-(.

Bottom line is: removing the inline comments does not solve the issue. I do not know that I have some other mpd already running (how could I check that maybe?) and, in any case, I only wish to access mopidy from my Mopidy Mobile on Android.

Any help would be fantastic! (I hope the other reply goes through)

Can you post a (verbosity = 2) log? Presumably there is no longer any message about address in use, correct?

Are you sure the IP displayed in Mopidy-Mobile’s server config matches your raspberry pi’s IP address?

Hey there, here is the output of a sudo journalctl -u mopidy | grep error, run after having changed verbosity to 2 in /etc/mopidy/mopidy.conf and having restarted with sudo mopidyctl restart mopidy: (is this indeed what you were referring to with a verbosity = 2 log? if not let me know and I’ll correct)

avr 07 11:57:41 raspberrypi mopidy[21059]:     command: clearerror
avr 07 11:58:35 raspberrypi mopidy[21059]: DEBUG    [MpdSession-12] mopidy_mpd.network Unexpected client error: [Errno 32] Broken pipe
avr 07 11:58:35 raspberrypi mopidy[21059]: DEBUG    [MpdSession-12] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:35 raspberrypi mopidy[21059]: DEBUG    [MpdSession-12] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:35 raspberrypi mopidy[21059]: DEBUG    [MpdSession-12] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:35 raspberrypi mopidy[21059]: DEBUG    [MpdSession-12] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:35 raspberrypi mopidy[21059]: DEBUG    [MpdSession-12] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:35 raspberrypi mopidy[21059]: DEBUG    [MpdSession-12] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:35 raspberrypi mopidy[21059]: DEBUG    [MpdSession-12] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:35 raspberrypi mopidy[21059]: DEBUG    [MpdSession-12] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:35 raspberrypi mopidy[21059]: DEBUG    [MpdSession-12] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:35 raspberrypi mopidy[21059]: DEBUG    [MpdSession-12] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:37 raspberrypi mopidy[21059]: DEBUG    [MpdSession-13] mopidy_mpd.network Unexpected client error: [Errno 32] Broken pipe
avr 07 11:58:37 raspberrypi mopidy[21059]: DEBUG    [MpdSession-13] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:37 raspberrypi mopidy[21059]: DEBUG    [MpdSession-13] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:37 raspberrypi mopidy[21059]: DEBUG    [MpdSession-13] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:37 raspberrypi mopidy[21059]: DEBUG    [MpdSession-13] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:37 raspberrypi mopidy[21059]: DEBUG    [MpdSession-13] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:37 raspberrypi mopidy[21059]: DEBUG    [MpdSession-13] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:37 raspberrypi mopidy[21059]: DEBUG    [MpdSession-13] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:37 raspberrypi mopidy[21059]: DEBUG    [MpdSession-13] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:37 raspberrypi mopidy[21059]: DEBUG    [MpdSession-13] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Unexpected client error: [Errno 32] Broken pipe
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:40 raspberrypi mopidy[21059]: DEBUG    [MpdSession-14] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:43 raspberrypi mopidy[21059]: DEBUG    [MpdSession-15] mopidy_mpd.network Unexpected client error: [Errno 32] Broken pipe
avr 07 11:58:43 raspberrypi mopidy[21059]: DEBUG    [MpdSession-15] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:43 raspberrypi mopidy[21059]: DEBUG    [MpdSession-15] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:43 raspberrypi mopidy[21059]: DEBUG    [MpdSession-15] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:43 raspberrypi mopidy[21059]: DEBUG    [MpdSession-15] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:43 raspberrypi mopidy[21059]: DEBUG    [MpdSession-15] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:43 raspberrypi mopidy[21059]: DEBUG    [MpdSession-15] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:43 raspberrypi mopidy[21059]: DEBUG    [MpdSession-15] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:43 raspberrypi mopidy[21059]: DEBUG    [MpdSession-15] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:43 raspberrypi mopidy[21059]: DEBUG    [MpdSession-15] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:43 raspberrypi mopidy[21059]: DEBUG    [MpdSession-15] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor
avr 07 11:58:43 raspberrypi mopidy[21059]: DEBUG    [MpdSession-15] mopidy_mpd.network Already stopping: Unexpected client error: [Errno 9] Bad file descriptor

Note the error is still in there, since I tried to connect with Mopidy Mobile right after I restarted the service (and yes indeed the IP adress matches perfectly: I am also able to access the PI e.g. via SSH on that IP).

Also, here is what sudo systemctl status mopidy now looks like:

● mopidy.service - Mopidy music server
   Loaded: loaded (/lib/systemd/system/mopidy.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-04-07 11:57:37 CEST; 4min 16s ago
  Process: 21055 ExecStartPre=/bin/mkdir -p /var/cache/mopidy (code=exited, status=0/SUCCESS)
  Process: 21056 ExecStartPre=/bin/chown mopidy:audio /var/cache/mopidy (code=exited, status=0/SUCCESS)
 Main PID: 21059 (mopidy)
    Tasks: 13 (limit: 2077)
   Memory: 25.6M
   CGroup: /system.slice/mopidy.service
           └─21059 /usr/bin/python3 /usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf

avr 07 12:01:53 raspberrypi mopidy[21059]:     single: 0
avr 07 12:01:53 raspberrypi mopidy[21059]:     consume: 0
avr 07 12:01:53 raspberrypi mopidy[21059]:     playlist: 0
avr 07 12:01:53 raspberrypi mopidy[21059]:     playlistlength: 0
avr 07 12:01:53 raspberrypi mopidy[21059]:     xfade: 0
avr 07 12:01:53 raspberrypi mopidy[21059]:     state: stop
avr 07 12:01:53 raspberrypi mopidy[21059]:     OK
avr 07 12:01:53 raspberrypi mopidy[21059]: DEBUG    [MpdSession-11] mopidy_mpd.session Request from [::1]:55024: idle
avr 07 12:01:53 raspberrypi mopidy[21059]: DEBUG    [MpdSession-11] mopidy_mpd.session Request from [::1]:55024: noidle
avr 07 12:01:53 raspberrypi mopidy[21059]: DEBUG    [MpdSession-11] mopidy_mpd.session Response to [::1]:55024: OK

What I get when clicking on Mopidy from the Pi’s app menu now is:

ERROR    2020-04-07 12:02:31,903 [15049:MainThread] mopidy.commands
  Frontend (HttpFrontend) initialization error: HTTP server startup failed: [Errno 98] Address already in use
ERROR    2020-04-07 12:02:31,905 [15049:MainThread] mopidy.commands
  Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use

(note this is equivalent to running mopidy in a terminal, but I believe this is of course different from running it as a service, which is what I want anyway)

To me that log looks like there’s a non-MPD client connecting to the MPD port. Is the port definitely 6680 in Mopidy-Mobile? it would also help if you could close gmpc, or whatever MPD client is sending that clearerror and status commands. And please show the entire log from Mopidy startup, not just the errors.

Hey there. Thanks for sticking with me. So:

  • yes the port in Mopidy Mobile is the same as in the [mpd] part of the config file for the service (also printed out by sudo mopidyctl config). So for example, the config file contains:
[mpd]
port = 6600

and in Mopidy Mobile I see ws://192.168.1.6:6600/mopidy/ws/. They match (I have changed them back to the default 6600 now, to no availl though).

  • with GMPC closed on the RPi3, I restart the service and this provides me with the following, full log with verbosity set to 2 (where after restarting I tried to connect from Mopidy Mobile): https://we.tl/t-Nt7oHGgzIY [the log is long, and I cannot seem to copy paste it here … hence the wetransfer, but let me know if you prefer I do otherwise]

But Mopidy-Mobile is an HTTP client. it needs to be configured to use Mopidy’s HTTP port i.e. 6680. It should be picking this up automatically via zeroconf, but perhaps you need to refresh that in the server settings (swipe down) now you’ve reverted your Mopidy config to the default.

Oh well damn it, I am so, so embarrassed. For some reason I never questioned the idea that Mopidy Mobile was an MPD client, which I do not know how I got into my head.

I am able to connect now when specifying the HTTP port of the config, of course.

Sorry for wasting your time on this; please note I wasn’t hasty and had done research and all, but I have been using this for more than a year now and did not question these basics (which apparently I got mixed up).

Thank you for all your help, I really appreciate it!

No worries, we got there in the end. I blame zeroconf being too magical. Looking back, I should have realised the confusion earlier.

Thanks, kingosticks!