jcorporation / myMPD

myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features.
https://jcorporation.github.io/myMPD/
GNU General Public License v3.0
419 stars 65 forks source link

albumcache not ready after update to 6.12 #451

Closed payback007 closed 3 years ago

payback007 commented 3 years ago

Happened again, re-opeining of issue "450":

https://github.com/jcorporation/myMPD/issues/450

Following error message was displayed in the console:

[Error] ERROR: {"method":"MPD_API_DATABASE_GET_ALBUMS","facility":"database","severity":"error","message":"Albumcache not ready","data":{}} logLog (combined.js:8:11700) logError (combined.js:8:11859) (anonyme Funktion) (combined.js:8:109136)

After a system reboot mympd is working again. Restart of mympd-service was not enough to fix the issue.

jcorporation commented 3 years ago

Sorry, but I need the debug log of myMPD, not the log of the javascript console.

payback007 commented 3 years ago

How to start the debug-log? Tried to start it like decribed in the wiki, but this seem not to work with my multi-service mympd-installation. Is there a way to print the log to an explicit logfile?

jcorporation commented 3 years ago

If you want to run it in the foreground:

Else change the loglevel parameter in the config file to value 7. Debug output is printed to stdout, e.g. systemd collects logs from the output, use journalctl -u <unitname> to grep the output.

payback007 commented 3 years ago

That's what I got back:

23:14:10 NOTICE mympd Starting myMPD 6.12.0 23:14:10 NOTICE mympd Libmympdclient 1.0.5 based on libmpdclient 2.20.0 23:14:10 NOTICE mympd Mongoose 6.18 23:14:10 NOTICE mympd Parsing config file: /media/mympd/mympd1.conf 23:14:10 WARN mympd Unkown config option: mympd - stickercache 23:14:10 NOTICE mympd Scripting disabled, disabling scripteditor 23:14:10 NOTICE mympd Setting loglevel to CRITICAL

jcorporation commented 3 years ago

You forgot to set the loglevel to debug.

payback007 commented 3 years ago

Very interesing topic found:

Mär 21 13:40:26 multiroom systemd[1]: Started myMPD1. Mär 21 13:40:26 multiroom mympd[24756]: NOTICE mympd Starting myMPD 6.12.0 Mär 21 13:40:26 multiroom mympd[24756]: NOTICE mympd Libmympdclient 1.0.5 based on libmpdclient 2.20.0 Mär 21 13:40:26 multiroom mympd[24756]: NOTICE mympd Mongoose 6.18 Mär 21 13:40:26 multiroom mympd[24756]: NOTICE mympd Parsing config file: /media/mympd/mympd1.conf Mär 21 13:40:26 multiroom mympd[24756]: WARN mympd Unkown config option: mympd - stickercache Mär 21 13:40:26 multiroom mympd[24756]: NOTICE mympd Scripting disabled, disabling scripteditor Mär 21 13:40:26 multiroom mympd[24756]: NOTICE mympd Setting loglevel to WARN Mär 21 13:40:26 multiroom mympd[24756]: ERROR mympd MPD playlists dir: "/media/mpd/playlists" don't exists Mär 21 13:40:26 multiroom mympd[24756]: ERROR mpdclient MPD music_directory: "/media/music" don't exists Mär 21 13:40:26 multiroom mympd[24756]: WARN mpdclient Disabling featLibrary support

mympd reports both directories as "non-existing", but of course both directories are existing and both directories are accessable. Seem to be that there is a difference if starting from a reboot or if restarting the service from a running system.

jcorporation commented 3 years ago

Your loglevel is not set to debug, analyzing problems without debug logs is impossible. Please attach your mympd unit file. At which condition this error occurs?

You should really provide more information describing your environment.

payback007 commented 3 years ago

Sorry, now I was able to start in debug mode (old debug_mode seem to be a "4", with a "7" it's working):

mympd1_debug.txt

The issue only occurs when mympd1 for example is starting stop/starting via console command. There it doesn't either depend if starting the service manually or do a direct call of mympd.conf

If starting on system boot via service all is working as expected.

jcorporation commented 3 years ago

20:46:33 DEBUG mpdworker /tmp/myMPD/src/mpd_worker.c:57: MPD worker not initialized, discarding message

This line shows the problem. The cache creation request from the mpd_client thread is discarded because the thread is not initialized.

BTW: you use 0.0.0.0 as mpd host. If MPD runs on the same host as myMPD you should use the socket connection.

jcorporation commented 3 years ago

Latest commit in the v6.12.2 branch should fix your "albumcache not ready" problem. If you think the music directory error is also an bug and not a problem of your environment please open another bug for it.

Can you please test?

payback007 commented 3 years ago

Just installed v.6.12.2 -> stop and start service was possible, "albumcache error" seem to be fixed.

jcorporation commented 3 years ago

Greate!