Mantis - Resin
Viewing Issue Advanced Details
6347 minor always 05-21-20 13:40 10-01-23 06:53
nam  
 
normal  
new 4.0.64  
open  
none    
none  
0006347: manual webapp file changes are overwritten on restart
(rep by G. Glenn)

nam: summarized to the following steps, still need to reproduce on my side:
    1. ROOT with lots of files
    2. stop Resin
    3. delete ROOT
    4. start Resin
    5. stop Resin
    6. create ROOT with single index.html
    7. start Resin
    8. ROOT replaced with old one with lots of files

https://groups.google.com/forum/#!msg/caucho-resin/gSJs_L2KnoU/V6c6j2wrAgAJ [^]

Test 1:
I stopped resin
I removed all directories and files from webapps (ROOT and travelcon.war) and started resin.
Result: ROOT folder was not created and travelcon.war was created with minimal files
Theory: resin-data was not called upon because ROOT directory did not exist to compare against

Test 2:
I stopped resin
I removed all directories and files from webapps (ROOT and travelcon.war) then...
I manually created ROOT directory (webapps/ROOT) and placed a single index.html file with "root" as its contents
I manually created travelcon.war directory (webapps/travelcon.war) and placed a single index.html file with "travelcon" as its contents
NOTE: the above actions were performed so I could tell if webbaps/ROOT was being overwritten by webapps/travecon.war
I started resin
Result: webapps/ROOT was not replaced with webapps/travelcon.war (with a single index.html) file BUT it was replaced with my entire application that should exist in webapps/travelcon.war (with many files, directories, libraries,etc)
NOTE: at this time I knew the issue was coming from some cache so I took your advice to clear resin-data and that worked

Theories:
Resin is doing some file/corruption level check for all directories/apps in webapps

Events
At some time I started resin at least once with webapps/ROOT being fully populated with my application files/directories/libraries. Resin at that time copied my webapps/ROOT to resin-data (distcache see below). I then changed the structure to have very minimal files (index.html) which Resin saw as a mistake/issue/corruption and replaced my webapps/ROOT with what it had in cache that it deemed the correct version.

distcache exists here:
[resin-home]/resin-data/app-0/distcache#

contents:
data.db mnode.db
NOTE: I am pretty sure the cached ROOT directory existed in data.db

There are no notes attached to this issue.