[BUG] Twonky Server wont start with empty appdata dir folder

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
[BUG] Twonky Server wont start with empty appdata dir folder

Post by phibertron » Fri Jul 25, 2014 4:25 pm

On all of the Windows version of Twonky Server 7.2.x and 7.3
there is an issue with the Twonky appdata directory that could cause the server to not start
NOTE: I am NOT seeing this issue on the NAS builds
If the twonky appdata directory is empty or does not exist, the server will not start correctly

I can see that if the directory doesnt exist it could be a problem
but an empty one should not be an issue, as it never has been in the past
as the server would normally create the files needed on startup

This is what exist right after installation

Code: Select all

07/25/2014  10:39 AM    <DIR>          .
07/25/2014  10:39 AM    <DIR>          ..
07/25/2014  10:34 AM                 0 byebye
07/25/2014  10:39 AM    <DIR>          db
07/25/2014  10:34 AM                69 db.info
07/25/2014  10:39 AM                69 db.info_bak
07/25/2014  10:39 AM    <DIR>          pdb
07/25/2014  10:39 AM    <DIR>          proxy
07/25/2014  10:34 AM            16,474 proxy-log.txt
07/25/2014  10:34 AM               314 report-info.xml
07/25/2014  10:39 AM    <DIR>          tuner
07/25/2014  10:34 AM               329 twonky-config.html
07/25/2014  10:34 AM               317 twonky-config1.html
07/25/2014  10:34 AM               934 twonky-locations-70.db
07/25/2014  10:34 AM               177 twonky.dat
05/09/2014  05:36 AM             1,408 twonky.license
07/25/2014  10:34 AM                 4 twonkyproxy.info
07/25/2014  10:34 AM             3,014 TwonkyServer-log.txt
07/25/2014  10:34 AM            28,830 twonkyserver.ini
If I stop twonkyserver and twonkyproxy, and delete the contents of the appdata dir
this is what I see when I start them back up

Code: Select all

07/25/2014  11:12 AM    <DIR>          .
07/25/2014  11:12 AM    <DIR>          ..
07/25/2014  11:12 AM                 0 byebye
07/25/2014  11:12 AM    <DIR>          db
07/25/2014  11:12 AM                23 db.info
07/25/2014  11:12 AM    <DIR>          proxy
07/25/2014  11:12 AM               298 proxy-log.txt
07/25/2014  11:12 AM                 9 twonky-locations-70.db
07/25/2014  11:12 AM                 4 twonkyproxy.info
07/25/2014  11:12 AM             6,200 TwonkyServer-log.txt
07/25/2014  11:12 AM             1,786 twonkyserver.ini
Looking at the log file, you will see this

Code: Select all

07/25/14 11:12:31:361 [Critical] - LOG_SYSTEM: upnp_mediaserver_start : no valid license found
07/25/14 11:12:31:361 [Critical] - LOG_SYSTEM: Error code:  2 (00000002) The system cannot find the file specified.
I have narrowed it down to this
if these two files exist in the appdata dir, then things will work as expected
just having the file "twonky.license" wasn't enough to start it, I need both of the below

Code: Select all

twonky.dat
twonky.license
After copying those two files from my backup of the appdata dir into the current appdata dir
Twonky Server will then start as expected

Code: Select all

07/25/2014  11:15 AM    <DIR>          .
07/25/2014  11:15 AM    <DIR>          ..
07/25/2014  11:12 AM                 0 byebye
07/25/2014  11:15 AM    <DIR>          db
07/25/2014  11:15 AM                69 db.info
07/25/2014  11:12 AM    <DIR>          proxy
07/25/2014  11:12 AM               298 proxy-log.txt
07/25/2014  11:15 AM               314 report-info.xml
07/25/2014  11:15 AM                 0 tsbyebye
07/25/2014  11:15 AM    <DIR>          tuner
07/25/2014  11:15 AM               329 twonky-config.html
07/25/2014  11:15 AM               317 twonky-config1.html
07/25/2014  11:15 AM               934 twonky-locations-70.db
07/25/2014  10:34 AM               177 twonky.dat
05/09/2014  05:36 AM             1,408 twonky.license
07/25/2014  11:12 AM                 4 twonkyproxy.info
07/25/2014  11:15 AM            32,732 TwonkyServer-log.txt
07/25/2014  11:15 AM            28,830 twonkyserver.ini
If one doesn't have these files, they will have to uninstall and reinstall to get them back
This was never an issue in the past, and is not being seen in the nas builds
I haven't tested the OSX versions yet, but it is an issue on the Windows builds
.
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

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: [BUG] Twonky Server wont start with empty appdat dir fol

Post by phibertron » Fri Jul 25, 2014 7:42 pm

You can see that the files are being extracted during the install procedure from this install log
Output folder: C:\Program Files\Twonky\TwonkyServer\license
Extract: twonky.dat
Extract: twonky.license
Remove folder: C:\Documents and Settings\All Users\Application Data\TwonkyServer\
Create folder: C:\Documents and Settings\All Users\Application Data\TwonkyServer
Copy to C:\Documents and Settings\All Users\Application Data\TwonkyServer
Copy to C:\Documents and Settings\All Users\Application Data\TwonkyServer
Delete file: C:\Program Files\Twonky\TwonkyServer\license\twonky.dat
Delete file: C:\Program Files\Twonky\TwonkyServer\license\twonky.license
Remove folder: C:\Program Files\Twonky\TwonkyServer\license\
.
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