Re: MPD on localhost won't work if there's no Wifi!?
On Tue, 10 Jun 2014 08:22:58 +0300, Andrei POPESCU wrote:
As far as I can tell mpc is low-level enough to not care about what
Network Manager advertises. I'm suspecting it does have something to do
with DNS, so I'd suggest you pick a name for your machine and make sure
you adjust your configs as follows (assuming your machine's name is
'mpdserver'):
/etc/hostname:
mpdserver
/etc/hosts:
127.0.0.1 localhost
127.0.1.1 mpdserver
(you can also use the lan IP here if it is fixed and enabling the IPv6
entries could also help)
mpd.conf:
bind_to_address "localhost"
After making all these changes exactly as you have mentioned, I wouldn't
see that error anymore. But because I'm curious, I decided to
investigate what was the culprit, and I found that leaving
bind_to_address as "localhost" and enabling the IPv6 entries in
/etc/hosts was enough. Then I commented the entries again in /etc/hosts
and immediately mpc stopped working.
If you make all these changes it's probably a good idea to reboot. If
mpc still can't connect please post the output of:
getent hosts localhost
getent hosts mpdserver # or whatever you named it
netstat -plant | grep mpd
with and without Network Manager running.
The old getent output, from when it was not working:
$ getent hosts localhost
127.0.0.1 localhost
The old getent output, from when it was working:
$ getent hosts localhost
127.0.0.1 localhost
And sometimes:
::1 localhost
The new getent output:
$ getent hosts localhost
::1 localhost ip6-localhost ip6-loopback
Always netstat has shown this:
$ netstat -plant | grep mpd
tcp 0 0 127.0.0.1:6600 0.0.0.0:* LISTEN 4062/mpd
tcp6 0 0 ::1:6600 :::* LISTEN 4062/mpd
Thanks really a lot to everyone for this!
Teresa and Junior
Reply to: