UPDATE: I’ve replaced this post with a hopefully clearer, newer post. This post may be useful as background, but please refer to the later post,
music-not-accessible-after-successful-index-and-reboot-t11038.html
for a clearer statement and more details.
This is an ongoing problem I have seen for possibly a year. I’ve been using volumio for a couple of years and have 2 systems. When I upgrade volumio, my music library often becomes empty and I have to re-index. Most recently, upon upgrade to version 2.502, I’ve been unable to successfully reindex. I suspect the problem may be mpd, related to a pretty large music database (over 200,000 tracks). Overall technical details follow:
- I have 2 volumio systems: both have the same music source, a NFS mounted large music directory. one system is a raspberry pi 3 model B rev 1.2. It uses USB for audio out to a stereo. (this one was successfully upgraded to volumio 2.457 from 2.3something, and the upgrade worked fine out of the box, no reindex needed.) The second is a raspberry pi 2 model B rev 1.1. It has a justboom digi-hat with an optical interface to an external DAC. This system has been consistently problematic on upgrades multiple times in the last year, generally requiring a re-index, and often a factory reset. This second system is currently down, having lost its index on upgrade and failing to re-index (it got up to about 70,000 tracks, I left it overnight, and the next morning my music library was empty and the indexing has stopped.) The system is accessible via web interface and ssh, but under “my music”, while the network share is mounted successful (df -k confirms this), there are no artists, albums, tracks. rebooting doesn’t help (heck, a complete fresh factory install did not index successfully). mpd is currently the most active process on the cpu, using about 20% of the cpu (but see the error messages below).
So the sequence for this upgrade:
- used UI to download and upgrade volumio. After upgrade, I had no music library. Attempted to reindex: UI reported it was indexing, but no tracks showed up. After several attempts, gave up and downloaded a fresh 2.502, installed it on an SD card, and did a fresh install. Set up a static IP, and successfully mounted the music NFS share. Started a music index and it ran for several hours, getting up to about70,000 tracks. But the next morning, the index task had vanished and the music library was empty again.
- the music server is also a raspberry pi model 2, and is serving both SMB and NFS. I use NFS on both pi’s.
- /var/log/volumio.log shows constantly updating (every 4-5 seconds) info messages, info: CoreCommandRouter::executeOnPlugin: mpd, getMyCollectionStats. Then periodically it shows an error that may be unrelated: Upnp client error: Error: connect ETIMEDOUT 127.0.0.1:6600 (I’m not using Upnp: while troubleshooting I disabled Upnp renderer and DLNA browser using the “my music” interface page.
I fear I’ve crossed some magic line on music database size and mpd. Its interesting that the raspberry 2 is having this problem, but not the raspberry 3 (though this may be a red herring as I think I’ve had this same error in previous upgrades on the raspberry 3. Previously, once I got an index to start, I was able to successfully complete the upgrade, but not this time.) Suggestions appreciated…
Usually, 90% of the issues on PI are due to power issues: scanning a music collection is a quite power intensive task.
Now, I might have an idea: could it be that the hat you’re using is not giving enough current to the pi?
Can you try a fresh install and not plug the hat and try to perform a rescan ?
Let me know
Thanks for the reply. I hadn’t thought about power (the volumio pi is dedicated and has no peripherals except the hat: its only providing digital bits via the justboom hat to an external DAC - no disk, no A/D. My fileserver pi has a beefy power supply of course… I’ll beef up the power on the music pi just for insurance.
But my problem is solved for now (until the next upgrade…
I saw some suspicions in other posts about win32diskimager and reinstalled my image using a fresh download and used etcher instead of diskimager to burn the SD card. etcher takes much longer, but appears to do a verfication test on its burn that diskimager does not do. After installing the SD card, setting up the networking and mounting the nfs drive, I was very careful to do absolutely nothing on the pi until the indexing completed (which took about 12 hours), and the index completed successfully.
If you start an index and the mymusic stats are not upgrading and the browse icon is not spinning, it appears the blue pop-up message indicating indexing is occurring is misleading. Also, since nothing appears to be happening for hours, its tempting to push a button to re-index or update the index, and I suspect those routines do not like interrupts or restarts.
One suggestion is for developers to think more about feedback. If you have a small music collection and it doesn’t look like anything is happening, you can just wait a few minutes to find out, but providing assurance that things are working is more important when the operation takes 12 hours. In my case, when I first tried to index, the stats for the number of disks/artists/tracks was blank, the spinning “browse” icon was not spinning, yet mpd was producing log messages, and I could not dismount the music share to try again because processes were active.
its gotten so I’m afraid to upgrade because it may mean a couple of days of struggling with indexing: its happened a half dozen times in the last year. Will keep my fingers crossed though I suspect there are still gremlins with the indexing… I’ll try another upgrade when one is available, after beefing up the music pi’s power… thanks again.
ok, hold the train. My indexing problem is not resolved. Based on the previous suggestion, I shut the music pi down and added a good ole’ plugable USB hub/pi power supply. I’ve used this hub on a pi with multiple disks and it worked perfectly. When I rebooted the pi… the music index, which had just finished today and showed over 200,000 tracks - show blank in “my music”. When I go to “browse/music library”, I get a blank screen.
Seems to me there is a significant issue here with either mpd or volumio and large indexes. I had used rune for a period, and don’t think I saw this problem there, so that would lean towards a volumio problem. I’m willing to use ssh and collect data if someone can suggest what to look for. What is going on when a music index disappears after a reboot, or an initial index build does not seem to initialize properly, even on a fresh volumio install with factory settings (other than setting up networking and mounting music)? I bet my creds as an old unix admin that this is software, not a power issue…(though that was a good suggestion to try).
ok, maybe this is more useful. I suspected the music db is indexed properly, but somehow a pointer or something was lost on my power cycle of the music pi to install a better power supply. sure enough, poking around I find my music database on volumio seems to be intact even though it looks empty in the volumio UI,
in /var/lib/mpd/music/NAS. doing a du on some of the mounted music subdirectories returns good values, and browsing the NAS database looks complete. The /var/lib/mpd/tag_cache also looks good on a simple browse. I can browse both. (du reports the tag_cache is about 30 MB.) so it appears I have a good index, but cannot access it using volumio after a reboot. so the data structures seem ok on a cursory look, but the volumio user interface shows a blank library…