MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.17k stars 352 forks source link

MPD fails to add large directory in proxy/satellite setup #1130

Closed SimonTeixidor closed 3 years ago

SimonTeixidor commented 3 years ago

Bug report

Describe the bug

I run the following mpd config:

bind_to_address "0.0.0.0"
music_directory     "nfs://192.168.0.16/mnt/storage/music/"
database {
    plugin  "proxy"
    host    "192.168.0.16"
    port    "6600"
}

audio_output {
    type  "alsa"
    name  "default"
}

I'm not able to add a very large directory, although this works fine on the remote mpd server (192.168.0.16).

Expected Behavior

I can do mpc add large_directory and have all the songs added to my playlist.

Actual Behavior

mpd closes the connection:

$ mpc add library
error adding library: Failed to connect to remote MPD '192.168.0.16'; Connection refused

In a raw netcat connection, we can also observe that the error message from MPD is wrong:

 $ nc localhost 6600
OK MPD 0.22.4
add library
ACK [5@0] {add} Connection closed by the server

This error seems to indicate that the add command is not found (I spent quite some time thinking that my client was broken and that I was incapable of reading the protocol spec properly :))

The log on the remote MPD server contains the following error:

exception: error on client 0: Output buffer is full

Version

Music Player Daemon 0.22.6 (0.22.6)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2018 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy

Storage plugins:
 local nfs

Decoders plugins:
 [oggflac] ogg oga
 [flac] flac
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [pcm]

Filters:

Tag plugins:

Output plugins:
 null fifo pipe alsa pulse httpd recorder

Encoder plugins:
 null wave flac

Input plugins:
 file alsa nfs

Playlist plugins:
 extm3u m3u pls flac cue embcue

Protocols:
 file:// alsa:// nfs://

Other features:
 epoll iconv inotify ipv6 tcp un

Log

Local MPD server:

config_file: loading file /home/simon/.config/mpd/mpd.conf
hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled
client: [0] opened from 127.0.0.1:42108
client: [0] process command "add library"
exception: Connection closed by the server
client: [0] command returned 3
exception: Connection closed by the server

Remote MPD server:

client: [0] opened from 192.168.0.149:48618                                                                                                                                                                     
client: [0] process command "find base "library""                                                                                                                                                               
exception: error on client 0: Output buffer is full                                                                                                                                                             
client: [0] command returned 0                                                                                                                                                                                  
client: [0] closed 
MaxKellermann commented 3 years ago

Accidently auto-closed by GH because it had a wrong interpretation of the commit message.

MaxKellermann commented 3 years ago

Moved to 0.23 because this change was too intrusive for the stable branch.