rain0r / ampd

A web-based MPD client.
https://rain0r.github.io/ampd/
GNU General Public License v3.0
52 stars 5 forks source link

Since upgrade to 2.0.x backend connection is not working well #605

Open DirkSchmitt opened 2 weeks ago

DirkSchmitt commented 2 weeks ago

I currently upgraded from 1.x to 2.0.3. The system is running on debian (bullseye) with a repository of 114k songs.

Problem: The connection to the backend is only working partially working.

Analysis

The mpd service shows errors from the ampd client:

exception: Space expected after closing '"'

So I increased the mpd log verbosity. I see an awful lot of find requests:

Fri 2024-11-08 17:21:26 CET mpd.service[3383524]: client: [6] process command "find "(album == 'Alles ohne Strom')"" Fri 2024-11-08 17:21:27 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:21:27 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:21:27 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:21:27 CET mpd.service[3383524]: client: [6] process command "find "(album == 'Happy Trails')"" Fri 2024-11-08 17:21:27 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:21:27 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:21:27 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:21:27 CET mpd.service[3383524]: client: [6] process command "find "(album == '\"Strings and Stories of a Troubadour\", Live in Odeon, Vienna, 23.11.2011')"" Fri 2024-11-08 17:21:27 CET mpd.service[3383524]: exception: Space expected after closing '"'

After the find commands are processed the mpd log repeats the following:

Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] process command "status" Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] process command "status" Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] process command "outputs" Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] process command "status" Fri 2024-11-08 17:37:47 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] process command "status" Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] process command "currentsong" Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] process command "ping" Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] command returned 0 Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] process command "status" Fri 2024-11-08 17:37:48 CET mpd.service[3383524]: client: [6] command returned 0

The ampd web page still shows the Not connected to ampd server.

rain0r commented 1 week ago

Hello there,

that sounds like your browser can't establish a WebSocket connection to the backend.

Could you try one (or all) of the following, please:

The logs don't look unusual to me.

Sorry for your inconvenience!

DirkSchmitt commented 1 week ago

Both – Firefox private tab and chromium browser – have the described problem.

Here is the console log from Firefox private tab. console-export-2024-11-10_18-59-57.txt

rain0r commented 1 week ago

I looked again at the log of mpd and noticed something I missed the first time.

Fri 2024-11-08 17:21:27 CET mpd.service[3383524]: client: [6] process command "find "(album == '\"Strings and Stories of a Troubadour\", Live in Odeon, Vienna, 23.11.2011')""
Fri 2024-11-08 17:21:27 CET mpd.service[3383524]: exception: Space expected after closing '"'

This might be caused by a bug in javampd, see: https://github.com/finnyb/javampd/issues/208

Since version 2, ampd creates a set of all albums in the mpd database. When it stumbles upon an album title with quotes in its name, it throws an exception.

I updated the version of javampd and created a new release.

Unfortunately, I couldn't reproduce this error locally but I'm optimistic this bug should be fixed by version 2.1.0.

Happy to hear if it works now.