You are not logged in.
I have used mpd for years now- my current install is at least a year old. Never had a problem with it until suddenly it stopped working this morning. It seems like I'm getting errors similar to those I got all those years ago the first time I set it up, but I have no idea why they're appearing now. Nothing has changed other than normal updates, and I haven't seen anybody else having problems so I kind of doubt it's a broken update?
I feel like a bit of a moron even posting this but I tried to troubleshoot it myself and just got frustrated. Everything I can find, I've already tried (or was already done back when I set it up).
I first noticed it when I tried to play music and nothing happened. ncmpcpp gives this error:
Couldn't connect to MPD (host = 127.0.0.1, port = 6600): Timeout
restarting mpd does this:
:: Stopping Music Player Daemon [DONE]
:: Starting Music Player Daemon [FAIL]
Trying to start mpd manually does this:
Failed to bind to '127.0.0.1:6600': Address already in use
This is my mpd.conf (not including everything that's there, but commented out)
music_directory "/mnt/windows/Users/Sarah\ Alli/Music/music/"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/mpd.db"
log_file "/var/log/mpd/mpd.log"
pid_file "/var/run/mpd/mpd.pid"
state_file "/var/lib/mpd/mpdstate"
user "mpd"
bind_to_address "127.0.0.1"
port "6600"
input {
plugin "curl"
# proxy "proxy.isp.com:8080"
# proxy_user "user"
# proxy_password "password"
}
When I first started troubleshooting this morning, bind_to_address and port were commented out, but I enabled them and set them to what they are (along with changing the ncmpcpp config to match) as an attempt to fix the problem. Suffice to say, did not work.
What am I missing here?
Offline
Find out what's using the port currently:
netstat -anp |grep ":6600"
I think lsof can do the same thing, but I don't remember how.
Offline
i bet its mpd
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
i bet its mpd
That would make the most sense, but if it was multiple instances of mpd, why would doing the restart fail?
I am at work now but I will try checking the port when I get home.
Offline
nevermind...
Last edited by Rasi (2012-10-05 23:03:43)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Find out what's using the port currently:
netstat -anp |grep ":6600"
I think lsof can do the same thing, but I don't remember how.
tcp6 5 0 :::6600 :::* LISTEN 525/mpd
tcp6 1 0 ::1:6600 ::1:59940 CLOSE_WAIT -
tcp6 1 0 127.0.0.1:6600 127.0.0.1:34188 CLOSE_WAIT -
tcp6 1 0 127.0.0.1:6600 127.0.0.1:34277 CLOSE_WAIT -
tcp6 1 0 ::1:6600 ::1:59962 CLOSE_WAIT -
tcp6 1 0 ::1:6600 ::1:59921 CLOSE_WAIT -
Not sure what all of this means. There's mpd though, on the top line.
Offline
It means that your mpd is running. But its running on ipv6 interface.
Change your bind_to_address to "127.0.0.1", killall mpd instances and start again.
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Well, when I originally made this post, I had changed my bind_to_address to 127.0.0.1, but I changed it back because I wanted to see what my original error message was (it was the same but with ::: instead of 127.0.0.1).
I changed it back, and then did:
# killall mpd
Which seemed to succeed. However, starting mpd did this:
[sarai@arch ~]$ sudo rc.d start mpd
:: Starting Music Player Daemon [FAIL]
Trying to start it up manually by running "sudo mpd" got me this:
Failed to bind to '127.0.0.1:6600': Address already in use
So I guess when I did killall, it didn't really killall? How do I kill this dang thing? I also tried rebooting- it lets me stop the service/kill the process etc but it never lets me start it back up.
Offline
# kill -9 `pidof mpd`
Offline
You might wait for a minute or so between the kill all and the daemon start. During that minute, you could check that you really did kill them all. After a minute or so, the system will release the port if it has been orphaned.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline