You are not logged in.
I am setting up an audio streaming server/client at the moment. My server is running sshd and mpd. I can connect to it via ssh without any problems at all, but when I try to connect to mpd with sonata, the shell output of sonata is:
Cannot connect to MPD: (111, 'Connection refused')
Here is my /etc/hosts.allow:
#
# /etc/hosts.allow
#
sshd:192.168.1.211:22
mpd:192.168.1.211:6600
# End of file
I would post my /etc/mpd.conf, but I'm just copying stuff from the ssh shell. It's real plain anyway, just a copy of the template with the home folder stuff uncommented.
What can I do to connect to the server?
Offline
Potentially stupid question: is mpd running?
Offline
Yeah. But always good to check!
[root@radio ~]# ps -A
PID TTY TIME CMD
1 ? 00:00:01 init
2 ? 00:00:00 kthreadd
3 ? 00:00:00 migration/0
4 ? 00:00:00 ksoftirqd/0
5 ? 00:00:00 watchdog/0
6 ? 00:00:00 events/0
7 ? 00:00:00 khelper
31 ? 00:00:00 kblockd/0
32 ? 00:00:00 kseriod
56 ? 00:00:00 kapmd
61 ? 00:00:00 pdflush
62 ? 00:00:00 pdflush
63 ? 00:00:00 kswapd0
64 ? 00:00:00 aio/0
192 ? 00:00:00 ata/0
193 ? 00:00:00 ata_aux
201 ? 00:00:00 scsi_eh_0
203 ? 00:00:00 scsi_eh_1
507 ? 00:00:00 ksuspend_usbd
510 ? 00:00:00 khubd
704 ? 00:00:00 kjournald
749 ? 00:00:00 udevd
1640 ? 00:00:00 kgameportd
2154 ? 00:00:00 syslog-ng
2187 ? 00:00:00 crond
2196 ? 00:00:00 sshd
2207 ? 00:00:00 mpd
2210 tty1 00:00:00 login
2211 tty2 00:00:00 agetty
2212 tty3 00:00:00 agetty
2213 tty4 00:00:00 agetty
2214 tty5 00:00:00 agetty
2215 tty6 00:00:00 agetty
2230 tty1 00:00:00 bash
2244 ? 00:00:00 dhcpcd
2250 ? 00:00:00 sshd
2253 pts/0 00:00:00 bash
2265 pts/0 00:00:00 ps
Offline
Okay, now let's see what port it's listening on:
sudo netstat -nlp | grep mpd
Offline
Uh oh ... I see what you're getting at!
[root@radio ~]# netstat -nlp | grep mpd
tcp 0 0 127.0.0.1:6600 0.0.0.0:* LISTEN 2212/mpd
Offline
It only listens on localhost. Make it listen on your external IP, and change the Sonata settings too.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Make it listen on your external IP, and change the Sonata settings too.
You could, but it's nominally less secure (I trust ssh security more than mpd security, and the former can be set up to run with keys, which is a Good Thing(tm)). If you care about that, keep the mpd config as it is, and instead create your ssh tunnel thusly:
ssh -L 6600:localhost:6600 host.running.mpd
and point sonata to localhost:6600.
Offline
Tunneling it over SSH makes it indeed more secure, however, this is a LAN interface, so it's not that easy to get to .
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Ahh ... coming together
Here's an easy one: how would one find the full name of the host, i.e. host.running.mpd?
Offline
The IP address will suffice.
Offline
Bam!
I'm at home now, but I walked out of the office earlier today hearing the sweet, sweet sounds of mpd. Works like a charm! I really appreciate the help!
btw - sorry for asking a pretty obvious question!
Offline