[Pkg-mpd-maintainers] Bug#813754: Bug#813754: Bug#813754: Can't open port 6600 when run syste, -wide vis systemd
Florian Schlichting
fsfs at debian.org
Mon Sep 12 22:45:17 UTC 2016
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 at tp] 1 (~): pgrep mpd
(empty)
[fs at 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 at 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 at 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 at 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 at 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 at tp] 7 (~): pgrep mpd
25884
[fs at 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
More information about the Pkg-mpd-maintainers
mailing list