Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tomcat] deploy unstable across war updates #1158

Closed
pmauduit opened this issue Aug 25, 2015 · 4 comments
Closed

[tomcat] deploy unstable across war updates #1158

pmauduit opened this issue Aug 25, 2015 · 4 comments
Assignees
Milestone

Comments

@pmauduit
Copy link
Contributor

Here is the truncated stacktrace obtained while redeploying:

org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@/srv/tomcat/georchestra/work/gn_data/index/taxonomy/write.lock: java.nio.channels.OverlappingFileLockException
        at org.apache.lucene.store.Lock.obtain(Lock.java:89)
[...]
        at org.fao.geonet.kernel.search.index.TaxonomyIndexTracker.init(TaxonomyIndexTracker.java:46)
        at org.fao.geonet.kernel.search.index.TaxonomyIndexTracker.<init>(TaxonomyIndexTracker.java:40)
        at org.fao.geonet.kernel.search.index.LuceneIndexLanguageTracker.lazyInit(LuceneIndexLanguageTracker.java:59)
        at org.fao.geonet.kernel.search.index.LuceneIndexLanguageTracker.acquire(LuceneIndexLanguageTracker.java:157)
        at org.fao.geonet.kernel.search.SearchManager.getIndexReader(SearchManager.java:1398)
        at org.fao.geonet.kernel.search.SearchManager.getNewIndexReader(SearchManager.java:1402)
        at org.fao.geonet.kernel.search.SearchManager.getDocsChangeDate(SearchManager.java:1057)
        at org.fao.geonet.kernel.DataManager.init(DataManager.java:239)

@landryb
Copy link
Contributor

landryb commented Sep 9, 2015

I can confirm this, seeing the same with 3.0.2, redeploying 'manually' by touch'ing geonetwork/WEB-INF/web.xml, tomcat reloads the app and errors out on this lock.

@landryb
Copy link
Contributor

landryb commented Sep 9, 2015

Another workaround is to rm ${datadir}/index/taxonomy/write.lock before touch'ing web.xml, but that's just ... an ugly workaround. Redeploys are often failing anyway...

2015-09-09 14:07:05,054 ERROR [geonetwork.wro4j] - Error occurred during a wro4j request handling
ro.isdc.wro.WroRuntimeException: Error creating the wro4j disk-cache
...
Caused by: org.h2.jdbc.JdbcSQLException: Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-174]

pmauduit added a commit to pmauduit/core-geonetwork that referenced this issue Nov 29, 2015
pmauduit added a commit to pmauduit/core-geonetwork that referenced this issue Nov 29, 2015
- DB_CLOSE_DELAY=-1 is a bad idea in our case because it is meant for
  in-memory databases, which is not our case here ; and it seems to play
  a negative role when dealing with redeploys
- Firing up a SHUTDOWN sql statement before actually closing the db when
  destroying
- Ensure the DiskbackedCache is actually destroyed, so that the DB is
  shut down and the lock is released across redeploys

Related issues:
georchestra/georchestra#1120
geonetwork#1158
@landryb
Copy link
Contributor

landryb commented Nov 30, 2015

Looks much nicer with those two commits 👍

pmauduit added a commit to pmauduit/core-geonetwork that referenced this issue Dec 8, 2015
pmauduit added a commit to pmauduit/core-geonetwork that referenced this issue Dec 8, 2015
- DB_CLOSE_DELAY=-1 is a bad idea in our case because it is meant for
  in-memory databases, which is not our case here ; and it seems to play
  a negative role when dealing with redeploys
- Firing up a SHUTDOWN sql statement before actually closing the db when
  destroying
- Ensure the DiskbackedCache is actually destroyed, so that the DB is
  shut down and the lock is released across redeploys

Related issues:
georchestra/georchestra#1120
geonetwork#1158
@fxprunayre fxprunayre added this to the 3.0.3 milestone Dec 8, 2015
@fxprunayre
Copy link
Member

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants