You are not logged in.

#1 2020-04-19 08:40:29

enigmatic_jihad
Member
Registered: 2020-04-14
Posts: 26

[SOLVED] ncmpcpp: MPD: No Database

I've just decided to try mpd. When I installed and configure it in the first time, it worked out of the box. But after a reboot It's comes up with this mpd error. I checked my

~/.config/mpd/

folder there is a database file exist. I don't know where is MPD looking for database file. I checked

systemctl --user status mpd.service

MPD service is active and running. When I open up ncmpcpp it's saying Connected to localhost.. But no songs at all. When I'm pressing U there, it's saying

MPD: No database

How can I fix this?

Last edited by enigmatic_jihad (2020-04-21 20:28:31)

Offline

#2 2020-04-19 10:27:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,384

Re: [SOLVED] ncmpcpp: MPD: No Database

Post your config, and the output of that status command.

Offline

#3 2020-04-20 15:28:51

enigmatic_jihad
Member
Registered: 2020-04-14
Posts: 26

Re: [SOLVED] ncmpcpp: MPD: No Database

V1del wrote:

Post your config, and the output of that status command.

Here is the mpd config at ~/.config/mpd/mpd.conf

And here is the output of

systemctl --user status mpd.service

Offline

#4 2020-04-20 22:29:45

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 341
Website

Re: [SOLVED] ncmpcpp: MPD: No Database

The mpd.conf is missing some stuff,  i noticed it has no IP to bind too, and likely missing more see https://www.musicpd.org/doc/html/user.html

Offline

#5 2020-04-20 22:39:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,384

Re: [SOLVED] ncmpcpp: MPD: No Database

It doesn't need an IP to bind to it will just pick localhost:6600 by default. The status output is truncated however and I assume those first lines to be relevant, can you post that untruncated? Redirect into a file or use the --no-pager argument

To preempt a likely candidate, you did not accidentally enable the  system service of mpd? That will start beforehand, with a different configuration and block the user service. Make sure that the system service is disabled.

Last edited by V1del (2020-04-20 22:47:50)

Offline

#6 2020-04-21 14:37:32

enigmatic_jihad
Member
Registered: 2020-04-14
Posts: 26

Re: [SOLVED] ncmpcpp: MPD: No Database

V1del wrote:

It doesn't need an IP to bind to it will just pick localhost:6600 by default. The status output is truncated however and I assume those first lines to be relevant, can you post that untruncated? Redirect into a file or use the --no-pager argument

To preempt a likely candidate, you did not accidentally enable the  system service of mpd? That will start beforehand, with a different configuration and block the user service. Make sure that the system service is disabled.

Here is the untruncated output of

systemctl --user status mpd.service --no-pager -l
● mpd.service - Music Player Daemon
     Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2020-04-21 08:44:22 +06; 11h ago
       Docs: man:mpd(1)
             man:mpd.conf(5)
   Main PID: 414 (mpd)
     CGroup: /user.slice/user-1000.slice/user@1000.service/mpd.service
             └─414 /usr/bin/mpd --no-daemon

Apr 21 08:44:23 MoP mpd[414]: Apr 21 08:44 : exception: Default TCP listener setup failed, but this is okay because we have a $XDG_RUNTIME_DIR listener: Failed to bind to '[::]:6600'
Apr 21 08:44:23 MoP mpd[414]: Apr 21 08:44 : exception: Failed to bind socket: Address already in use
Apr 21 08:44:23 MoP mpd[414]: Apr 21 08:44 : exception: Decoder plugin 'wildmidi' is unavailable: configuration file does not exist: /etc/timidity/timidity.cfg
Apr 21 08:44:23 MoP mpd[414]: Apr 21 08:44 : exception: Input plugin 'tidal' is unavailable: No Tidal application token configured
Apr 21 08:44:23 MoP mpd[414]: Apr 21 08:44 : exception: Input plugin 'qobuz' is unavailable: No Qobuz app_id configured
Apr 21 08:44:20 MoP systemd[403]: Starting Music Player Daemon...
Apr 21 08:44:22 MoP systemd[403]: Started Music Player Daemon.

Last edited by enigmatic_jihad (2020-04-21 14:39:21)

Offline

#7 2020-04-21 15:37:53

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 341
Website

Re: [SOLVED] ncmpcpp: MPD: No Database

Thanks for correcting me v1del, I’ve used the same mpd.conf for years and guess I’m just accustomed to seeing those lines ; bind too address  & port. Regards.

Op
You could try

mpc update /path/to/mpdmusicdir

to update/create dB
The plugin warnings don’t matter however bind to already in use could be a factor, is MPD running elsewhere on your local network ?

Last edited by cirrus (2020-04-21 15:43:12)

Offline

#8 2020-04-21 16:18:12

enigmatic_jihad
Member
Registered: 2020-04-14
Posts: 26

Re: [SOLVED] ncmpcpp: MPD: No Database

cirrus wrote:

is MPD running elsewhere on your local network ?

I guess not. As I use ncmpcpp, I tried with

ncmpcpp update ~/Music

But it doesn't change anything.

Offline

#9 2020-04-21 17:22:21

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 341
Website

Re: [SOLVED] ncmpcpp: MPD: No Database

Then see what’s using port 6600
Maybe you enabled service with sudo ?
hence MPD is already running similar to https://bbs.archlinux.org/viewtopic.php … 7#p1884997

Offline

#10 2020-04-21 18:33:22

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,854

Re: [SOLVED] ncmpcpp: MPD: No Database

netstat -tulpn | grep -E '(mpd|6600)'

Offline

#11 2020-04-21 20:24:30

enigmatic_jihad
Member
Registered: 2020-04-14
Posts: 26

Re: [SOLVED] ncmpcpp: MPD: No Database

cirrus wrote:

Then see what’s using port 6600
Maybe you enabled service with sudo ?
hence MPD is already running similar to https://bbs.archlinux.org/viewtopic.php … 7#p1884997

Yep, the problem was same I guess.

I try to stop and disable the mpd service with

sudo systemctl stop mpd.service && sudo systemctl disable mpd.service

and get output with an warning.

 Warning: Stopping mpd.service, but it can still be activated by: mpd.socket

Then I try to locate system mpd.socket with

locate mpd.socket

and get

/home/kai/.cache/yay/mpd-git/src/mpd/systemd/system/mpd.socket
/usr/lib/systemd/system/mpd.socket
/usr/lib/systemd/user/mpd.socket

I remove the system's mpd.socket from /usr/lib/ and start the mpd service as user with

systemctl --user start mpd.service && systemctl --user enable mpd.service

It didn't fix the problem right away. I does require a reboot.
Thanks guys. smile

Last edited by enigmatic_jihad (2020-04-21 20:26:52)

Offline

#12 2020-04-22 00:02:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,384

Re: [SOLVED] ncmpcpp: MPD: No Database

You shouldn't manually remove system files and the problem will likely return when the mpd package updates, just disable the socket as well:

systemctl disable mpd.socket

Offline

#13 2020-04-22 07:35:00

enigmatic_jihad
Member
Registered: 2020-04-14
Posts: 26

Re: [SOLVED] ncmpcpp: MPD: No Database

V1del wrote:

You shouldn't manually remove system files and the problem will likely return when the mpd package updates, just disable the socket as well:

systemctl disable mpd.socket

Thanks smile I'm learning about things.

Offline

Board footer

Powered by FluxBB