Can not make MPD rebuild library

Please report any bug found here

Can not make MPD rebuild library

Postby number9 » 19 Jun 2015, 23:06

This is on a Raspberry Pi.

I was having a problem a while back where I could not get MPD to rebuild the library after I made a network mount change. (I moved the server).

Ok, so I formatted the SD card and installed RuneAudio from scratch. I then upgraded with the nightly build. I then added my mount back, which it accepted and from the command line I can see the network mount (NFS). When I go to "Menu" -> "Sources" and click on the large "Rebuild MPD Library" nothing happens. I have left it on for days, and no songs will be added.

As a note, I know the NFS server works as I can mount it from any of my other linux machines. Again, I can go to the command line and see the network share and see the files. For example, when I type "mount" at the CLI, I see my NFS server:

192.168.169.8://mnt/space/share/audiobackup on /mnt/MPD/NAS/AudioBackup type nfs (ro,noatime,vers=3,rsize=16384,wsize=16384,namlen=255,acregmin=1,acregmax=1,acdirmin=1,acdirmax=1,soft,proto=tcp,timeo=50,retrans=2,sec=sys,mountaddr=192.168.169.8,mountvers=3,mountport=33160,mountproto=udp,local_lock=none,addr=192.168.169.8)

if I do an ls on /mnt/MPD/NAS/AudioBackup I see the files.
df -h shows:
192.168.169.8://mnt/space/share/audiobackup 917G 680G 191G 79% /mnt/MPD/NAS/AudioBackup

But again, when I click on "Rebuild MPD Library" I get nothing and the machine does not start doing anything (checking with top, ps aux, etc, etc).

debug info http://pastebin.com/VyKzYfiF

How can I manually force MPD to rebuild the library?

Thanks.
number9
 
Posts: 12
Joined: 03 May 2015, 15:25

Re: Can not make MPD rebuild library

Postby hondagx35 » 20 Jun 2015, 22:09

Hi number9,

you can manually update the library with:
Code: Select all
mpc update


What is the output from:
Code: Select all
mpc listall

Do you see your songs here?

But again, when I click on "Rebuild MPD Library" I get nothing and the machine does not start doing anything (checking with top, ps aux, etc, etc).

What do expect to happen?
On the left bottom near the library there should be a spinning wheel while updating, but this is all.

Your debug log looks good so far.

Frank
User avatar
hondagx35
Moderator
 
Posts: 2643
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Can not make MPD rebuild library

Postby number9 » 20 Jun 2015, 22:24

root@192.168.169.10's password:
=============== RuneOS distribution ===============
____ _ _ _
| _ \ _ _ _ __ ___ / \ _ _ __| (_) ___
| |_) | | | | '_ \ / _ \ / _ \| | | |/ _` | |/ _ \
| _ <| |_| | | | | __// ___ \ |_| | (_| | | (_) |
|_| \_\\__,_|_| |_|\___/_/ \_\__,_|\__,_|_|\___/

================ http://www.runeaudio.com ================
RuneOs: 0.3-beta (build 20141029)
RuneUI: 1.3
Hw-env: RaspberryPi

[root@runeaudio ~]# mpc update
Updating DB (#1) ...
volume: 88% repeat: off random: off single: off consume: off
[root@runeaudio ~]# mpc listall
[root@runeaudio ~]#

I will also note, when I do the mpc update command, nothing happens (e.g. if I have another terminal open and am running top or "ps aux" I see no new processes spawned after an update). Shouldn't it be going off and reading through the dirs building the database?

As for the "What do I expect" question, I expect to see the spinning wheel while updating in the bottom, but that is not what happens. Again, this was working, but I formatted and reinstalled and updated and now it does not work. I find it most odd that I can see the songs on the CLI. The NFS share is mounted, and in fact I can ls the dirs and see the music, but it is like MPD is not updating.

Thanks.
number9
 
Posts: 12
Joined: 03 May 2015, 15:25

Re: Can not make MPD rebuild library

Postby hondagx35 » 20 Jun 2015, 22:42

Hi number9,

I see no new processes spawned after an update

This is normal, because mpd does not start a new process for the update.

Did you check your permissions on the NFS share?
Running commands like "ls" or "mount" you are root on the PI.
MPD has it's own user called mpd, so maybe it is a permission problem.

Frank
User avatar
hondagx35
Moderator
 
Posts: 2643
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Can not make MPD rebuild library

Postby number9 » 21 Jun 2015, 00:02

OK, so I ditched the NFS idea, and setup a samba server on the server. This seems to have worked. I am not sure how to fix the NFS problem, as there are built in users on the server at the same UID as the mpd user on runeuaudio (and I would have thought that runeaudio would have moved the UID to something more reasonable like 1000+)... still, even setting anonuid and anongid settings in the nfs server would not fix the permissions problem. I find it odd that it worked the first time. Still, CIFS/Samba seems to be working for now.

I would suggest attempting to fix the nfs problems, as it is most useful (particularly since it is an option). Thanks.
number9
 
Posts: 12
Joined: 03 May 2015, 15:25

Re: Can not make MPD rebuild library

Postby gkkpch » 22 Jun 2015, 21:13

Hi number9,

it seems we have very similar problems http://www.runeaudio.com/forum/port-runeaudio-to-odroid-c1-arm-v7-t1102-110.html#p7392.
User 'mpd' should be given permissions on the NFS Server as MPD uses 'mpd' to access the server.
Could you check what your file owner and group are on your mounted share?
I believe there is a mismatch, in my case it shows root:root and I have not seen yet how that can work without stopping 'mpd' to work.
Currently the mount seems to work (getting a green tick on the UI), but when MPD tries to update the library, it might get a permissons error like in my case as it is using 'mpd' and stops. Nothing happens.

You could check this if you temporarily set
Code: Select all
log_level "verbose"
in /etc/mpd.conf. You would see the permission error in
Code: Select all
/var/log/runeaudio/mpd.log


Odroid-C1+, 8Gb eMMC, 8Gb µSD with 32bit/384Khz Odroid-C1+ HiFi shield (PCM5102)
Odroid-C1, 8Gb µSD with DAC: XMOS 384K/32bit USB (PCM5102)
Other: 24bit/192Khz Audiophonics DAC Sabre ES9023 I2S
User avatar
gkkpch
 
Posts: 64
Joined: 19 May 2015, 11:58
Location: Switzerland

Re: Can not make MPD rebuild library

Postby number9 » 04 Jul 2015, 13:37

gkkpch wrote:Hi number9,

it seems we have very similar problems http://www.runeaudio.com/forum/port-runeaudio-to-odroid-c1-arm-v7-t1102-110.html#p7392.
User 'mpd' should be given permissions on the NFS Server as MPD uses 'mpd' to access the server.
Could you check what your file owner and group are on your mounted share?
I believe there is a mismatch, in my case it shows root:root and I have not seen yet how that can work without stopping 'mpd' to work.
Currently the mount seems to work (getting a green tick on the UI), but when MPD tries to update the library, it might get a permissons error like in my case as it is using 'mpd' and stops. Nothing happens.

You could check this if you temporarily set
Code: Select all
log_level "verbose"
in /etc/mpd.conf. You would see the permission error in
Code: Select all
/var/log/runeaudio/mpd.log




That would be a tough fix in my case as the mpd users UID on my server belongs to a system daemon. I would need to move the mpd user ID on the runeaudio or move a system service on my NFS server. I would go into a long rant about why in the world would anyone use a really low UID for a user like MPD when you know you need to mount and share via NFS, but I digress. :O
number9
 
Posts: 12
Joined: 03 May 2015, 15:25

Re: Can not make MPD rebuild library

Postby lssoares » 19 Sep 2015, 18:20

I was changing my CIFS + external configuration to a NFS one, due to the installation of a synology NAS.

Due to this change I was experiencing the same problem:

NFS mount is OK on Runeaudio UI.
Files can be seen by ls command on O/S.
When requesting MPD update, nothing happens. Tested with UI (mpd user), and O/S command mpd update logged in as root.
mpd log shows a "Permission denied" message, without specifying which user attempted the read.

The problem is on the NFS mount. If you check the filesystem you will see only root has read access to that mounting point.

Code: Select all
ls -latr /mnt/MPD/NAS/


d--------- 98 root root 20480 Sep 19 11:11 MyNFS

The easy way to make it work is to run MPD as root (Change the MPD configuration on UI). I changed it, scanned successfully my library, set the user back to MPD, and now I'm enjoying all my songs.

Probably, and I have not tried it yet, we are able to change which user mounts the NFS (instead of root, set uuid of mpd). If some of you guys find the solution following this route, please advise. I have my hands full right now.
lssoares
 
Posts: 2
Joined: 19 Sep 2015, 17:56

Re: Can not make MPD rebuild library

Postby lssoares » 19 Sep 2015, 18:39

Hmmm...after rebooting the raspberry PI, I have no sound on the amp. Looking at the UI, the song appears to be playing....but not sound at all :o

Changed the MPD configuration to use root again, and now I have sound. I guess it makes sense: mpd user still does not have O/S access to the NFS mount, so it can actually read the media. At the same time, library is built and the player shows progress while "(not) playing" the file
I'll leave like this for now as the main important thing is I'm listening to good music while working.
lssoares
 
Posts: 2
Joined: 19 Sep 2015, 17:56

Re: Can not make MPD rebuild library

Postby johnberg » 27 Oct 2016, 20:31

Hi, I am brandnew here and have a big problem:
I can't rebuild the mpd library, no spinning wheel and nothing happens.
I have a hdd with about 600 cd's with a simple folder tree.
Before I was using Volumio 1.55 and had no problems with scanning the library.
I tried the command with Putty: mpc update for manual update but get the prompt "connection failed"
Very a pitty because I love Rune because its the only one with good Spotify features.

Please can somebody help me

If I have to work with linux commands please use donkey language :oops:
johnberg
 
Posts: 10
Joined: 27 Oct 2016, 20:10

support RuneAudio Donate with PayPal

Next

Return to Bug report

Who is online

Users browsing this forum: No registered users and 0 guests