Downgrading to libmpd-0.12.0 and gmpc-0.13.0 helps to listen audio again. This is on amd64 arch.
If I merge libmpd-0.13.0 and gmpc-0.13.0 it neither connects. mpd log says on connect try: interface 0: opened from 127.0.0.1 So mpd sees the connect and when I close gmpc mpd disconnects the client: interface 0: closed libmpd's connect routine seems broken.
(In reply to comment #1) > If I merge libmpd-0.13.0 and gmpc-0.13.0 it neither connects. mpd log says on > connect try: > > interface 0: opened from 127.0.0.1 > > So mpd sees the connect and when I close gmpc mpd disconnects the client: > > interface 0: closed > > libmpd's connect routine seems broken. > You can run gmpc with --debug-level=3 to get some more output. It would help if you could contact me directly via e-mail or irc (#mpd on irc.freenode.net). Another useful test for me is if you can try the latest mpc (preferable from svn), this can help me pin-point the location of the error. (libmpd wraps around libmpdclient.[c|h] that is also (directly) used by mpc). Qball (author of gmpc.)
The error from gmpc: ERROR: libmpd.c mpd_check_error():#235: Following error occured: 15: code: 0 msg: problems getting a response from "localhost" on port 6600 : Verbindungsaufbau abgelehnt
If I add -DMPD_NO_GAI to cflags it works. whee... ;)
The IPv6 entry causes the refused connection # grep -v ^# /etc/hosts 127.0.0.1 ana.manna.org ana localhost ::1 localhost If I comment the IPv6 entry it works.
On my system, mpd would not start at all! I checked it out and found it doesn't seem to work without the --no-daemon option (as in /etc/init.d/mpd)! # /usr/bin/mpd --verbose --no-create-db /etc/mpd.conf binding to address for localhost setFsCharset: fs charset is: UTF-8 reading DB opening pid file # ps -fC mpd UID PID PPID C STIME TTY TIME CMD # # /usr/bin/mpd --no-daemon --verbose --no-create-db /etc/mpd.conf & [1] 16127 # binding to address for localhost setFsCharset: fs charset is: UTF-8 reading DB opening pid file writing pid file # ps -fC mpd UID PID PPID C STIME TTY TIME CMD mpd 16127 19062 13 11:54 pts/0 00:00:00 /usr/bin/mpd --no-daemon --verbose --no-create-db /etc/mpd.conf # # emerge --info Portage 2.1.2.2 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.20.4 i686) ================================================================= System uname: 2.6.20.4 i686 AMD Athlon(tm) XP 2600+ Gentoo Base System release 1.12.9 Timestamp of tree: Thu, 17 May 2007 03:00:01 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-java/java-config: 1.3.7, 2.0.31-r5 dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -mtune=i686 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -mtune=i686 -pipe" DISTDIR="/data/linux/gentoo/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="C" LINGUAS="en en_US en_GB nl de" MAKEOPTS="-j2" PKGDIR="/data/linux/gentoo/packages/amd_athlon-xp" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/compile" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac alsa apache2 apm berkdb bitmap-fonts cli cracklib crypt cups dri dvd dvdr dvdread encode esd fortran gdbm gif gnome gpm gstreamer gtk iconv imlib ipv6 isdnlog java jpeg ldap libg++ mad midi mikmod mmx mng mozilla mp3 mpeg mplayer ncurses nls nptl nptlonly nsplugin ogg opengl oss pam pcre pdf perl png ppds pppd python qt qt3 qt4 quicktime readline reflection samba sdl session spell spl sse ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode v4l v4l2 vcd vorbis wmf x86 xinerama xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US en_GB nl de" USERLAND="GNU" VIDEO_CARDS="vesa fbdev nv nvidia v4l" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
That sounds like you haven't let mpd create its database beforehand (mpd --create-db).
No, without --no-daemon, mpd seems to die before "writing pid file", see here: # rm /var/lib/mpd/database /var/lib/mpd/state # mpd --verbose --no-daemon binding to address for localhost setFsCharset: fs charset is: UTF-8 unable open db file "/var/lib/mpd/database": No such file or directory flushing warning messages done flushing warning messages explore: attempting to opendir: explore: [...] removing empty directories from DB sorting DB writing DB No "audio_output" defined in config file Attempt to detect audio output device Attempting to detect a alsa audio device Successfully detected a alsa audio device opening pid file writing pid file [here I pressed ctrl-c since it was started in the foreground] # mpd --verbose binding to address for localhost setFsCharset: fs charset is: UTF-8 reading DB opening pid file # ps -fC mpd UID PID PPID C STIME TTY TIME CMD
as stated in this thread you can comment out the localhost bind in mpd.conf. It is in there by ebuild. http://www.musicpd.org/forum/index.php?PHPSESSID=041bc5fba6be9bb4f0a8f9b2c742a2c3&topic=1287.0
For some reasons I dislike to unbind from localhost. ;) Instead, I changed it to this below and works, too, with IPv6 entry in /etc/hosts. bind_to_address "127.0.0.1" Still, that are just workarounds to the problem.
(In reply to comment #10) > For some reasons I dislike to unbind from localhost. ;) > > Instead, I changed it to this below and works, too, with IPv6 entry in > /etc/hosts. > > bind_to_address "127.0.0.1" > > Still, that are just workarounds to the problem. > Well, yes - and this problem can only be fixed in the upstream code. As upstream is already well aware of this and are (eventually) planning to rewrite the socket binding code, I'm closing this as UPSTREAM. Feel free to provide patches. :)
> For some reasons I dislike to unbind from localhost. ;) > > Instead, I changed it to this below and works, too, with IPv6 entry in > /etc/hosts. > > bind_to_address "127.0.0.1" > > Still, that are just workarounds to the problem. > this is content of my /etc/hosts. I think 2# is ipv6 entry so why is it still not working? 127.0.0.1 localhost.localdomain localhost ::1 localhost
Try either pointing your clients to 127.0.0.1 instead of localhost, or commenting out the ipv6 localhost entry, so "localhost" resolves to 127.0.0.1.