You are not logged in.

#1 2007-07-10 03:58:12

jordanmthomas
Member
Registered: 2007-07-10
Posts: 33

[SOLVED] mpc won't connect to mpd

Hi.
I'm having some troubles with mpd.  It used to work fine, but now it is really finicky and has a hard time opening port 6600.

I can get it to start, but none of the clients can connect to it.
First off, here's mpd.conf:

music_directory                 "/media/external/music"
playlist_directory              "/media/external/music"
db_file                         "/var/log/mpd/mpd.db"
log_file                        "/var/log/mpd/mpd.log"
error_file                      "/var/log/mpd/mpd.error"
pid_file                        "/var/run/mpd/mpd.pid"
user                            "root"  #yeah...I'll change that later

bind_to_address                 "localhost"
port                            "6600"

audio_output 
{
     type                    "alsa"
     name                   "My ALSA Device"
}
mixer_type                      "software"

When I run mpd, it returns this:

unable to bind port 6600: Cannot assign requested address
maybe MPD is still running?

This happens if I use 127.0.0.1, localhost, or JORDAN (my hostname).  If I use 192.168.1.101 (my local IP) it will start without complaining.
Here's my hosts file in case it might be wrong:

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1               localhost.localdomain   localhost
127.0.0.1               JORDAN

So, let's assume I have used

bind_to_address "192.168.1.101"

and everything seems to be cool.
I try to open a playlist using mpc:

mpc load a

it gives me this:

error: timeout in attempting to get a response from "192.168.1.101" on port 6600

I've looked around and found a few people with similar problems, but they either got no answers or got solutions that didn't work for me.  Any help is appreciated.

Last edited by jordanmthomas (2007-07-10 18:46:38)

Offline

#2 2007-07-10 04:15:26

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: [SOLVED] mpc won't connect to mpd

jordanmthomas wrote:

Here's my hosts file in case it might be wrong:

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1               localhost.localdomain   localhost
127.0.0.1               JORDAN

I don't know if your hosts file is correct or not, but you can simply do:

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1               localhost.localdomain   localhost JORDAN

I assume you also have the hostname set in rc.conf and lo is enabled?


I am a gated community.

Offline

#3 2007-07-10 05:56:28

jordanmthomas
Member
Registered: 2007-07-10
Posts: 33

Re: [SOLVED] mpc won't connect to mpd

Oh my...lo wasn't up.  tongue
I never even bothered to check that even though it was suggested elsewhere...I just assumed it was up.

Thanks so much!

(And I cleaned up my hosts file per your suggestion)

Last edited by jordanmthomas (2007-07-10 05:57:52)

Offline

#4 2007-07-10 06:06:04

smurnjiff
Member
Registered: 2007-06-25
Posts: 211

Re: [SOLVED] mpc won't connect to mpd

You might want to really consider changing MPD's user.  Could save your life!

Offline

#5 2007-07-10 06:18:34

jordanmthomas
Member
Registered: 2007-07-10
Posts: 33

Re: [SOLVED] mpc won't connect to mpd

Yeah, I was going to do that as soon as I got it running again.

Offline

Board footer

Powered by FluxBB