[Pkg-mpd-maintainers] Bug#970444: Can't connect to httpd stream on MPD
James Klaas
jklaas at appalachian.dyndns.org
Wed Sep 16 18:28:22 BST 2020
On Wed, 16 Sep 2020 15:54:21 +0200 kaliko <kaliko at azylum.org> wrote:
> Hi James,
>
> 16/09/2020 at 15:35, James Klaas wrote :
> > […]
> > If I try to connect to the httpd stream with curl for testing I get
> > the following:
> >
> > curl http://192.168.47.122:8000
> > curl: (7) Failed to connect to 192.168.47.122 port 8000: Connection refused
> >
> > I can connect to the 6600 port without issue:
> >
> > curl http://192.168.47.122:6600
> > OK MPD 0.21.11
> >
> > If I talk to the mpd server and ask for outputs, it says the stream is enabled:
> >
> > mpc -h 192.168.47.122 outputs
> > Output 1 (My HTTP Stream) is enabled
>
> No firewall running on 192.168.47.122 ?
> You can check mpd is actually listening on 8000 with lsof or ss commands :
>
> lsof -Pan -p MPD_PID -i
> ss -antlp
>
> Do you have anything in mpd logs (enable verbose logging)?
>
> Cheers,
> k
>
I do have iptables running on this host. I disabled them and had the same issue:
root at myhost:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
root at myhost:~# service mpd stop
root at myhost:~# service mpd start
root at myhost:~# curl http://192.168.144.122:8000
curl: (7) Failed to connect to 192.168.144.122 port 8000: Connection refused
I tried other commands you mentioned:
root at myhost:/etc/cron.weekly# ps -ef | grep mpd
mpd 10880 1 0 Sep14 ? 00:00:00 /usr/bin/mpd
--no-daemon --verbose /etc/mpd.conf
root 20280 9932 0 12:41 pts/3 00:00:00 grep mpd
root at myhost:/etc/cron.weekly# lsof -Pan -p 10880 -i
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mpd 10880 mpd 4u IPv6 114131524 0t0 TCP *:6600 (LISTEN)
root at myhost:/etc/cron.weekly# ss -antlp | grep mpd
LISTEN 0 5 *:6600
*:* users:(("mpd",pid=10880,fd=4),("systemd",pid=1,fd=108))
I greped for mpd since the list of services is quite large. I wanted
to check there was nothing conflicting on port 8000:
root at myhost:~# ss -antlp | grep 8000
I don't see anything odd in the logs, when set to verbose:
Sep 14 16:12 : zeroconf: No global port, disabling zeroconf
Sep 14 16:12 : state_file: Loading state file /var/lib/mpd/state
Sep 14 16:13 : client: [0] opened from 192.168.47.122:57198
Sep 14 16:13 : client: [0] malformed command "GET / HTTP/1.1"
Sep 14 16:13 : client: [0] closed
Sep 14 16:20 : client: [1] opened from local
Sep 14 16:20 : client: [1] process command "outputs"
Sep 14 16:20 : client: [1] command returned 0
Sep 14 16:20 : client: [1] closed
-------
I tried adding port 8000 to /lib/systemd/system/mpd.socket under the
"[Socket]" section and ran "systemctl daemon-reload". But that seems
to only expose the socket to port 8000.
Is another section needed in /lib/systemd/system/mpd.socket to open up
8000 to the httpd server in mpd?
Thanks
James
More information about the Pkg-mpd-maintainers
mailing list