Bug#813754: [Pkg-mpd-maintainers] Bug#813754: Bug#813754: Can't open port 6600 when run syste, -wide vis systemd
I just fixed a situation where I couldn't get mpd to work over my home network. I think it may be this same issue. On my system # sysctl net/ipv6/bindv6only net.ipv6.bindv6only = 1 netstat would show init listening on [::]:6600 but doesn't report the IPV6_V6ONLY socket state so I had missed there was no socket listening on ipv4. Adding [Socket] BindIPv6Only=both to the mpd.socket unit fixed my problem. On Mon, 12 Sep 2016 22:50:00 +0200 Florian Schlichtingwrote: > Control: tags 813754 +moreinfo > > Correct. > > > > > so port 6600 should be open and you > > > should see systemd listening there until the first connection is > > > actually made. > > > > > > What is the netstat output after system startup? > > > > # netstat -putan | grep mpd > > tcp0 0 0.0.0.0:80000.0.0.0:* LISTEN > > 721/mpd > > > > Nos I never though of grepping 6600: > > > > # netstat -putan | grep 6600 > > tcp6 0 0 :::6600 :::*LISTEN > > 1/init
Bug#813754: [Pkg-mpd-maintainers] Bug#813754: Bug#813754: Can't open port 6600 when run syste, -wide vis systemd
On martes, 13 de septiembre de 2016 12:45:17 A. M. ART Florian Schlichting wrote: > On Mon, Sep 12, 2016 at 06:36:00PM -0300, Lisandro Damián Nicanor Pérez Meyer wrote: > > I expect that, if the daemon is not running and a client tries to connect > > to port 6600 then systemd will start the daemon and the client wouldn't > > even notice it. > > yes, and that works for me. Not for me I'm afraid ;-) [snip] I'll happily test this once my machine is back online, as I recently moved. I'm afraid testing this will probably take me more than a week. > I can't imagine why that may be. Are you sure you're running with the same > mpd config in both cases, and it's not just an artefact of systemd starting > an mpd with an empty music database? I've just configured /etc/mpd.conf. As I wrote above, I'll happily re test once the machine is up. -- Wiki is not WysiWyg. It's an intelligence test of sorts to be able to edit a wiki page. It's not rocket science, but it doesn't appeal to the VideoAddicts. If it doesn't appeal, they don't participate, which leaves those of us who read and write to get on with rational discourse. http://www.c2.com/cgi/wiki?WhyWikiWorks Lisandro Damián Nicanor Pérez Meyer http://perezmeyer.com.ar/ http://perezmeyer.blogspot.com/ signature.asc Description: This is a digitally signed message part.
Bug#813754: [Pkg-mpd-maintainers] Bug#813754: Bug#813754: Can't open port 6600 when run syste, -wide vis systemd
On Mon, Sep 12, 2016 at 06:36:00PM -0300, Lisandro Damián Nicanor Pérez Meyer wrote: > I expect that, if the daemon is not running and a client tries to connect to > port 6600 then systemd will start the daemon and the client wouldn't even > notice it. yes, and that works for me. 1) There is no mpd running, mpd.service is inactive, while mpd.socket is active and PID 1/systemd is listening on port 6600: [fs@tp] 1 (~): pgrep mpd (empty) [fs@tp] 2 (~): systemctl status mpd.service mpd.service - Music Player Daemon Loaded: loaded (/lib/systemd/system/mpd.service; disabled; vendor preset: enabled) Active: inactive (dead) since Di 2016-09-13 00:10:44 CEST; 9s ago [...] [fs@tp] 3 (~): systemctl status mpd.socket mpd.socket Loaded: loaded (/lib/systemd/system/mpd.socket; disabled; vendor preset: enabled) Active: active (listening) since Di 2016-09-13 00:09:40 CEST; 1min 23s ago Listen: /run/mpd/socket (Stream) [::]:6600 (Stream) [fs@tp] 4 (~): sudo netstat -lntp | grep 6600 tcp6 0 0 :::6600 :::*LISTEN 1/systemd 2) Now if I issue a command to the socket (either through mpc or by starting up MPDroid), the mpd.service unit is activated, an mpd process is started, but port 6600 still seems to be owned by systemd: [fs@tp] 5 (~): mpc -h localhost play Adele/Adele - Hello.mp3 [playing] #2/3 0:14/6:07 (3%) volume: n/a repeat: off random: off single: off consume: off [fs@tp] 6 (~): systemctl status mpd.service mpd.service - Music Player Daemon Loaded: loaded (/lib/systemd/system/mpd.service; disabled; vendor preset: enabled) Active: active (running) since Di 2016-09-13 00:12:48 CEST; 15min ago [fs@tp] 7 (~): pgrep mpd 25884 [fs@tp] 8 (mpd/mpd): sudo netstat -lntp | grep 6600 tcp6 0 0 :::6600 :::*LISTEN 1/systemd > That's not happening. I can't imagine why that may be. Are you sure you're running with the same mpd config in both cases, and it's not just an artefact of systemd starting an mpd with an empty music database? > > netstat output doesn't show > > "mpd", but everything still works as one would expect, no? > > No, the client can't reach the server unless I start mpd as described in the > bug. Since netstat shows "something" listening on port 6600, what does mpc -h localhost status show? What do you get when you 'telnet localhost 6600'? Florian
Bug#813754: [Pkg-mpd-maintainers] Bug#813754: Bug#813754: Can't open port 6600 when run syste, -wide vis systemd
Control: tag -1 - moreinfo On lunes, 12 de septiembre de 2016 10:50:00 P. M. ART Florian Schlichting wrote: > Hi Lisandro, Hi! > back in February you reported #813754 against mpd, claiming it would not > open port 6600 if started via systemd. > > I just re-read our email exchange, and I think you'were just confused > about how systemd socket activation works. I expect that, if the daemon is not running and a client tries to connect to port 6600 then systemd will start the daemon and the client wouldn't even notice it. That's not happening. If I'm still wrong in my expectations about systemd and sockets, please read below at least to understand what I see as a bug. > netstat output doesn't show > "mpd", but everything still works as one would expect, no? No, the client can't reach the server unless I start mpd as described in the bug. > Please confirm that #813754 doesn't need to be kept open, or else please > describe what is not working for you? I would expect turning on my machine, fire my mpd android client app and enjoy music :) But I'm getting a client that can't connect to the server unless I start mpd as described in the bug. -- Gabardinas "Windows 95". Se cuelgan solas. Lisandro Damián Nicanor Pérez Meyer http://perezmeyer.com.ar/ http://perezmeyer.blogspot.com/ signature.asc Description: This is a digitally signed message part.
Bug#813754: [Pkg-mpd-maintainers] Bug#813754: Bug#813754: Can't open port 6600 when run syste, -wide vis systemd
Control: tags 813754 +moreinfo Hi Lisandro, back in February you reported #813754 against mpd, claiming it would not open port 6600 if started via systemd. I just re-read our email exchange, and I think you'were just confused about how systemd socket activation works. netstat output doesn't show "mpd", but everything still works as one would expect, no? Please confirm that #813754 doesn't need to be kept open, or else please describe what is not working for you? Florian On Tue, Feb 09, 2016 at 01:16:15AM -0300, Lisandro Damián Nicanor Pérez Meyer wrote: > On Monday 08 February 2016 21:21:20 you wrote: > > Hi Lisandro, > > > > > Hi! I use mpd on my personal machine as a system service, without > > > pulseaudio. > > > > > > I noticed that if I let mpd start via systemd port 6600 will not be > > > opened. > > > > mpd uses systemd's socket activation feature, as defined in > > /lib/systemd/system/mpd.socket, > > Correct. > > > so port 6600 should be open and you > > should see systemd listening there until the first connection is > > actually made. > > > > What is the netstat output after system startup? > > # netstat -putan | grep mpd > tcp0 0 0.0.0.0:80000.0.0.0:* LISTEN > 721/mpd > > Nos I never though of grepping 6600: > > # netstat -putan | grep 6600 > tcp6 0 0 :::6600 :::*LISTEN > 1/init