Error starting mopidy -spotify on arch linux

here is the log when running mopidy in my terminal

INFO 2021-08-07 04:38:44,575 [2038:MainThread] mopidy.main
Starting Mopidy 3.2.0
INFO 2021-08-07 04:38:44,588 [2038:MainThread] mopidy.config
Loading config from builtin defaults
INFO 2021-08-07 04:38:44,589 [2038:MainThread] mopidy.config
Loading config from file:///home/satori/.config/mopidy/mopidy.conf
INFO 2021-08-07 04:38:44,590 [2038:MainThread] mopidy.config
Loading config from command line options
WARNING 2021-08-07 04:38:44,592 [2038:MainThread] mopidy.config
Ignoring config section ‘local’ because no matching extension was found
ERROR 2021-08-07 04:38:44,593 [2038:MainThread] mopidy.internal.log
Loading logging config ‘/etc/mopidy/logging.conf’ failed. [Errno 13] Permission denied: ‘/var/log/mopidy/mopidy.log’
INFO 2021-08-07 04:38:44,682 [2038:MainThread] mopidy.main
Enabled extensions: softwaremixer, stream, file, m3u, http, mpd, spotify
INFO 2021-08-07 04:38:44,683 [2038:MainThread] mopidy.main
Disabled extensions: none
INFO 2021-08-07 04:38:44,792 [2038:MainThread] mopidy.commands
Starting Mopidy mixer: SoftwareMixer
INFO 2021-08-07 04:38:44,793 [2038:MainThread] mopidy.commands
Starting Mopidy audio
INFO 2021-08-07 04:38:44,794 [2038:MainThread] mopidy.commands
Starting Mopidy backends: FileBackend, M3UBackend, StreamBackend, SpotifyBackend
INFO 2021-08-07 04:38:44,812 [2038:Audio-2] mopidy.audio.actor
Audio output set to “autoaudiosink”
INFO 2021-08-07 04:38:44,814 [2038:SpotifyBackend-6] mopidy.internal.path
Creating dir file:///var/cache/mopidy/spotify
ERROR 2021-08-07 04:38:44,814 [2038:SpotifyBackend-6] pykka
Unhandled exception in SpotifyBackend (urn:uuid:5f754204-f1ea-4433-8079-e8c295af1539):
Traceback (most recent call last):
File “/usr/lib/python3.9/site-packages/pykka/_actor.py”, line 179, in _actor_loop
self.on_start()
File “/usr/lib/python3.9/site-packages/mopidy_spotify/backend.py”, line 50, in on_start
self._session = self._get_session(self._config)
File “/usr/lib/python3.9/site-packages/mopidy_spotify/backend.py”, line 77, in _get_session
session = spotify.Session(self._get_spotify_config(config))
File “/usr/lib/python3.9/site-packages/mopidy_spotify/backend.py”, line 110, in _get_spotify_config
spotify_config.cache_location = bytes(ext.get_cache_dir(config))
File “/usr/lib/python3.9/site-packages/mopidy/ext.py”, line 90, in get_cache_dir
path.get_or_create_dir(cache_dir_path)
File “/usr/lib/python3.9/site-packages/mopidy/internal/path.py”, line 23, in get_or_create_dir
dir_path.mkdir(mode=0o755, parents=True)
File “/usr/lib/python3.9/pathlib.py”, line 1313, in mkdir
self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: ‘/var/cache/mopidy/spotify’
ERROR 2021-08-07 04:38:44,817 [2038:MainThread] mopidy.commands
Actor died: SpotifyBackend (urn:uuid:5f754204-f1ea-4433-8079-e8c295af1539) stopped before handling the message
INFO 2021-08-07 04:38:44,817 [2038:MainThread] mopidy.commands
Starting Mopidy core
INFO 2021-08-07 04:38:44,823 [2038:MainThread] mopidy.commands
Starting Mopidy frontends: HttpFrontend, MpdFrontend
ERROR 2021-08-07 04:38:44,824 [2038:MainThread] mopidy.commands
Frontend (HttpFrontend) initialization error: HTTP server startup failed: [Errno 98] Address already in use
ERROR 2021-08-07 04:38:44,824 [2038:MainThread] mopidy.commands
Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use
INFO 2021-08-07 04:38:44,824 [2038:MainThread] mopidy.commands
Starting GLib mainloop

You’ve got a few permission problems there. If you’re running mopidy (not as a service), it’s not going to have permission to write to /var. Point it to the user’s home directory instead for those things.

It also says that there is something already running on the same port as you’re trying to use for MPD, so I assume you’re already running MPD or something.

I had removed mpd already I also enabled the serive and attempted to run it again.

This is the error now.

INFO 2021-08-07 11:36:53,699 [2686:MainThread] mopidy.main
Starting Mopidy 3.2.0
INFO 2021-08-07 11:36:53,711 [2686:MainThread] mopidy.config
Loading config from builtin defaults
INFO 2021-08-07 11:36:53,712 [2686:MainThread] mopidy.config
Loading config from file:///root/.config/mopidy/mopidy.conf
INFO 2021-08-07 11:36:53,712 [2686:MainThread] mopidy.config
Loading config from command line options
INFO 2021-08-07 11:36:53,796 [2686:MainThread] mopidy.main
Enabled extensions: http, softwaremixer, file, stream, mpd, m3u
INFO 2021-08-07 11:36:53,797 [2686:MainThread] mopidy.main
Disabled extensions: spotify
WARNING 2021-08-07 11:36:53,797 [2686:MainThread] mopidy.main
Found spotify configuration errors. The extension has been automatically disabled:
WARNING 2021-08-07 11:36:53,797 [2686:MainThread] mopidy.main
spotify/username must be set.
WARNING 2021-08-07 11:36:53,797 [2686:MainThread] mopidy.main
spotify/password must be set.
WARNING 2021-08-07 11:36:53,797 [2686:MainThread] mopidy.main
spotify/client_id must be set.
WARNING 2021-08-07 11:36:53,797 [2686:MainThread] mopidy.main
spotify/client_secret must be set.
WARNING 2021-08-07 11:36:53,797 [2686:MainThread] mopidy.main
Please fix the extension configuration errors or disable the extensions to silence these messages.
INFO 2021-08-07 11:36:53,878 [2686:MainThread] mopidy.commands
Starting Mopidy mixer: SoftwareMixer
INFO 2021-08-07 11:36:53,879 [2686:MainThread] mopidy.commands
Starting Mopidy audio
INFO 2021-08-07 11:36:53,880 [2686:MainThread] mopidy.commands
Starting Mopidy backends: FileBackend, M3UBackend, StreamBackend
INFO 2021-08-07 11:36:53,889 [2686:Audio-2] mopidy.audio.actor
Audio output set to “autoaudiosink”
INFO 2021-08-07 11:36:53,891 [2686:MainThread] mopidy.commands
Starting Mopidy core
INFO 2021-08-07 11:36:53,897 [2686:MainThread] mopidy.commands
Starting Mopidy frontends: HttpFrontend, MpdFrontend
ERROR 2021-08-07 11:36:53,898 [2686:MainThread] mopidy.commands
Frontend (HttpFrontend) initialization error: HTTP server startup failed: [Errno 98] Address already in use
ERROR 2021-08-07 11:36:53,898 [2686:MainThread] mopidy.commands
Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use
INFO 2021-08-07 11:36:53,898 [2686:MainThread] mopidy.commands
Starting GLib mainloop

There are two normal ways to run Mopidy and they are fully described here Running — Mopidy 3.2.0 documentation

It’s not clear which you are trying to do. If you are trying to run Mopidy as a service then you dont need to also run Mopidy as root in your terminal. Doing so would result in the terminal Mopidy failing to bind to the ports that are already in use by the service Mopidy, just like the error messages state.

If I don’t run it as root it throws the initial errors. After running it as root it clears that up but it keeps disabling the Spotify module with or without being root.

I have followed that link to completion and it’s still giving me problems

I still have no idea which way you want to run Mopidy. Running as root isn’t in our docs, that’s a hack.

1 Like

I was attempting to run it on my terminal initially so I can play Spotify through ncmpcpp. That’s when I got the initial errors.

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