Mopidy on raspbian issue

I trying to start mopidy on raspbian as spotify alarm clock and when I type sudo mopidy it starting to run and stops on this

  • sudo mopidy
    INFO 2020-05-27 11:17:56,314 [1868:MainThread] mopidy. main
    Starting Mopidy 3.0.2
    INFO 2020-05-27 11:17:56,401 [1868:MainThread] mopidy.config
    Loading config from builtin defaults
    INFO 2020-05-27 11:17:56,415 [1868:MainThread] mopidy.config
    Loading config from file:///root/.config/mopidy/mopidy.conf
    INFO 2020-05-27 11:17:56,419 [1868:MainThread] mopidy.config
    Loading config from command line options
    INFO 2020-05-27 11:17:57,017 [1868:MainThread] mopidy. main
    Enabled extensions: stream, http, m3u, mpd, file, softwaremixer
    INFO 2020-05-27 11:17:57,018 [1868:MainThread] mopidy. main
    Disabled extensions: spotify
    WARNING 2020-05-27 11:17:57,019 [1868:MainThread] mopidy. main
    Found spotify configuration errors. The extension has been automatically disabled:
    WARNING 2020-05-27 11:17:57,020 [1868:MainThread] mopidy. main
    spotify/username must be set.
    WARNING 2020-05-27 11:17:57,021 [1868:MainThread] mopidy. main
    spotify/password must be set.
    WARNING 2020-05-27 11:17:57,022 [1868:MainThread] mopidy. main
    spotify/client_id must be set.
    WARNING 2020-05-27 11:17:57,022 [1868:MainThread] mopidy. main
    spotify/client_secret must be set.
    WARNING 2020-05-27 11:17:57,023 [1868:MainThread] mopidy. main
    Please fix the extension configuration errors or disable the extensions to silence these messages.
    INFO 2020-05-27 11:17:57,536 [1868:MainThread] mopidy.commands
    Starting Mopidy mixer: SoftwareMixer
    INFO 2020-05-27 11:17:57,547 [1868:MainThread] mopidy.commands
    Starting Mopidy audio
    INFO 2020-05-27 11:17:57,560 [1868:MainThread] mopidy.commands
    Starting Mopidy backends: FileBackend, M3UBackend, StreamBackend
    INFO 2020-05-27 11:17:57,638 [1868:Audio-2] mopidy.audio.actor
    Audio output set to “autoaudiosink”
    INFO 2020-05-27 11:17:57,676 [1868:MainThread] mopidy.commands
    Starting Mopidy core
    INFO 2020-05-27 11:17:57,752 [1868:MainThread] mopidy.commands
    Starting Mopidy frontends: HttpFrontend, MpdFrontend
    INFO 2020-05-27 11:17:57,758 [1868:HttpFrontend-8] mopidy.http.actor
    HTTP server running at [::ffff:127.0.0.1]:6680
    INFO 2020-05-27 11:17:57,772 [1868:MainThread] mopidy_mpd.actor
    MPD server running at [::ffff:127.0.0.1]:6600
    INFO 2020-05-27 11:17:57,787 [1868:MainThread] mopidy.commands
    Starting GLib mainloop

I tried to run mopidy with pimusicbox but I cannot instal there proper python to run mopidy alarm clock and on raspbian I cant even start mopidy

Without sudo Ive got same problem

Why do you think Mopidy has stopped? What are you expecting to happen? Mopidy has started and is running. The HTTP Frontend is running (but you have not installed any Web extensions according to that log) and the MPD Frontend is also running.

Also, the output when you don’t use sudo is not the same above as it will be using a different config file. Please post that log output, the above is not useful.

pi@musicbox:~ $ mopidy
INFO     2020-05-27 13:49:29,796 [13345:MainThread] mopidy.__main__
  Starting Mopidy 3.0.2
INFO     2020-05-27 13:49:30,346 [13345:MainThread] mopidy.config
  Loading config from builtin defaults
INFO     2020-05-27 13:49:30,363 [13345:MainThread] mopidy.config
  Loading config from file:///home/pi/.config/mopidy/mopidy.conf
INFO     2020-05-27 13:49:30,368 [13345:MainThread] mopidy.config
  Loading config from command line options
INFO     2020-05-27 13:49:30,860 [13345:MainThread] mopidy.__main__
  Enabled extensions: http, iris, m3u, file, mpd, alarmclock, stream, softwaremixer
INFO     2020-05-27 13:49:30,863 [13345:MainThread] mopidy.__main__
  Disabled extensions: spotify
WARNING  2020-05-27 13:49:30,866 [13345:MainThread] mopidy.__main__
  Found spotify configuration errors. The extension has been automatically disabled:
WARNING  2020-05-27 13:49:30,868 [13345:MainThread] mopidy.__main__
    spotify/username must be set.
WARNING  2020-05-27 13:49:30,871 [13345:MainThread] mopidy.__main__
    spotify/password must be set.
WARNING  2020-05-27 13:49:30,873 [13345:MainThread] mopidy.__main__
    spotify/client_id must be set.
WARNING  2020-05-27 13:49:30,875 [13345:MainThread] mopidy.__main__
    spotify/client_secret must be set.
WARNING  2020-05-27 13:49:30,877 [13345:MainThread] mopidy.__main__
  Please fix the extension configuration errors or disable the extensions to silence these messages.
INFO     2020-05-27 13:49:31,498 [13345:MainThread] mopidy.commands
  Starting Mopidy mixer: SoftwareMixer
INFO     2020-05-27 13:49:31,511 [13345:MainThread] mopidy.commands
  Starting Mopidy audio
INFO     2020-05-27 13:49:31,527 [13345:MainThread] mopidy.commands
  Starting Mopidy backends: FileBackend, M3UBackend, StreamBackend
INFO     2020-05-27 13:49:31,599 [13345:Audio-2] mopidy.audio.actor
  Audio output set to "autoaudiosink"
INFO     2020-05-27 13:49:31,659 [13345:MainThread] mopidy.commands
  Starting Mopidy core
INFO     2020-05-27 13:49:31,713 [13345:MainThread] mopidy.commands
  Starting Mopidy frontends: IrisFrontend, HttpFrontend, MpdFrontend
INFO     2020-05-27 13:49:31,719 [13345:IrisFrontend-7] mopidy_iris.core
  Starting Iris 3.49.0
INFO     2020-05-27 13:49:31,727 [13345:HttpFrontend-9] mopidy.http.actor
  HTTP server running at [::ffff:127.0.0.1]:6680
INFO     2020-05-27 13:49:31,734 [13345:MainThread] mopidy_mpd.actor
  MPD server running at [::ffff:127.0.0.1]:6600
INFO     2020-05-27 13:49:31,745 [13345:MainThread] mopidy.commands
  Starting GLib mainloop
  • my config file
#   https://docs.mopidy.com/
#
# The initial commented out values reflect the defaults as of:
#   Mopidy 3.0.2
#   Mopidy-AlarmClock 0.1.9
#   Mopidy-File 3.0.2
#   Mopidy-HTTP 3.0.2
#   Mopidy-M3U 3.0.2
#   Mopidy-MPD 3.0.0
#   Mopidy-SoftwareMixer 3.0.2
#   Mopidy-Spotify 4.0.1
#   Mopidy-Stream 3.0.2
#
# Available options and defaults might have changed since then,
# run `mopidy config` to see the current effective config and
# `mopidy --version` to check the current version.

[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]
#verbosity = 0
#format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n  %(message)s
#color = true


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

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

[alarmclock]
#enabled = true
#def_time = 8:00
#def_playlist =
#def_random = false
#def_volume = 100
#def_vol_inc_duration = 30

[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 = 0.0.0.0
#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

[spotify]
#enabled = true
#username =
#password =
#client_id =
#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 =

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

Thanks for the log file. You can see Iris is being loaded now, which is nice. So…

Mopidy has started and is running. The HTTP Frontend is running and the MPD Frontend is also running. Mopidy is ready for you to connect your client(s) to http://localhost:6680 (HTTP) or localhost:6600 (MPD). It won’t do anything until you tell it to.

You will also have to set your Spotify config settings if you want that to work.

Sorry but still dont get it :confused: If i want to connect by ip 192.168.1.xx nothing happens. Maybe Im to stupid or somthing

If you are connecting from another machine then you need to set the HTTP Frontend’s hostname config setting to allow those connections, by default only connections from the same machine are allowed as a security measure. You can read about this at https://docs.mopidy.com/en/latest/ext/http/ but it normally it requires the following:

[http]
hostname = ::

And similarly for the MPD section if you want to connect from another machine with an MPD client.

I changed hostname to :: but if I type sudo mopidyctl config its still 127.0.0.1

sudo mopidyctl config is for when working with the service. That uses a different config file compared to when running in the terminal. This is explained at https://docs.mopidy.com/en/latest/running/service/#configuration

Sorry but I still dont understand what I done wrong :confused: this wont work i started mopid and cant login through website/ip

There are two normal ways to run Mopidy. They are both documented at https://docs.mopidy.com/en/latest/running/.

  1. Which one of those two ways do you wan to run Mopidy? If you don’t know, choose the service.
  2. Are you editing the correct config file for the way you chose in 1? The webpage above explains exactly which file to edit for each way.

I runring it by just typing “mopidy” by ssh. I edited both config files

I’m going to need answers to both those questions else I’m not sure I can help any more.

I’ve got new error

ERROR 2020-05-28 08:44:59,957 [14953:MainThread] mopidy.commands
Frontend (HttpFrontend) initialization error: HTTP server startup failed: [Errno 98] Address already in use
ERROR 2020-05-28 08:44:59,962 [14953:MainThread] mopidy.commands
Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use

Either help me to help you by answering my previous questions properly.

Or, help yourself by searching the forum for the answer.