![]() |
MPD: Failed to bind socket: Address already in use - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: MPD: Failed to bind socket: Address already in use (/showthread.php?tid=2092) |
MPD: Failed to bind socket: Address already in use - mohel - 01-18-2020 Hello, I installed moode on a raspberry Z W as described in the setup guide and everything works fine. Only access to mpd server over some clients did not work. I found you, that some clients resolve the hostname to an IPV6 adress of the raspberry. Using IPV6 the access does not work, with IPV4 it works fine. With some internet help I get to the following error when MPD is started manually (also stopped mpd mannuelly berforehand and check with ps ax): Code: pi@MusikBadOG:~ $ mpd --no-daemon --stdout --verbose /etc/mpd.conf /etc/mpd.conf contains the following: Code: bind_to_address "any" Also played around a little bit with /proc/sys/net/ipv6/bindv6only tried 0 and 1 as values, but doesn't change anything. What can I do to have port 6600 available on IPv4 and IPv6 at the same time?` Thanks! RE: MPD: Failed to bind socket: Address already in use - TheOldPresbyope - 01-18-2020 @mohel Interesting question. I have no practical experience configuring dual-stack systems but I had been led to believe that the port issue is handled automagically. Apparently not. The only dual-stack systems on my LAN are my moOde players. Running netstat on one confirms what you say: Code: pi@moodeCD:~ $ sudo netstat -tlnp I'll poke around because I'm curious but maybe someone else already knows the answer. Regards, Kent RE: MPD: Failed to bind socket: Address already in use - Tim Curtis - 01-18-2020 (01-18-2020, 01:08 PM)mohel Wrote: Hello, What clients are you talking about? moOde access MPD via localhost. RE: MPD: Failed to bind socket: Address already in use - TheOldPresbyope - 01-18-2020 @mohel On the specific question of MPD, which is the listener on port 6600, have a look at STEP 6 of moOde's build recipe. The MPD compile option list in item 4 of this step includes "--disable-ipv6". You can follow the instructions in this step to build a new copy of MPD with IPv6 support enabled and see if this solves your problem. You should be aware that a number of blog and forum posts can be found on the Web commenting on problems relating to MPD listening to IPv4 and IPv6. Some posters offer configuration "fixes". This suggests proceeding cautiously. Regards, Kent RE: MPD: Failed to bind socket: Address already in use - mohel - 01-26-2020 Hello, sorry for the late resposne but had some private topics. @Tim Curtis: I tested access with M.A.L.P. on Android and Cantata on Windows 10. Using both on local network with Fritzbox 7590 as DNS Server for local requests. Both resolve to the IPV6 address so I need to configure the IPV4 adress as fixed value and connot use the hostname. @TheOldPresbyope: Thanks for the infomration. The problem is, that when I change mpd.conf to: Code: bind_to_address "::" and test again I get the following: Code: pi@MusikBadOG:~ $ mpd --no-daemon --stdout --verbose /etc/mpd.conf So IPV6 support seems to be implemented, because then I can connect using IPV6 (but only). Any other suggestions? :-) Thanks for your help! RE: MPD: Failed to bind socket: Address already in use - Tim Curtis - 01-26-2020 (01-26-2020, 06:59 PM)mohel Wrote: Hello, I don't provide any support whatsoever for these external clients. You should contact their project maintainers for support. RE: MPD: Failed to bind socket: Address already in use - mohel - 01-27-2020 (01-26-2020, 07:26 PM)Tim Curtis Wrote:(01-26-2020, 06:59 PM)mohel Wrote: Hello, Yea I understand absoltely, but in my opinion this is not a client specific error, because every systeme that uses IPV6 to resolve has the same error. Because when I configure these clients with the IPv4 adress this works correct. So from point of view the mpd server has problems to use port 6600 on IPv4 and IPv6 simultaneously. RE: MPD: Failed to bind socket: Address already in use - Tim Curtis - 01-27-2020 Try posting the question in MPD Git repo. https://github.com/MusicPlayerDaemon/MPD/issues RE: MPD: Failed to bind socket: Address already in use - TheOldPresbyope - 01-28-2020 @mohel You didn't say, but I assume you did rebuild mpd to include IPv6 support so it now shows up as an "other feature" Code: pi@moodecd:~ $ mpd --version I'm going to ignore the fail_to_bind messages you're showing because it appears you're trying to start a second copy of mpd. Mutiple copies can't use the same port(s). When I overwrite /usr/local/bin/mpd with my rebuilt mpd, update the cfg_mpd table in /var/local/www/db/moode-sqlite3.db to reflect the change in the value of "bind_to_address", and reboot, I get essentially the same netstat output as you. However, even though netstat suggests my rebuilt mpd is listening only for IPv6 connections on port 6600, I'm able to connect to it via IPv4. This seems to contradict what you said earlier. Here, from Linux host T520 connecting to my rebuilt mpd running on host moodecd: Code: xxxx@T520 ~ $ telnet -4 moodecd 6600 I think other tools like ss and lsof may be more useful than netstat in understanding this but I'm not expert in interpreting their output in a dual-stack network environment. Looking at the following output from a moOde 6.4.1 player Code: pi@moodecd:~ $ ip a it would seem that a moOde player (which is to say, Raspbian) does set up IPv6 support but only enables link-local addresses ("scope link"). This suggests that competent pull requests posted to the moOde repo are in order. Who's up to the task? Not me. I can spell IPv6 but I can't claim a working knowledge of it. Setting up global (e.g., routable) IPv6 addresses, setting up dual IPv4/IPv6 DNS---yada yada yada---haven't done it. Regards, Kent RE: MPD: Failed to bind socket: Address already in use - Tim Curtis - 01-28-2020 Kent, this is not a moOde issue. |