Bug #1874

mpd listening on all IPs, accepting only on one

Added by rumcic almost 4 years ago. Updated about 3 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

After some brief testing of latest -master, noticed that e.g. mpd (musicpd)
listens on *:6600 (got that info from sockstat(1)), but I could connect to
that port on only one IP. localhost (::1 or 127.0.0.1) did not work, but one
of the "outside" IPs did. Since I tried ::1, 127.0.0.1, 192.168.0.X and only
worked on the last configured IP 10.0.0.X, I guess it only received
connections on one IP instead of all.
--
Please do not CC me, since I already receive everything from these MLs.

Regards,
Rumko

mpd.conf (11.4 KB) rumcic, 10/24/2010 04:06 AM

History

#1 Updated by dillon almost 4 years ago

:After some brief testing of latest -master, noticed that e.g. mpd (musicpd)
:listens on *:6600 (got that info from sockstat(1)), but I could connect to
:that port on only one IP. localhost (::1 or 127.0.0.1) did not work, but one
:of the "outside" IPs did. Since I tried ::1, 127.0.0.1, 192.168.0.X and only
:worked on the last configured IP 10.0.0.X, I guess it only received
:connections on one IP instead of all.
:--
:Please do not CC me, since I already receive everything from these MLs.
:
:Regards,
:Rumko

Is mpd using UDP? I think I may have been able to reproduce an issue
with UDP but I'm not sure yet.

-Matt
Matthew Dillon
<>

#2 Updated by rumcic almost 4 years ago

Matthew Dillon wrote:
> :After some brief testing of latest -master, noticed that e.g. mpd (musicpd)
> :listens on *:6600 (got that info from sockstat(1)), but I could connect to
> :that port on only one IP. localhost (::1 or 127.0.0.1) did not work, but one
> :of the "outside" IPs did. Since I tried ::1, 127.0.0.1, 192.168.0.X and only
> :worked on the last configured IP 10.0.0.X, I guess it only received
> :connections on one IP instead of all.
> :--
> :Please do not CC me, since I already receive everything from these MLs.
> :
> :Regards,
> :Rumko
>
> Is mpd using UDP? I think I may have been able to reproduce an issue
> with UDP but I'm not sure yet.
>
> -Matt
> Matthew Dillon
> <>

No, it's using TCP. Output of sockstat when it's working:
Rumko ncmpc 1275 3 tcp4 127.0.0.1:1068 127.0.0.1:6600
Rumko mpd 900 3 tcp4 127.0.0.1:6600 127.0.0.1:1068
Rumko mpd 900 4 tcp4 *:6600 *:*
--
Please do not CC me, since I already receive everything from these MLs.

Regards,
Rumko

#3 Updated by c.turner almost 4 years ago

Rumko wrote:
> After some brief testing of latest -master, noticed that e.g. mpd (musicpd)
> listens on *:6600 (got that info from sockstat(1)), but I could connect to
> that port on only one IP. localhost (::1 or 127.0.0.1) did not work, but one

probably not much help w/r/t 2.6 - but I was able to use gmpc
to toggle back btw 10.x & 127.0.0.1 on my workstation

(in case this wasn't tested elsewhere)

#4 Updated by dillon almost 4 years ago

:> :Please do not CC me, since I already receive everything from these MLs.
:> :
:> :Regards,
:> :Rumko
:>
:> Is mpd using UDP? I think I may have been able to reproduce an issue
:> with UDP but I'm not sure yet.
:
:No, it's using TCP. Output of sockstat when it's working:
:Rumko ncmpc 1275 3 tcp4 127.0.0.1:1068 127.0.0.1:6600
:Rumko mpd 900 3 tcp4 127.0.0.1:6600 127.0.0.1:1068
:Rumko mpd 900 4 tcp4 *:6600 *:*
:
:Rumko

Ok, could you send me the config file you are using for it? I'm
trying to reproduce the environment and will then test connecting
to it.

-Matt
Matthew Dillon
<>

#5 Updated by rumcic almost 4 years ago

Matthew Dillon wrote:
> :> :Please do not CC me, since I already receive everything from these MLs.
> :> :
> :> :Regards,
> :> :Rumko
> :>
> :> Is mpd using UDP? I think I may have been able to reproduce an issue
> :> with UDP but I'm not sure yet.
> :
> :No, it's using TCP. Output of sockstat when it's working:
> :Rumko ncmpc 1275 3 tcp4 127.0.0.1:1068 127.0.0.1:6600
> :Rumko mpd 900 3 tcp4 127.0.0.1:6600 127.0.0.1:1068
> :Rumko mpd 900 4 tcp4 *:6600 *:*
> :
> :Rumko
>
> Ok, could you send me the config file you are using for it? I'm
> trying to reproduce the environment and will then test connecting
> to it.
>
> -Matt
> Matthew Dillon
> <>

Attached
--
Please do not CC me, since I already receive everything from these MLs.

Regards,
Rumko

#6 Updated by matthiasr about 3 years ago

mpd is poorly documented; from my experience you have to uncomment the
'bind_to_address "any"' line, at least with recent versions of mpd. No idea why
they bind to *:6600 and then don't accept connections if you don't, but with "any"
it works for me - I can connect locally, via IPv4 and IPv6.

Also available in: Atom PDF