Page 1 of 1
Can not get to twonky server web interface on same network
Posted: Wed Mar 31, 2010 3:19 am
by vonedaddy
I have had twonky up and running for about a year and a half or so. I decided to install the newest version, what a mistake. The server works fine from my linux machine (
http://127.0.0.1:9000) but I can not access it from other machines on the same network, including my PS3.
firewall is open (iptables) as it always has been... Any ideas?
Re: Can not get to twonky server web interface on same network
Posted: Wed Mar 31, 2010 5:24 pm
by DaemonBeetle
What does the following show:
Re: Can not get to twonky server web interface on same network
Posted: Mon Apr 05, 2010 2:24 am
by vonedaddy
Sorry it took me so long to respond, had some family issues...
[root@bighat ~]# netstat -pant|grep 9000
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1701/twonkymediaser
Re: Can not get to twonky server web interface on same network
Posted: Mon Apr 05, 2010 12:59 pm
by DaemonBeetle
Twonky is configured to only listen on loopback (127.0.0.1 - localhost). I'm guessing that's a feature of the package you installed.
What version of Linux did you install and how did you install Twonky? I'm guessing that in your twonkymedia-server.ini you'll find that the IP has been explicitly set to 127.0.0.1. Try removing 127.0.0.1 from "ip=127.0.0.1" and then restart Twonky.
Re: Can not get to twonky server web interface on same network
Posted: Mon Apr 05, 2010 10:54 pm
by vonedaddy
Thanks, but on the web config page (when accessed via local machine) I see this:
Network Interfaces: 127.0.0.1
10.0.0.4
192.168.1.2
Does that not mean that it is configured for all interfaces?
Thanks in advance for the help!
Re: Can not get to twonky server web interface on same network
Posted: Mon Apr 05, 2010 11:20 pm
by DaemonBeetle
DaemonBeetle wrote:What version of Linux did you install and how did you install Twonky?
It could be a startup option or something else, but we need more information. It would also help if you mentioned the version number of Twonky you installed.
Re: Can not get to twonky server web interface on same network
Posted: Tue Apr 06, 2010 11:11 pm
by vonedaddy
I installed the newest version, just downloaded last week. Is there a way I can get the version number from the command line?!?!
Re: Can not get to twonky server web interface on same network
Posted: Wed Apr 07, 2010 1:12 am
by DaemonBeetle
The GUI will tell you.
Now, the other question is - what version of Linux did you install (eg Debian 4.0, Ubuntu 9.10, RedHat 4, etc)?
Re: Can not get to twonky server web interface on same network
Posted: Wed Apr 07, 2010 2:28 am
by vonedaddy
GUI says: 5.1.3-dev
Linux is Fedora 11
Re: Can not get to twonky server web interface on same network
Posted: Wed Apr 07, 2010 2:34 am
by vonedaddy
I also have an update, someone told me to delete the .ini file so I did then restarted the server with /etc/init.d/twonkyserver restart
Now I am able to see the server from any client, but if I reboot the machine nothing.
Re: Can not get to twonky server web interface on same network
Posted: Wed Apr 07, 2010 8:43 am
by DaemonBeetle
Is it running after a reboot? Did you add it to the system startup?
Re: Can not get to twonky server web interface on same network
Posted: Thu Apr 08, 2010 1:55 am
by vonedaddy
Yes it is running after reboot, the problem is its only listening on the loopback after boot.
Two processes are started at boot:
root 1975 1 0 Apr06 ? 00:00:00 /usr/local/twonkymedia/twonkymedia -D
root 1976 1975 0 Apr06 ? 00:05:56 /usr/local/twonkymedia/twonkymediaserver -D
Re: Can not get to twonky server web interface on same network
Posted: Thu Apr 08, 2010 2:03 am
by vonedaddy
I did some testing and after a reboot just restarting the server makes it listen on all interfaces, I am guessing the twonky process is either starting before networking is up, or before each interface gets an IP address.
BTW, I have 2 NICs in the machine.
Re: Can not get to twonky server web interface on same network
Posted: Thu Apr 08, 2010 2:16 am
by vonedaddy
So what I suspected seems to be right. I added a sleep command into the shell script to make the script wait a minute before continuing which would give the network time to come up. I rebooted and now twonky started and in listening on all interfaces.
Code: Select all
[root@bighat init.d]# cat twonkyserver
#!/bin/sh
#
# MediaServer Control File written by Itzchak Rehberg
# Modified for fedora/redhat by Landon Bradshaw <phazeforward@gmail.com>
# Adapted to TwonkyMedia 3.0 by TwonkyVision GmbH
# Adapted to TwonkyMedia 4.0 by TwonkyVision GmbH
# Adapted to TwonkyMedia 5.0 by PacketVideo
#
# This script is intended for SuSE and Fedora systems.
#
#
###############################################################################
#
### BEGIN INIT INFO
# Provides: twonkyserver
# Required-Start: $network $remote_fs
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: TwonkyMedia UPnP server
### END INIT INFO
#
# Comments to support chkconfig on RedHat/Fedora Linux
# chkconfig: 345 71 29
# description: TwonkyMedia UPnP server
#
#==================================================================[ Setup ]===
WORKDIR1="/usr/local/twonkymedia"
WORKDIR2="`dirname $0`"
PIDFILE=/var/run/mediaserver.pid
#=================================================================[ Script ]===
############# Add sleep to give the network some time to come up #########################################
sleep 60
# Source function library.
if [ -f /etc/rc.status ]; then
# SUSE
. /etc/rc.status
rc_reset
else
# Reset commands if not available
rc_status() {
case "$1" in
-v)
true
;;
*)
false
;;
esac
echo
}
alias rc_exit=exit
fi
if [ -x "$WORKDIR1" ]; then
WORKDIR="$WORKDIR1"
else
WORKDIR="$WORKDIR2"
fi
DAEMON=twonkymedia
TWONKYSRV="${WORKDIR}/${DAEMON}"
cd $WORKDIR
case "$1" in
start)
if [ -e $PIDFILE ]; then
PID=`cat $PIDFILE`
echo "TwonkyMedia server seems already be running under PID $PID"
echo "(PID file $PIDFILE already exists). Checking for process..."
running=`ps --no-headers -o "%c" -p $PID`
if ( [ "${DAEMON}"=="${running}" ] ); then
echo "Process IS running. Not started again."
else
echo "Looks like the daemon crashed: the PID does not match the daemon."
echo "Removing flag file..."
rm $PIDFILE
$0 start
exit $?
fi
exit 0
else
if [ ! -x "${TWONKYSRV}" ]; then
echo "TwonkyMedia server not found".
rc_status -u
exit $?
fi
echo -n "Starting $TWONKYSRV ... "
"$TWONKYSRV" -D
rc_status -v
fi
;;
stop)
if [ ! -e $PIDFILE ]; then
echo "PID file $PIDFILE not found, stopping server anyway..."
killall -s TERM twonkymedia
rc_status -u
exit 3
else
echo -n "Stopping Twonky MediaServer ... "
PID=`cat $PIDFILE`
kill -s TERM $PID
rm -f $PIDFILE
rc_status -v
fi
;;
reload)
if [ ! -e $PIDFILE ]; then
echo "PID file $PIDFILE not found, stopping server anyway..."
killall -s TERM twonkymedia
rc_status -u
exit 3
else
echo -n "Reloading Twonky server ... "
PID=`cat $PIDFILE`
kill -s HUP $PID
rc_status -v
fi
;;
restart)
$0 stop
$0 start
;;
status)
if [ ! -e $PIDFILE ]; then
running="`ps ax --no-headers | grep -e twonkymedia | grep -v grep | grep -v twonkymedia.sh | cut -d ' ' -f 1`"
if [ "${running}" == "" ]; then
echo "No TwonkyMedia server is running"
else
echo "A TwonkyMedia server seems to be running with PID ${running}, but no PID file exists."
echo "Probably no write permission for ${PIDFILE}."
fi
exit 0
fi
PID=`cat $PIDFILE`
running=`ps --no-headers -o "%c" -p $PID`
if ( [ "${DAEMON}"=="${running}" ] ); then
echo "TwonkyMedia server IS running."
else
echo "Looks like the daemon crashed: the PID does not match the daemon."
fi
;;
*)
echo ""
echo "TwonkyMedia server"
echo "------------------"
echo "Syntax:"
echo " $0 {start|stop|restart|reload|status}"
echo ""
exit 3
;;
esac
rc_exit