Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Thread Closed 
Problem: Library doesn't update.
#1
Hi, first of all I would like to thank you all for all the work in Moode, it is awesome.

Now with the issue.

I use two raspberrys 3B witch the latest moode and a NAS to store my files.

Since a couple of updates I have experienced a problem trying to update the library. Whe I try to update it the Library update in progress message. There is no update running as far as I know, and it doesn't matter if I reboot the system, it always shows the same message. Trying to update a single file will show the same result. The only why it works is to completly regenerate the library each time I add an album or make some change in the folders, but I have a fairly large collection and takes a lot of time.

I have tried different browsers and they always show the same results.

Is there a way to force the updates by ssh or any other way than a complete regen of the library?

Thanks for your time.
#2
The Library update process is recorded in the Moode log. Below is what it typically looks like.

Code:
20201229 094842 worker: Job update_library
20201229 094842 mpdindex: Start
20201229 094842 thmcache: Start
20201229 094842 thmcache: Priority: Embedded cover
20201229 094842 thmcache: Res,Qual: 600px,60
20201229 094842 thmcache: Px ratio: 1
20201229 094842 thmcache: Th width: 600
20201229 094842 thmcache: Thm qual: 60
20201229 094843 thmcache: Scanning: NAS, SDCARD, UPNP, EXT4
20201229 094851 thmcache: Done: 355 folders scanned, 0 thumbs created, 355 already in cache.
20201229 094906 mpdindex: Done: indexed 331 artists, 355 albums, 4038 songs
20201229 094906 worker: Job update_library done

You can examine the Moode log using the command below.

Code:
moodeutl -l
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
#3
(12-29-2020, 02:53 PM)Tim Curtis Wrote: The Library update process is recorded in the Moode log. Below is what it typically looks like.

Code:
20201229 094842 worker: Job update_library
20201229 094842 mpdindex: Start
20201229 094842 thmcache: Start
20201229 094842 thmcache: Priority: Embedded cover
20201229 094842 thmcache: Res,Qual: 600px,60
20201229 094842 thmcache: Px ratio: 1
20201229 094842 thmcache: Th width: 600
20201229 094842 thmcache: Thm qual: 60
20201229 094843 thmcache: Scanning: NAS, SDCARD, UPNP, EXT4
20201229 094851 thmcache: Done: 355 folders scanned, 0 thumbs created, 355 already in cache.
20201229 094906 mpdindex: Done: indexed 331 artists, 355 albums, 4038 songs
20201229 094906 worker: Job update_library done

You can examine the Moode log using the command below.

Code:
moodeutl -l
Thanks for the reply.

I was going to post that I have been able to update the library after restarting MPD. But I have not been able to do it again, the Library update in progress message is back all the time.

This is the log:

20201229 141201 readMpdResponse(): error: response $str[0]=(ACK [5@0] {} unknown                                                                                                                                                                                                                                              command "undefined")
20201229 141415 waitWorker(): Start (sys-config, w_active=0)
20201229 141415 waitWorker(): End   (sys-config, w_active=0)
20201229 141736 waitWorker(): Start (sys-config, w_active=1)
20201229 141736 worker: Job clearplayhistory
20201229 141737 waitWorker(): Wait  (1)
20201229 141737 waitWorker(): End   (sys-config, w_active=0)
20201229 141740 waitWorker(): Start (sys-config, w_active=1)
20201229 141741 waitWorker(): Wait  (1)
20201229 141742 worker: Job clearsyslogs
20201229 141742 waitWorker(): Wait  (2)
20201229 141742 waitWorker(): End   (sys-config, w_active=0)
20201229 141747 waitWorker(): Start (sys-config, w_active=1)
20201229 141748 worker: Job compactdb
20201229 141748 waitWorker(): Wait  (1)
20201229 141748 waitWorker(): End   (sys-config, w_active=0)
20201229 141757 watchdog: Info: Reducing PHP fpm worker pool
20201229 141832 waitWorker(): Start (snd-config, w_active=0)
20201229 141832 waitWorker(): End   (snd-config, w_active=0)
20201229 141902 waitWorker(): Start (snd-config, w_active=1)
20201229 141903 waitWorker(): Wait  (1)
20201229 141903 worker: Job upnpsvc
20201229 141904 waitWorker(): Wait  (2)
20201229 141904 waitWorker(): End   (snd-config, w_active=0)
20201229 141925 waitWorker(): Start (mpd-config, w_active=0)
20201229 141925 waitWorker(): End   (mpd-config, w_active=0)
20201229 142047 readMpdResponse(): error: fgets failure ()
20201229 142115 waitWorker(): Start (snd-config, w_active=0)
20201229 142115 waitWorker(): End   (snd-config, w_active=0)
20201229 142115 waitWorker(): Start (snd-config, w_active=0)
20201229 142115 waitWorker(): End   (snd-config, w_active=0)
20201229 142140 waitWorker(): Start (snd-config, w_active=1)
20201229 142141 waitWorker(): Wait  (1)
20201229 142141 worker: Job upnpsvc
20201229 142142 waitWorker(): Wait  (2)
20201229 142142 waitWorker(): End   (snd-config, w_active=0)
20201229 142150 waitWorker(): Start (snd-config, w_active=1)
20201229 142151 waitWorker(): Wait  (1)
20201229 142151 worker: Job mpdrestart
20201229 142152 waitWorker(): Wait  (2)
20201229 142152 waitWorker(): End   (snd-config, w_active=0)
20201229 142203 worker: Job update_library
20201229 142203 mpdindex: Start
20201229 142203 thmcache: Start
20201229 142204 thmcache: Priority: Embedded cover
20201229 142204 thmcache: Res,Qual: Auto
20201229 142204 thmcache: Px ratio: 1
20201229 142204 thmcache: Th width: 100
20201229 142204 thmcache: Thm qual: 75
20201229 142204 thmcache: Scanning: NAS, SDCARD, UPNP
20201229 142601 thmcache: Done: 8534 folders scanned, 15 thumbs created, 8519 al                                                                                                                                                                                                                                             ready in cache.
20201229 142945 waitWorker(): Start (sys-config, w_active=0)
20201229 142945 waitWorker(): End   (sys-config, w_active=0)
20201229 143747 mpdindex: Done: indexed 8297 artists, 8188 albums, 190034 songs
20201229 143747 worker: Job update_library done
20201229 144017 waitWorker(): Start (sys-config, w_active=0)
20201229 144017 waitWorker(): End   (sys-config, w_active=0)
20201229 182642 waitWorker(): Start (sys-config, w_active=0)
20201229 182642 waitWorker(): End   (sys-config, w_active=0)
20201229 182707 waitWorker(): Start (sys-config, w_active=0)
20201229 182707 waitWorker(): End   (sys-config, w_active=0)
#4
Prolly hitting some resource limit with such a large number of songs.

I would turn debug logging off then reboot and then post System info (in a code box for readability).
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
#5
(12-29-2020, 06:24 PM)Tim Curtis Wrote: Prolly hitting some resource limit with such a large number of songs.

I would turn debug logging off then reboot and then post System info (in a code box for readability).

Here it is:

Code:
20201229 221444 worker: -- Start
20201229 221444 worker: Successfully daemonized
20201229 221444 worker: Integrity check (passed)
20201229 221446 worker: File check (OK)
20201229 221446 worker: Session loaded
20201229 221446 worker: Debug logging (OFF)
20201229 221446 worker: -- Device
20201229 221446 worker: ALSA cards: (0:b1 | 1:Headphones | 2:S2 | 3:empty
20201229 221446 worker: Configured: (2:Schiit USB Audio Gen 2 | mixer:(PCM) | alsavol:)
20201229 221446 worker: ALSA mixer actual (PCM)
20201229 221446 worker: ALSA PCM volume set to ()
20201229 221446 worker: -- System
20201229 221448 worker: Host     (MoodeDespacho)
20201229 221448 worker: moOde    (7.0.1 2020-12-23)
20201229 221448 worker: RaspiOS  (10.6)
20201229 221448 worker: Kernel   (5.4.77-v7+ #1371)
20201229 221448 worker: Platform (Pi-3B 1GB v1.2)
20201229 221448 worker: ARM arch (armv7l, 32-bit kernel)
20201229 221448 worker: MPD ver  (0.22.3_p0x3)
20201229 221448 worker: CPU gov  (ondemand)
20201229 221448 worker: USB boot not enabled yet
20201229 221448 worker: File system not expanded yet
20201229 221448 worker: HDMI port off
20201229 221448 worker: -- Network
20201229 221449 worker: eth0 exists
20201229 221449 worker: eth0 wait 0 for IP address
20201229 221452 worker: eth0 wait 1 for IP address
20201229 221455 worker: eth0 wait 2 for IP address
20201229 221458 worker: eth0 wait 3 for IP address
20201229 221501 worker: eth0 wait 4 for IP address
20201229 221504 worker: eth0 address not assigned
20201229 221504 worker: wlan0 exists
20201229 221504 worker: wifi country (ES)
20201229 221504 worker: wlan0 trying SSID (MOVISTAR_C06C)
20201229 221504 worker: IP addr (192.168.1.120)
20201229 221504 worker: Netmask (255.255.255.0)
20201229 221504 worker: Gateway (192.168.1.1)
20201229 221504 worker: Pri DNS (80.58.61.250)
20201229 221504 worker: Domain  (80.58.61.254)
20201229 221504 worker: -- Audio
20201229 221518 worker: MPD conf updated
20201229 221518 worker: ALSA outputs unmuted
20201229 221518 worker: ALSA card number (2)
20201229 221518 worker: Audio output (Schiit USB Audio Gen 2)
20201229 221518 worker: Audio formats (S16_LE, S32_LE, S24_3LE)
20201229 221519 worker: ALSA mixer name (PCM)
20201229 221519 worker: MPD volume control (disabled)
20201229 221519 worker: Hdwr volume controller exists
20201229 221519 worker: Max ALSA volume (100%)
20201229 221519 worker: Reset renderer active flags
20201229 221519 worker: -- MPD
20201229 221519 worker: MPD started
20201229 221530 worker: MPD accepting connections
20201229 221530 worker: Configure MPD outputs
20201229 221531 worker: MPD output 1 ALSA default (on)
20201229 221531 worker: MPD output 2 ALSA crossfeed (off)
20201229 221531 worker: MPD output 3 ALSA parametric eq (off)
20201229 221531 worker: MPD output 4 ALSA graphic eq (off)
20201229 221531 worker: MPD output 5 ALSA polarity inversion (off)
20201229 221531 worker: MPD output 6 ALSA bluetooth (off)
20201229 221531 worker: MPD output 7 HTTP stream (off)
20201229 221531 worker: MPD crossfade (off)
20201229 221531 worker: -- Feature availability
20201229 221531 worker: Source select (available)
20201229 221531 worker: Source select (source: MPD)
20201229 221531 worker: Source select (output: Schiit USB Audio Gen 2)
20201229 221531 worker: Bluetooth (available)
20201229 221531 worker: Airplay renderer (available)
20201229 221531 worker: Spotify renderer (available)
20201229 221531 worker: Squeezelite renderer (available)
20201229 221531 worker: UPnP renderer (available)
20201229 221531 worker: UPnP renderer (started)
20201229 221531 worker: DLNA server (available)
20201229 221531 worker: UPnP browser (available)
20201229 221531 worker: GPIO button handler (available)
20201229 221531 worker: Stream recorder (n/a)
20201229 221531 worker: -- Music sources
20201229 221531 worker: USB sources (none attached)
20201229 221532 worker: NAS and UPnP sources (mountall initiated)
20201229 221532 worker: -- Miscellaneous
20201229 221532 worker: USB volume knob (Off)
20201229 221532 worker: Shellinabox SSH started
20201229 221532 worker: USB auto-mounter (udisks-glue)
20201229 221532 worker: LED0 (On)
20201229 221532 worker: LED1 (On)
20201229 221532 worker: Saved MPD vol level (0)
20201229 221532 worker: Preamp volume level (0)
20201229 221532 worker: MPD volume level (0) restored
20201229 221532 worker: ALSA PCM volume ()
20201229 221532 worker: Auto-play (Off)
20201229 221532 worker: Maintenance interval (3 hrs)
20201229 221532 worker: Screen saver activation (Never)
20201229 221532 worker: Session permissions (OK)
20201229 221532 worker: Watchdog started
20201229 221532 worker: Ready

I tried to add an album to try the update, it also failed.


If the problem is the number of songs, probable not much can be done then.

Anyway, some times it works so I'll cross my fingers.

Thanks a lot.
#6
Menu, Configure, System
Menu, System info

That will show the current disk and MPD resource allocations.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
#7
Don’t forget to expand the file system.
#8
(12-29-2020, 10:14 PM)Tim Curtis Wrote: Menu, Configure, System
Menu, System info

That will show the current disk and MPD resource allocations.

First off all, excuseme if I'm a little slow with all this, english is not my native language and I don't know much linux. Thanks for your time.

I have looked in the system info and the only thing I thik affecst resources if in the image.

Also, using df -h in the terminal it shows me this results:


Code:
Filesystem                    Size  Used Avail Use% Mounted on
/dev/root                     3.4G  2.7G  501M  85% /
devtmpfs                      430M     0  430M   0% /dev
tmpfs                         463M     0  463M   0% /dev/shm
tmpfs                         463M   13M  450M   3% /run
tmpfs                         5.0M  4.0K  5.0M   1% /run/lock
tmpfs                         463M     0  463M   0% /sys/fs/cgroup
/dev/mmcblk0p1                253M   55M  198M  22% /boot
192.168.1.50:/volume1/Musica  3.6T  2.2T  1.4T  62% /mnt/NAS/NAS
tmpfs                          93M     0   93M   0% /run/user/1000

As I said, I'm no expert so excuse me if this is the wrong info. But shouldn't the aviable memory be enough to list the files in the library?

Thanks again for your help.


Attached Files Thumbnail(s)
   
#9
I tried expanding the file system too, so now there like 3GB free in the root. The update worked once. But I tried again after a while to be sure and then it didn't...

Taking a look and the log after restarting the MPD I noticed that there are no changes in it when I press update.


Code:
20201230 114643 mpdindex: Start
20201230 114644 thmcache: Start
20201230 114644 thmcache: Priority: Embedded cover
20201230 114644 thmcache: Res,Qual: Auto
20201230 114644 thmcache: Px ratio: 1
20201230 114644 thmcache: Th width: 100
20201230 114644 thmcache: Thm qual: 75
20201230 114644 thmcache: Scanning: NAS, SDCARD, UPNP
20201230 115424 thmcache: Done: 8535 folders scanned, 6 thumbs created, 8529 already in cache.
20201230 121938 mpdindex: Done: indexed 8309 artists, 8189 albums, 190046 songs
20201230 121938 worker: Job update_library done
20201230 182757 worker: Job mpdrestart
20201230 182854 worker: Job mpdrestart

It seems like it doesn't recieve the order at all.
Using mpc update in the terminal by it works, so I will do it that way.

Don't know if mark this as solved, though. Huh 

Thanks again for your help, have a nice new year.
#10
@Zinck84 

I wouldn't mark it solved yet. We still don't know why the update job doesn't reliably start for you. In particular, I don't believe we have enough information to just dismiss your issue as being a consequence of your library being so big.

I have a much more modest NAS, at the moment just 5800 songs. Whether or not I first restart mpd (and I don't understand why you are doing that) I see the "worker: Job update_Library" line appear in the moOde log each time I click "Update library" in the moOdeUI. This is followed by the usual output until "worker: Job update_library done".

I'm trying to think where to plant some software probes to help resolve this.

If I bump the MPD Log level to Verbose (bottom of the MPD Config panel) I get an avalanche of messages in the MPD log (/var/log/mpd/log), depending on what else is going on, but among them I reliably see something like


Code:
Dec 30 14:18 : client: [12] process command "update"
Dec 30 14:18 : update: spawned thread for update job id 1
Dec 30 14:18 : update: starting
...many messages...
Dec 30 14:19 : update: finished

I assume you see the same when you run "mpc update" from the command line. Likewise, you should see the same when you "Update library" from the moOdeUI.

And please don't worry about English vs whatever. I'd love to be able to carry on a technical conversation in some other language as well as you are in English.

Regards,
Kent


Forum Jump: