Observations with multiple instances of Twonky Server 7

General discussion about the media server. Feature requests. Hints, tips and tricks.
Locked
User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag
Observations with multiple instances of Twonky Server 7

Post by phibertron » Sun Sep 02, 2012 1:30 am

Not many of you out there are looking to run multiple instances of Twonky Server
but it can give you the ability to have one server configured for general consumption
and have the other locked down to the bedroom tv or client,
or the ability to have one server for video, one for music, and one for photo's

The point of this post, is not to teach you how to do this
It is to point out that there is very different behavior
at this point in time with 7.0.9 on different platforms
The starting point to do this is different on linux and windows version
and the results are differnet, and as such so is the outcome

For Example on Windows:

On windows you first install twonky from the setup
and then from the command line manually install each individual server
twonkystarter -install or twonkystarter -install 0 are the same thing
this is what happens during the setup iinstall which is the first instance

2nd instance would be twonkystarter -install 1
3rd instance would be twonkystarter -install 2
4th instance would be twonkystarter -install 3

In the appdata folder it creates the following for a single instance


db
db\cache
db.info
twonky-config1.html
twonky-config.html
twonkyserver.ini
TwonkyServer-log.txt

In the appdata folder the following is additionally created
the (1) is relative to the -install # used when running twonkystarter


(1)db.info
(1)twonky-config1.html
(1)twonky-config.html
(1)twonkyserver.ini
(2)db.info
(2)twonky-config1.html
(2)twonky-config.html
(2)twonkyserver.ini
(3)db.info
(3)twonky-config1.html
(3)twonky-config.html
(3)twonkyserver.ini

NOTE:
take notice that it does not create additional db folders for each instance
which means they will be shareing the same database and cache
nor does it create additional log files for each instance
which means that all the instances will be writing to the same log file

For Example on Linux:

The Install on linux is done be either copying files or by running a script
and then from the command line manually running each individual server
with an instance switch, executing twonkystarter or twonkystarter -instance 0
are the same thing, it starts the first instance

2nd instance would be twonkystarter -instance 1
3rd instance would be twonkystarter -instance 2
4th instance would be twonkystarter -instance 3

In the appdata folder it creates the following for a single instance


/db
/db/cache
db.info
twonky-config1.html
twonky-config.html
twonkyserver.ini
TwonkyServer-log.txt

In the appdata folder the following is additionally created
the (1) is relative to the -instance # used when running twonkystarter


/db
/db/cache
/db1
/db1/cache
/db2
/db2/cache
/db3
/db3/cache
(1)db.info
(1)twonky-config1.html
(1)twonky-config.html
(1)twonkyserver.ini
(2)db.info
(2)twonky-config1.html
(2)twonky-config.html
(2)twonkyserver.ini
(3)db.info
(3)twonky-config1.html
(3)twonky-config.html
(3)twonkyserver.ini

NOTE:
take notice that it does create additional db folders for each instance
so the databases and cache are unique to each server instance
but it does not create additional log files for each instance
which means that all the instances will be writing to the same log file

There is an even further difference in how to two instances are created
in regards to the twonkyserver.ini creation

In the case of windows, all of the twonkyserver.ini files
are exactly the same internally, kind of odd at first glance

In the case if Linux, all of the twonkyserver.ini files
are unique, there internal settings are changed to reflect port and paths

These are some of the things I noticed when working on getting multiple instances
up and running on windows and linux
I just though that the differences I noticed would help get rid of any confusion for anyone who is interested in running multiple instances of twonky
The good news is that none of the differences are a bad thing, they each have a plus and a minues, it all depends on what you do or do not want as an outcome
just about everything can be remedied by adding additional startup parameters to twonkystarer and by editing the twonkyserver.ini files

PS
It is worth noting that one does not have to run multiple instances of twonkyproxy
as it is a middle man to twonky server
I havent played with twonkywebdav in this regard, but I suspect the same is true
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

ColinTaylor
Posts:9
Joined:Thu Jun 21, 2012 1:09 am
AV Hardware:Buffalo LS-XL

Re: Observations with multiple instances of Twonky Server 7

Post by ColinTaylor » Sun Sep 02, 2012 10:08 pm

Interesting stuff.

I can confirm this behavior on twonky-kirkwood-special-7.0.9 with the following exceptions.

All log files, by default, go in /tmp not the appdata directory. That's TwonkyServer-log.txt, proxy-log.txt and webdav-log.txt.

Copies of (n)twonky-config.html and (n)twonky-config1.html exist in the main twonky directory as well as appdata.

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Observations with multiple instances of Twonky Server 7

Post by phibertron » Sun Sep 02, 2012 10:17 pm

That it is =)
ColinTaylor wrote: All log files, by default, go in /tmp not the appdata directory. That's TwonkyServer-log.txt, proxy-log.txt and webdav-log.txt
yet another deviation on builds, I put a post up recently that shows something even more different

The twonky-powerpc-glibc-2.2.5-special-7.0.9 build is creating 2 folders in /tmp, /TwonkyServer and /twonkyserver
the /twonkyserver folder is getting files for twonkyproxy
and /TwonkyServer is getting the rest ofthe files

Note: it is remedied when useing an -appdata /somepath/somefoler switch when starting the services
except if you use -appdata /tmp/twonkyserver or -appdata /tmp/TwonkyServer
it seems to be ignoring the case and doing its own thing
ColinTaylor wrote: Copies of (n)twonky-config.html and (n)twonky-config1.html exist in the main twonky directory as well as appdata
Yeah, I didnt mention that, as those are actually created first, and then copied to the appdata folder
Thanks for the clarification that those do get created there also
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

ColinTaylor
Posts:9
Joined:Thu Jun 21, 2012 1:09 am
AV Hardware:Buffalo LS-XL

Re: Observations with multiple instances of Twonky Server 7

Post by ColinTaylor » Sun Sep 02, 2012 11:38 pm

phibertron wrote: The twonky-powerpc-glibc-2.2.5-special-7.0.9 build is creating 2 folders in /tmp, /TwonkyServer and /twonkyserver
the /twonkyserver folder is getting files for twonkyproxy
and /TwonkyServer is getting the rest ofthe files
On the kirkwood build the default appdata directory is /var/twonky/TwonkyServer and for twonkyproxy
it is /var/twonky/twonkyserver
Note: it is remedied when useing an -appdata /somepath/somefoler switch when starting the services
except if you use -appdata /tmp/twonkyserver or -appdata /tmp/TwonkyServer
it seems to be ignoring the case and doing its own thing
I reported here (http://www.twonkyforum.com/viewtopic.ph ... 294#p41294) that the -appdata parameter has no effect on twonkyproxy

Good eh?

Also, the webdavport= parameter in twonkyserver.ini appears to be ignored.

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: Observations with multiple instances of Twonky Server 7

Post by phibertron » Sun Sep 02, 2012 11:55 pm

with 7.0.9 on windows or linux I have noticed that the -appdata switch with twonkyproxy is being honored
except when -appdata /var/twonky/TwonkyServr or -appdata /var/twonky/twonkyserver are used
if I use twonkyserver -appdata /anypathotherthen the two I just listed
it works as expected

Im pretty sure that the webdavport= in the twonkyserver.ini has to be used
only when you change the port of twonkywebdav by starting it with a port switch
if you started twonkywebdav without giving it a new port
and changed webdavport=9876 then twonky server would not find it
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

Locked