You are not logged in.

#1 2012-10-05 19:00:44

Sarai
Member
From: Alaska
Registered: 2010-02-20
Posts: 62

mpd suddenly doesn't work, "port 6600 is in use"

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

#2 2012-10-05 20:08:15

Nrezinorn
Member
Registered: 2012-08-26
Posts: 5

Re: mpd suddenly doesn't work, "port 6600 is in use"

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

#3 2012-10-05 21:15:58

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,844
Website

Re: mpd suddenly doesn't work, "port 6600 is in use"

i bet its mpd smile


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

#4 2012-10-05 22:48:11

Sarai
Member
From: Alaska
Registered: 2010-02-20
Posts: 62

Re: mpd suddenly doesn't work, "port 6600 is in use"

Rasi wrote:

i bet its mpd smile

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

#5 2012-10-05 23:02:45

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,844
Website

Re: mpd suddenly doesn't work, "port 6600 is in use"

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

#6 2012-10-06 06:53:43

Sarai
Member
From: Alaska
Registered: 2010-02-20
Posts: 62

Re: mpd suddenly doesn't work, "port 6600 is in use"

Nrezinorn wrote:

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

#7 2012-10-06 09:09:39

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,844
Website

Re: mpd suddenly doesn't work, "port 6600 is in use"

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

#8 2012-10-06 15:50:18

Sarai
Member
From: Alaska
Registered: 2010-02-20
Posts: 62

Re: mpd suddenly doesn't work, "port 6600 is in use"

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

#9 2012-10-06 15:53:27

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: mpd suddenly doesn't work, "port 6600 is in use"

# kill -9 `pidof mpd`

Offline

#10 2012-10-06 15:55:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,963

Re: mpd suddenly doesn't work, "port 6600 is in use"

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
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Online

Board footer

Powered by FluxBB