You are not logged in.

#1 2023-06-20 10:36:27

aurel
Member
Registered: 2023-06-20
Posts: 24

MPD Error: No Database - Solved

I have gone through, I believe, every single forum post on this topic without any luck. When I run mpc update, I get this error message. I also cannot do mpd kill as I get the error message <exception: unable to read the pid from file "/home/aurel/.config/mpd/pid": No such file or directory". This happens agnostic to my config file and the default config, my config, the default config on the arch wiki and someone elses working config all had this issue. This happens with both mpd.socker and mpd.service started and enabled. I have manually touched all of the files in question, I have used /home/aurel/ instead of ~ because someone said to do that in a post.

Last edited by aurel (2023-09-01 18:48:15)

Offline

#2 2023-06-20 10:44:03

aurel
Member
Registered: 2023-06-20
Posts: 24

Re: MPD Error: No Database - Solved

For anyone having the same problem, I did :
sudo killall mpd
and mpd /PATH_TO_mpd.conf

And it worked !

After Reboot it doesnt work anymore

Last edited by aurel (2023-06-20 18:43:50)

Offline

#3 2023-06-20 10:45:49

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

Re: MPD Error: No Database - Solved

Did you make sure to not start the system wide mpd instance, but the user instance? https://wiki.archlinux.org/title/Music_ … th_systemd

If you run

systemctl enable mpd.{service/socket}

without the --user you are enabling the system wide instance, disable those and enable the user specific one.

Also post your config if that isn't it and which location you used.

Offline

#4 2023-06-20 10:46:56

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: MPD Error: No Database - Solved

aurel wrote:

This happens with both mpd.socker and mpd.service started and enabled.

The system services or the user services?

Offline

#5 2023-06-20 18:48:53

aurel
Member
Registered: 2023-06-20
Posts: 24

Re: MPD Error: No Database - Solved

V1del wrote:

Did you make sure to not start the system wide mpd instance, but the user instance? https://wiki.archlinux.org/title/Music_ … th_systemd

If you run

systemctl enable mpd.{service/socket}

without the --user you are enabling the system wide instance, disable those and enable the user specific one.

Also post your config if that isn't it and which location you used.

I don't know if its user enable or no, its automatically started when I login and I don't manage to find where +  I can kill it with

sudo killall mpd

  but when i try to restart it with mpd /path/to/mpd.conf it doesnt work Failed to Bind to socket etc.
i managed to get it working once by telling mpd which config file to use and it worked so not a problem with the config just it doesnt starts with the right oe at startup. My config is located in /home/aurel/.config/mpd/mpd.conf.

Offline

#6 2023-06-20 18:55:26

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

Re: MPD Error: No Database - Solved

If you need sudo to kill it then it's the system service. Do a

sudo systemctl disable mpd.{socket,service} --now

and if you want it autostarted "properly" as your user do a

systemctl --user enable mpd.service --now

Note the lack of sudo and the --user addition. Generally which command did or do you use to enable the service and which guides are you following to set this up?

Last edited by V1del (2023-06-20 18:57:17)

Offline

#7 2023-06-20 19:07:45

aurel
Member
Registered: 2023-06-20
Posts: 24

Re: MPD Error: No Database - Solved

V1del wrote:

If you need sudo to kill it then it's the system service. Do a

sudo systemctl disable mpd.{socket,service} --now

and if you want it autostarted "properly" as your user do a

systemctl --user enable mpd.service --now

Note the lack of sudo and the --user addition. Generally which command did or do you use to enable the service and which guides are you following to set this up?

I tryed what you said but it doesn't work apparently

[aurel@archlinux ~cf/mpd]$ sudo systemctl disable mpd.{socket,service} --now
[aurel@archlinux ~cf/mpd]$ systemctl --user enable mpd.service --now
Job for mpd.service failed because the control process exited with error code.
See "systemctl --user status mpd.service" and "journalctl --user -xeu mpd.service" for details.

I dont know it start mpd automaticly. I followed this tutorial https://computingforgeeks.com/how-to-co … -on-linux/ .
I'm gonna add that I'm using LARBS by LukeSmith https://larbs.xyz/ . i deleted both of his config to make mines.

Offline

#8 2023-06-20 19:12:05

aurel
Member
Registered: 2023-06-20
Posts: 24

Re: MPD Error: No Database - Solved

aurel wrote:
V1del wrote:

If you need sudo to kill it then it's the system service. Do a

sudo systemctl disable mpd.{socket,service} --now

and if you want it autostarted "properly" as your user do a

systemctl --user enable mpd.service --now

Note the lack of sudo and the --user addition. Generally which command did or do you use to enable the service and which guides are you following to set this up?

I tryed what you said but it doesn't work apparently

[aurel@archlinux ~cf/mpd]$ sudo systemctl disable mpd.{socket,service} --now
[aurel@archlinux ~cf/mpd]$ systemctl --user enable mpd.service --now
Job for mpd.service failed because the control process exited with error code.
See "systemctl --user status mpd.service" and "journalctl --user -xeu mpd.service" for details.

I dont know it start mpd automaticly. I followed this tutorial https://computingforgeeks.com/how-to-co … -on-linux/ .
I'm gonna add that I'm using LARBS by LukeSmith https://larbs.xyz/ . i deleted both of his config to make mines.

basically it was working one time when i managed to kill it them launch it specifying the mpd.conf path to use but after reboot it doesnt work and i think if i could managed to get it launch with the right config it'll work

Offline

#9 2023-06-20 19:12:30

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

Re: MPD Error: No Database - Solved

Look at the mentioned status command, there's likely something off in the config now. And in general read the wiki instead of blog posts, blog posts usually get quite a few things wrong.

Offline

#10 2023-06-20 19:13:47

aurel
Member
Registered: 2023-06-20
Posts: 24

Re: MPD Error: No Database - Solved

+ my audio isnt working rn | my bad it works

Last edited by aurel (2023-06-20 19:14:48)

Offline

#11 2023-06-20 19:17:20

aurel
Member
Registered: 2023-06-20
Posts: 24

Re: MPD Error: No Database - Solved

V1del wrote:

Look at the mentioned status command, there's likely something off in the config now. And in general read the wiki instead of blog posts, blog posts usually get quite a few things wrong.

[aurel@archlinux ~]$ systemctl --user status mpd.service
× mpd.service - Music Player Daemon
     Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2023-06-20 21:02:28 CEST; 12min ago
TriggeredBy: × mpd.socket
       Docs: man:mpd(1)
             man:mpd.conf(5)
    Process: 16930 ExecStart=/usr/bin/mpd --systemd (code=exited, status=1/FAILURE)
   Main PID: 16930 (code=exited, status=1/FAILURE)
        CPU: 43ms

Jun 20 21:02:28 archlinux systemd[311]: Starting Music Player Daemon...
Jun 20 21:02:28 archlinux mpd[16930]: Ignoring the 'pid_file' setting in systemd mode
Jun 20 21:02:28 archlinux mpd[16930]: Jun 20 21:02 : exception: Failed to bind to '127.0.0.1:6600'; Failed to bind socket: Address already in >
Jun 20 21:02:28 archlinux systemd[311]: mpd.service: Main process exited, code=exited, status=1/FAILURE
Jun 20 21:02:28 archlinux systemd[311]: mpd.service: Failed with result 'exit-code'.
Jun 20 21:02:28 archlinux systemd[311]: Failed to start Music Player Daemon.

I'm not really confident on arch rn bc im a beginner so reading the wiki can be overwhelming bc i dont understand what to do sometime

Offline

#12 2023-06-20 19:20:14

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

Re: MPD Error: No Database - Solved

Please post the output of

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
systemctl --user status mpd.service
ps aux | grep mpd

Offline

#13 2023-06-20 19:25:12

aurel
Member
Registered: 2023-06-20
Posts: 24

Re: MPD Error: No Database - Solved

seth wrote:

Please post the output of

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
systemctl --user status mpd.service
ps aux | grep mpd
[aurel@archlinux ~]$ find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
dbus-org.freedesktop.nm-dispatcher.service | system
dbus-org.freedesktop.timesync1.service   | system
gcr-ssh-agent.socket                     | sockets.target.wants
getty@tty1.service                       | getty.target.wants
gnome-keyring-daemon.socket              | sockets.target.wants
NetworkManager.service                   | multi-user.target.wants
NetworkManager-wait-online.service       | network-online.target.wants
p11-kit-server.socket                    | sockets.target.wants
pipewire-session-manager.service         | user
pipewire.socket                          | sockets.target.wants
pulseaudio.socket                        | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
systemd-timesyncd.service                | sysinit.target.wants
wireplumber.service                      | pipewire.service.wants
[aurel@archlinux ~]$ ps aux | grep mpd
aurel      15655  0.0  0.2 587636 18932 ?        Ssl  20:59   0:00 mpd
aurel      15683  0.0  0.0   7508  3584 tty1     S    20:59   0:00 /bin/sh /home/aurel/.local/bin/statusbar/sb-mpdup
aurel      28097  0.0  0.0   6580  2304 pts/2    R+   21:24   0:00 grep --color=auto mpd

Offline

#14 2023-06-20 19:33:04

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

Re: MPD Error: No Database - Solved

There's an mpd process running started by your user.
1. Kill that
2. What starts it?

Offline

#15 2023-06-20 19:36:11

aurel
Member
Registered: 2023-06-20
Posts: 24

Re: MPD Error: No Database - Solved

seth wrote:

There's an mpd process running started by your user.
1. Kill that
2. What starts it?

I managed to kill it and start it by specifying the config file and it works. But i don't what starts it bc i removed it from my .xprofile and i dont know where it could be started

I rebooted and it is still working but i dont know how it starts

Last edited by aurel (2023-06-20 19:39:02)

Offline

#16 2023-06-20 19:39:48

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

Re: MPD Error: No Database - Solved

Might have been lingering from the .xprofile.
Log out, restart the session, check the status of the mpd user service.

Offline

#17 2023-06-20 19:48:35

aurel
Member
Registered: 2023-06-20
Posts: 24

Re: MPD Error: No Database - Solved

seth wrote:

Might have been lingering from the .xprofile.
Log out, restart the session, check the status of the mpd user service.

It didn't stopped when i quitted dwm the music was still playing

[aurel@archlinux ~]$ systemctl --user status mpd.service
● mpd.service - Music Player Daemon
     Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; preset: enabled)
     Active: active (running) since Tue 2023-06-20 21:37:31 CEST; 8min ago
TriggeredBy: ● mpd.socket
       Docs: man:mpd(1)
             man:mpd.conf(5)
   Main PID: 317 (mpd)
      Tasks: 8 (limit: 9388)
     Memory: 68.4M
        CPU: 17.776s
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/mpd.service
             └─317 /usr/bin/mpd --systemd

Jun 20 21:37:31 archlinux systemd[310]: Starting Music Player Daemon...
Jun 20 21:37:31 archlinux mpd[317]: Ignoring the 'pid_file' setting in systemd mode
Jun 20 21:37:31 archlinux systemd[310]: Started Music Player Daemon.

Offline

#18 2023-06-20 19:52:53

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

Re: MPD Error: No Database - Solved

Did you fully log out (of all sessions) or enable lingering?
https://wiki.archlinux.org/title/System … _instances

ls /var/lib/systemd/linger

Offline

#19 2023-06-20 19:59:27

aurel
Member
Registered: 2023-06-20
Posts: 24

Re: MPD Error: No Database - Solved

seth wrote:

Did you fully log out (of all sessions) or enable lingering?
https://wiki.archlinux.org/title/System … _instances

ls /var/lib/systemd/linger

I dont know how but its working perfectly fine so tis ok
I dont have ligenring enable

Offline

#20 2023-06-20 20:09:33

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

Re: MPD Error: No Database - Solved

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB