[MAGNOLIA-821] two entries in server.xml with webapps as root cause lost data Created: 20/Apr/06  Updated: 29/Aug/12  Resolved: 29/Aug/12

Status: Closed
Project: Magnolia
Component/s: build
Affects Version/s: 2.1.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Boris Kraft Assignee: Unassigned
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Hi Everyone,
we ran into a pretty little disaster with our magnolia installation, and I wanted to share that so nobody else has to replicate our experience.
We run two Magnolia instances on a tomcat server, author and public instances, original tomcat 5.0.28 pre setup from the magnolia website.
Everything worked fine, so after half the work was done we copied it from our dev server to the online server. Edited the server.xml a bit (hosts) and configured the apache to route certain subdomains to the tomcat. Everything up and running in no time, working fine. Now after further development on the websites we restarted the tomcat and afterwards everything in the repository is gone back to the moment we copied the files from dev to online server. I have traced the reason (and this may answer an earlier thread in this list? The only similar thing I could find in the archives..) We inadvertently copied (instead of replaced) the entry in the server.xml for the hosts, creating TWO entries with webapps as the root:

<Host name="localhost" debug="0" appBase="webapps" ...>
...
</Host>

<Host name="cms.project.de" debug="0" appBase="webapps" ...>
...
</Host>

This diligently starts magnolia FOUR times, author and public once per host. This we did not notice in the logfile, the only warning really that this is the situation.
This situation REPRODUCABLY causes all data to be lost on restart.
Our investigation into jackrabbit sources and magnolia sources leads us to beliebe that when you stop the tomcat ALL Magnolia instances synchronize their repositories with the filesystem and the one filled with the new data writes contents to disk, then the other instance writes the old unchanged (original) state over the newer version.
But this is our guess - fact is that this a minor misconfiguration on our side leads to this situation where everything SEEMS fine, until you restart the tomcat and lose all changes.

Maybe this helps someone to avoid this scenario.

Regards,
Martin Friedel



 Comments   
Comment by Sameer Charles [ 16/May/06 ]

Its not a bug but rather mis configuration of the tomcat
please post this on Wiki

Generated at Mon Feb 12 03:20:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.