Here is the config section of my /etc/init.d/subsonic file:
- Code: Select all
SUBSONIC_ARGS="--host=0.0.0.0"
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Subsonic Daemon"
NAME=subsonic
PIDFILE=/var/run/$NAME.pid
DAEMON=/usr/bin/$NAME
DAEMON_ARGS="--pidfile=$PIDFILE $SUBSONIC_ARGS"
SCRIPTNAME=/etc/init.d/$NAME
Subsonic is running:
- Code: Select all
tekniklr@eldritch:rc2.d $ ps aux | grep subsonic
root 8803 0.0 0.2 40412 9548 ? Ss 00:16 0:00 gvim /etc/init.d/subsonic
root 8886 1.8 1.7 228044 74488 pts/1 Sl 00:16 0:08 java -Xmx64m - subsonic.home=/var/subsonic -Dsubsonic.host=0.0.0.0 -Dsubsonic.port=4040 -Dsubsonic.contextPath=/ -Dsubsonic.defaultMusicFolder=/var/music -Dsubsonic.defaultPodcastFolder=/var/music/Podcast -Dsubsonic.defaultPlaylistFolder=/var/playlists -jar subsonic-booter-jar-with-dependencies.jar
root 8932 0.0 0.0 2880 640 pts/2 S+ 00:16 0:00 tail -f /var/subsonic/subsonic_sh.log
tekniklr 10281 0.0 0.0 2944 836 pts/1 S+ 00:24 0:00 grep --color=auto -i subsonic
And the port is open:
- Code: Select all
tekniklr@eldritch:rc2.d $ netstat -ltn | grep LISTEN | grep 4040
tcp6 0 0 :::4040 :::* LISTEN
However, http://localhost:4040 does not work.
Comparing the subsonic port to a known working port (631/cups) I saw this:
- Code: Select all
tekniklr@eldritch:rc2.d $ netstat -ltn | grep LISTEN | grep 631
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
Cups got two lines, and subsonic only got one.
Looking in /etc/hosts, I saw:
- Code: Select all
# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Sure enough, browsing to http://ip6-localhost:4040 WORKS.
The only problem with that is, it won't work from outside my network.
What do I do to make subsonic work in ip4 and ip6, a la cups?
