Ncmpcpp (with mpd and mopidy-youtube) does not give search results

Greetings.

I have installed mpd, ncmpcpp, mopidy and mopidy-youtube (yay).

I start mpd and mopidy with systemd (systemwide for mopidy and --user flag for mpd)

I could search for songs on youtube with no problem, however, when I rebooted search suddenly doesn’t work. It only says No results found

Here are my configs

~/.config/mpd/mpd.conf

bind_to_address “127.0.0.1”

pid_file “~/.config/mpd/pid”
db_file “~/.config/mpd/database”
state_file “~/.config/mpd/state”
playlist_directory “~/.config/mpd/playlists”
music_directory “/home/kim/Music”

audio_output {
type “pipewire”
name “PipeWire Sound Server”

~/.config/ncmpcpp/config

##############################################################

This is an example configuration file. Copy it to

$XDG_CONFIG_HOME/ncmpcpp/config or $HOME/.ncmpcpp/config

and set up your preferences.

##############################################################

directories

Directory for storing ncmpcpp related files. Changing it is useful if you

want to store everything somewhere else and provide command line setting for

alternative location to config file which defines that while launching

ncmpcpp.

#ncmpcpp_directory = ~/.config/ncmpcpp

Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other

MPD clients (eg. ncmpc) also use that location.

#lyrics_directory = ~/.lyrics

connection settings

mpd_host = 127.0.0.1

mpd_port = 6600

#mpd_connection_timeout = 5

Needed for tag editor and file operations to work.

mpd_music_dir = ~/Music

~/.config/mopidy

[youtube]
enabled = true
#allow_cache =
#youtube_api_key =
#search_results = 15
#playlist_max_videos = 20
#api_enabled = false
#channel_id =
#musicapi_enabled = true
#musicapi_cookie =
#autoplay_enabled = false
#strict_autoplay = false
#max_autoplay_length = 600
#max_degrees_of_separation = 3
#youtube_dl_package = youtube_dl

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6680
#password =
#max_connections = 20
#connection_timeout = 60
#zeroconf = Mopidy MPD server on $hostname
#command_blacklist =

listall

listallinfo

#default_playlist_scheme = m3u

This is my result when I systemctl --user status mopidy

● mopidy.service - Mopidy music server
Loaded: loaded (/usr/lib/systemd/system/mopidy.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2022-04-25 13:24:43 AEST; 13min ago
Main PID: 390 (mopidy)
Tasks: 13 (limit: 4690)
Memory: 73.1M
CPU: 556ms
CGroup: /system.slice/mopidy.service
└─390 /usr/bin/python /usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf

Apr 25 13:24:44 sway mopidy[390]: INFO 2022-04-25 13:24:44,666 [390:Audio-2 (_actor_loop)] mopidy.audio.actor
Apr 25 13:24:44 sway mopidy[390]: Audio output set to “autoaudiosink”
Apr 25 13:24:44 sway mopidy[390]: INFO 2022-04-25 13:24:44,669 [390:MainThread] mopidy.commands
Apr 25 13:24:44 sway mopidy[390]: Starting Mopidy frontends: YouTubeAutoplayer, YouTubeCoreListener, MpdFrontend, HttpFrontend
Apr 25 13:24:44 sway mopidy[390]: ERROR 2022-04-25 13:24:44,672 [390:MainThread] mopidy.commands
Apr 25 13:24:44 sway mopidy[390]: Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use
Apr 25 13:24:44 sway mopidy[390]: INFO 2022-04-25 13:24:44,672 [390:HttpFrontend-11 (_actor_loop)] mopidy.http.actor
Apr 25 13:24:44 sway mopidy[390]: HTTP server running at [::ffff:127.0.0.1]:6680
Apr 25 13:24:44 sway mopidy[390]: INFO 2022-04-25 13:24:44,672 [390:MainThread] mopidy.commands
Apr 25 13:24:44 sway mopidy[390]: Starting GLib mainloop

It seems there is something wrong with MPD startup but I’m too much of a noob to understand what’s going on.

lsof -i :6600 returns only one job

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mpd 1243 kim 9u IPv4 19257 0t0 TCP localhost:mshvlm (LISTEN)

My apologies for very messy presentation. I’m not so familiar with reporting this kind of stuffs.

Any help would be very much appreciated.

I’m just wondering do # give bold and large font? those large bold words are not supposed to be bold and large

sudo journalctl -u mopidy gives this:

[kim@sway ~]$ sudo journalctl -u mopidy
[sudo] password for kim:
Apr 24 20:53:49 sway systemd[1]: Started Mopidy music server.
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,337 [20481:MainThread] mopidy.main
Apr 24 20:53:49 sway mopidy[20481]: Starting Mopidy 3.2.0
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,345 [20481:MainThread] mopidy.config
Apr 24 20:53:49 sway mopidy[20481]: Loading config from builtin defaults
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,346 [20481:MainThread] mopidy.config
Apr 24 20:53:49 sway mopidy[20481]: Loading config from file:///etc/mopidy/mopidy.conf
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,346 [20481:MainThread] mopidy.config
Apr 24 20:53:49 sway mopidy[20481]: Loading config from command line options
Apr 24 20:53:49 sway mopidy[20481]: WARNING 2022-04-24 20:53:49,349 [20481:MainThread] mopidy.config
Apr 24 20:53:49 sway mopidy[20481]: Ignoring config section ‘local’ because no matching extension was found
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,423 [20481:MainThread] mopidy.main
Apr 24 20:53:49 sway mopidy[20481]: Enabled extensions: youtube, m3u, softwaremixer, http, mpd, stream, file
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,423 [20481:MainThread] mopidy.main
Apr 24 20:53:49 sway mopidy[20481]: Disabled extensions: none
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,468 [20481:MainThread] mopidy.commands
Apr 24 20:53:49 sway mopidy[20481]: Starting Mopidy mixer: SoftwareMixer
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,469 [20481:MainThread] mopidy.commands
Apr 24 20:53:49 sway mopidy[20481]: Starting Mopidy audio
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,469 [20481:MainThread] mopidy.commands
Apr 24 20:53:49 sway mopidy[20481]: Starting Mopidy backends: YouTubeBackend, FileBackend, M3UBackend, StreamBackend
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,470 [20481:YouTubeBackend-3 (_actor_loop)] mopidy_youtube
Apr 24 20:53:49 sway mopidy[20481]: file caching not enabled
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,472 [20481:YouTubeBackend-3 (_actor_loop)] mopidy_youtube
Apr 24 20:53:49 sway mopidy[20481]: using jAPI
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,473 [20481:Audio-2 (_actor_loop)] mopidy.audio.actor
Apr 24 20:53:49 sway mopidy[20481]: Audio output set to “autoaudiosink”
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,478 [20481:MainThread] mopidy.commands
Apr 24 20:53:49 sway mopidy[20481]: Starting Mopidy core
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,481 [20481:MainThread] mopidy.commands
Apr 24 20:53:49 sway mopidy[20481]: Starting Mopidy frontends: YouTubeAutoplayer, YouTubeCoreListener, MpdFrontend, HttpFrontend
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,482 [20481:MainThread] mopidy_mpd.actor
Apr 24 20:53:49 sway mopidy[20481]: MPD server running at [::ffff:127.0.0.1]:6600
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,483 [20481:HttpFrontend-12 (_actor_loop)] mopidy.http.actor
Apr 24 20:53:49 sway mopidy[20481]: HTTP server running at [::ffff:127.0.0.1]:6680
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,483 [20481:MainThread] mopidy.commands
Apr 24 20:53:49 sway mopidy[20481]: Starting GLib mainloop
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,485 [20481:HttpServer] mopidy.internal.path
Apr 24 20:53:49 sway mopidy[20481]: Creating dir file:///var/cache/mopidy/youtube
Apr 24 20:53:49 sway mopidy[20481]: INFO 2022-04-24 20:53:49,486 [20481:HttpServer] mopidy.internal.path
Apr 24 20:53:49 sway mopidy[20481]: Creating dir file:///var/lib/mopidy/http
Apr 24 21:01:24 sway mopidy[20481]: INFO 2022-04-24 21:01:24,339 [20481:MpdSession-13 (_actor_loop)] mopidy_mpd.session
Apr 24 21:01:24 sway mopidy[20481]: New MPD connection from [::ffff:127.0.0.1]:43778
Apr 24 21:01:29 sway mopidy[20481]: WARNING 2022-04-24 21:01:29,997 [20481:FileBackend-4 (_actor_loop)] mopidy.file.library
Apr 24 21:01:29 sway mopidy[20481]: Failed looking up file:///var/lib/mopidy/http/cookie_secret: gst-stream-error-quark: Could not determine type o>
Apr 24 21:01:34 sway mopidy[20481]: INFO 2022-04-24 21:01:34,398 [20481:YouTubeBackend-3 (_actor_loop)] mopidy_youtube
Apr 24 21:01:34 sway mopidy[20481]: browse channel / library youtube:channel:root

You seem to be mixing system service commands and user config so you need to read Running as a service — Mopidy 3.2.0-8-g145c1d1e documentation

And if you want to control Mopidy with an MPD client you need to remove mpd and install Mopidy-MPD.

1 Like

Thank you very much sir. Removing mpd and reinstalling mopidy-mpd through yay plus starting mopidy without systemd (with port edited to 6600) fixed the issue. I can finally play rick astley’s never gonna give you up without trouble.

1 Like

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