You are not logged in.

#1 2010-12-12 14:14:08

fastfret79
Member
Registered: 2009-09-05
Posts: 87

mpd 0.16 Cannot connect to mpd

Just upgraded mpd (0.15.15-2 -> 0.16-1), restarted the daemon but couldn't connect with ncmpcpp:

Cannot connect to mpd: Connection closed by the server

After lots of searching and even starting with a clean mpd.conf, I eventually enabled verbose level of logging and from my mpd.log I get the following:

Dec 12 13:50 : avahi: Initializing interface
Dec 12 13:50 : avahi: Client changed to state 101
Dec 12 13:50 : avahi: Client is CONNECTING
Dec 12 13:50 : state_file: Loading state file /var/lib/mpd/mpdstate
Dec 12 13:51 : client: libwrap refused connection (libwrap=mpd) from 127.0.0.1:54755
Dec 12 13:51 : client: libwrap refused connection (libwrap=mpd) from 127.0.0.1:54756
Dec 12 13:51 : client: libwrap refused connection (libwrap=mpd) from 127.0.0.1:54761
...

My mpd.conf is very straightforward: http://pastebin.com/Mk8vZxMv

If I downgrade back to 0.15.15-2 and restart the mpd daemon, all is ok.

Any ideas what may be causing it and what to try?

Offline

#2 2010-12-12 14:33:20

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: mpd 0.16 Cannot connect to mpd

Libwrap means tcp_wrappers if I'm not mistaken. You should allow mpd in /etc/hosts.allow, see if that works out. Either way, looks like mpd has tcp_wrappers support now where it didn't before.

Edit: if the package info on the homepage is correct, the package in [testing] does not depend on tcp_wrappers, but your error says it does. I think someone has messed up smile.

If adding mpd to hosts.allow works, please file a bug report so the maintainer can fix it.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2010-12-12 14:56:05

fastfret79
Member
Registered: 2009-09-05
Posts: 87

Re: mpd 0.16 Cannot connect to mpd

Thanks .:B:.  - adding mpd to hosts.alllow worked.

I'll post a bug report

Offline

#4 2010-12-14 19:43:21

Calimero
Member
From: france
Registered: 2008-08-06
Posts: 45
Website

Re: mpd 0.16 Cannot connect to mpd

You just have to change this in ~/.mpdconf
bind_to_address        "127.0.0.1"

No need for any hosts.allow modif. Hey, it's localhost !


In a world without walls and fences, who needs windows and gates ?

Offline

#5 2010-12-18 14:52:18

archman-cro
Member
From: Croatia
Registered: 2010-04-04
Posts: 943
Website

Re: mpd 0.16 Cannot connect to mpd

I have the same problem and the above solution doesn't help.
How exactly did you use the hosts.allow file? You just entered "mpd" in it?
Here's some info from mpd.log, since mpd.error is empty:

Dec 18 15:06 : avahi: Client Disconnected, will reconnect shortly
Dec 18 15:06 : avahi: Could not reconnect: Daemon not running

Downgrading to 0.15.15 mpd works as usual with no problems.

EDIT: NVM, fixed with adding "mpd: ALL" to "/etc/hosts.allow". It didn't work with "bind_to_address" option.

Last edited by archman-cro (2010-12-18 15:08:45)

Offline

#6 2010-12-18 15:41:03

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: mpd 0.16 Cannot connect to mpd

Calimero wrote:

You just have to change this in ~/.mpdconf
bind_to_address        "127.0.0.1"

No need for any hosts.allow modif. Hey, it's localhost !

... unless he actually wants to listen to the music somewhere else.
What .:B:. says is correct - you can compile MPD without libwrap to avoid
this... issue.

Offline

#7 2010-12-19 20:59:04

hennes
Member
Registered: 2008-03-31
Posts: 50

Re: mpd 0.16 Cannot connect to mpd

I seem to be having the same problem with mpd 0.16-2 and none of the above suggestions did work. Any more ideas?

Offline

#8 2010-12-20 18:05:46

archman-cro
Member
From: Croatia
Registered: 2010-04-04
Posts: 943
Website

Re: mpd 0.16 Cannot connect to mpd

archman-cro wrote:

I have the same problem and the above solution doesn't help.
How exactly did you use the hosts.allow file? You just entered "mpd" in it?
Here's some info from mpd.log, since mpd.error is empty:

Dec 18 15:06 : avahi: Client Disconnected, will reconnect shortly
Dec 18 15:06 : avahi: Could not reconnect: Daemon not running

Downgrading to 0.15.15 mpd works as usual with no problems.

EDIT: NVM, fixed with adding "mpd: ALL" to "/etc/hosts.allow". It didn't work with "bind_to_address" option.

UPDATE: It doesn't work again (after a reboot). Same errors.

Offline

#9 2010-12-22 11:53:33

vitac
Member
Registered: 2007-04-27
Posts: 5

Re: mpd 0.16 Cannot connect to mpd

I had the same problem:

Cannot connect to mpd: Spojení odmítnuto

I restarted the mpd with --verbose flag and got this output:

unrecognized parameter in config file at line 5: error_file

So it seems that the parameter "error_file" is deprecated. I removed it from my /etc/mpd.conf and it works fine again.
Hope this helps.

Offline

#10 2010-12-22 14:23:28

archman-cro
Member
From: Croatia
Registered: 2010-04-04
Posts: 943
Website

Re: mpd 0.16 Cannot connect to mpd

vitac wrote:

I had the same problem:

Cannot connect to mpd: Spojení odmítnuto

I restarted the mpd with --verbose flag and got this output:

unrecognized parameter in config file at line 5: error_file

So it seems that the parameter "error_file" is deprecated. I removed it from my /etc/mpd.conf and it works fine again.
Hope this helps.

Thank you!!! It worked! (I should use the "verbose" flags the next time).

Cheers! smile

Offline

#11 2010-12-23 08:19:57

hennes
Member
Registered: 2008-03-31
Posts: 50

Re: mpd 0.16 Cannot connect to mpd

Thank you so much vitac!! smile

Offline

#12 2011-01-10 14:55:34

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: mpd 0.16 Cannot connect to mpd

This doesnt happen with ncmpc, but it does with ncmpcpp.
Disabling libwrap works for ncmpcpp though.


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#13 2011-02-13 19:52:05

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: mpd 0.16 Cannot connect to mpd

This thread is closely related to my own issue HERE. I'm posting here because it seems like those who have wrestled with this may know the answer to my question, which is why adding 'mpd: ALL' to /etc/hosts.allow is making ncmpcpp work for me when I'm only operating on localhost. This thread suggests that it should not be necessary. Nevertheless... I get a connection refused otherwise, even with 'bind_to_address' set in my config and no mpd.error set in my config.

Thanks for any feedback -- whatever the fix is should probably go in the wiki.

Offline

Board footer

Powered by FluxBB