Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-08-2009, 05:40 AM   #1
LQ Newbie
Registered: May 2009
Posts: 18

Rep: Reputation: 5
mpd/mpc MPD_host and/or mpc_port not set

I am trying to get Mpd and mpc running on debian. I installed mpd succesfully and started it, but when i run mpc i get this error:

MPD_HOST and/or MPD_PORT environment variables are not set
error: problems getting a response from "localhost" on port 6600 : Connection refused

when I run netstat -an nothing seems to listen to port 6600 and localhost is in my /etc/hosts like this: localhost

my mpd.conf:
music_directory "/home/jens/Desktop/Music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/tag_cache"
log_file "/var/log/mpd/mpd.log"
error_file "/var/log/mpd/errors.log"
pid_file "/var/run/mpd/pid"

bind_to_address "localhost"
port "6600"

thanks in advance!
Old 05-08-2009, 06:16 AM   #2
LQ Newbie
Registered: May 2009
Posts: 18

Original Poster
Rep: Reputation: 5
I made little progress by exporting the host and port using:
export MPD_HOST=localhost
export MPD_HOST=localhost

now i only get the error:

error: problems getting a response from "localhost" on port 6600 : Connection refused
Old 05-14-2009, 10:54 PM   #3
LQ Newbie
Registered: Nov 2007
Location: USA, Midwest
Distribution: ubuntu
Posts: 13

Rep: Reputation: 1
It looks like mpd is not actually running. If you run, "ps aux | grep mpd" you should get some information about the running instance of mpd. You'll even get more than one if mpd is updating its library. If you get nothing, mpd is not running.

So if it's not running, try, "sudo /etc/init.d/mpd start" (hopefully sudo is there. Run it as root, regardless) If mpd is having trouble starting, it should give you a clue as to why.

You could also take a look at the log by, "less /var/log/mpd/mpd.log" any clues there? (q to quit)

There are various mixers you can set in the /etc/mpd.conf file. You may have the wrong one set for your hardware.

Googling for your error gives many results, including commenting out the bind address in the cfg file, and ensuring that the IP address is used instead of "localhost."

Just a few ideas. Post your logs, and the output from the other commands here if you are still having problems.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mpc file format? minm Linux - Software 4 06-22-2005 07:21 AM
mpc to mp3 conversion linmix Linux - Software 5 03-18-2005 04:42 PM
Canon MPC printer issues grishnak Linux - Hardware 5 12-21-2004 04:12 PM
what is mpc audio? exodist Linux - Software 2 04-13-2004 08:22 AM
mpc to mp3? chup Linux - General 2 03-16-2004 08:18 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:08 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration