Project

General

Profile

bug #2939

ehcache diskStore conflict?

Added by Andreas Kohlbecker over 6 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Highest
Category:
cdmlib-remote
Target version:
Start date:
06/29/2012
Due date:
% Done:

100%

Severity:
normal
Found in Version:
Tags:

Description

when running tests on the integration server where already a cdmserver instance is running write permission problems are reported regarding the ehcache diskStore, is this a conflict of multiple vm instances using the same disk store location?

2016-12-19 15:38:09,969 WARN [net.sf.ehcache.DiskStorePathManager] - diskStorePath '/home/andreas/.cdm-server-ehcache' is already used by an existing CacheManager either in the same VM or in a different process.
The diskStore path for this CacheManager will be set to /home/andreas/.cdm-server-ehcache/ehcache_auto_created8966675037271472395diskstore.
To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.

solution: use timestamp prefix for diskStore?

in /cdmlib-remote/src/main/resources/eu/etaxonomy/cdm/remote/ehcache.xml

<diskStore path="java.io.tmpdir/cdm-server-ehcache" />

should become something like

<diskStore path="java.io.tmpdir/cdm-server-ehcache/20120010298321730/" />

could this be achieved by using the ehcache.disk.store.dir property? setting it during app-context startup to a unique subfolder of /tmp/

NOTE: there is a class eu.etaxonomy.cdm.api.cache.CdmCacher providing a static method getDefaultCacheManager()

further reading:


there is a new related ticket on the ehcache file store location: #3580 possibly a duplicate


Related issues

Related to Edit - feature request #5848: Problem with writing ehCache folder on network drive using UNC path (net.sf.ehcache.CacheException) Closed 05/31/2016
Duplicated by Edit - feature request #3580: Write permission error with temporary cdmserver echache dir Duplicate 07/03/2013

Associated revisions

Revision 7a0bcdb6 (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #2939 refactoring CdmCacher to use cachemanger spring bean - not fully working yet

Revision 1fd4a547 (diff)
Added by Andreas Kohlbecker almost 2 years ago

fix #2939 dynamic configuration of the ehcache store location per remote instance

Revision f2b6ba81 (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #2939 renaming moved class references in log4j files

Revision e3e0e316 (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #2939 taking configurations out of the compenent scan\n, a more finegraned strategy is needed for the variety of situations we have to deal with

Revision 15911e5d (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #2939 adapting vaddin appcontext to new ehcache configuration

Revision 7e5f47cb (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #2939 adapting taxeditor spring configuration to new ehCacheManager configuration - WARNING: store location still missing!

Revision 68fdcde3 (diff)
Added by Andreas Kohlbecker almost 2 years ago

fix #2939 set up of cacheManager in test applicationContext

Revision 7e9bb88a (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #2939 property to set the cacheManager diskstore

Revision c57e7cd5 (diff)
Added by Andreas Kohlbecker almost 2 years ago

fix #2939 explicitely adding CdmServiceCache to test applicationContext

Revision 4d92688f (diff)
Added by Andreas Kohlbecker almost 2 years ago

fix #2939 removing EhCacheConfig from application contexts and configuring the CacheManager explicitely

Revision 0ec8f6d7 (diff)
Added by Andreas Kohlbecker almost 2 years ago

fix #2939 explicitely adding CdmServiceCache to test applicationContext

Revision 506d9934 (diff)
Added by Andreas Kohlbecker almost 2 years ago

fix #2939 removing EhCacheConfig from application contexts and configuring the CacheManager explicitely

Revision 2339128f (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #2939 option to set the CacheManager directly, needed for the taxeditor

History

#1 Updated by Andreas Kohlbecker over 6 years ago

  • Subject changed from use timestamp prefix for diskStore to ehcache diskStore conflict?

#2 Updated by Andreas Kohlbecker over 5 years ago

meanwhile it is possible to set the diskStore path programatically:

http://www.ehcache.org/documentation/user-guide/storage-options#diskstore-configuration-element

#3 Updated by Andreas Kohlbecker almost 5 years ago

  • Target version changed from cdmlib RELEASE 3.3.0 to cdmlib RELEASE 3.3.1

moving unresolved tickets to next release milestone due release of version 3.3

#4 Updated by Andreas Kohlbecker over 3 years ago

  • Target version changed from cdmlib RELEASE 3.5.0 to cdmlib RELEASE 3.5.1

moving tickets to next milestone

#5 Updated by Andreas Müller over 3 years ago

  • Target version changed from cdmlib RELEASE 3.5.1 to cdmlib RELEASE 3.5.2

move open 3.5.1 tickets to next milestone after release

#6 Updated by Katja Luther over 3 years ago

  • Target version deleted (cdmlib RELEASE 3.5.2)

#7 Updated by Andreas Kohlbecker over 3 years ago

  • Assignee changed from Andreas Kohlbecker to c.mathew -

#8 Updated by Andreas Müller over 3 years ago

  • Target version set to Remoting 4.0

#9 Updated by Andreas Müller over 3 years ago

  • Target version changed from Remoting 4.0 to cdmlib - Reviewed Next Major Release
  • Priority changed from New to Priority11

#10 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#11 Updated by Andreas Kohlbecker almost 2 years ago

I vote for putting this ticket into the 4.6 milestone

#12 Updated by Andreas Kohlbecker almost 2 years ago

  • Assignee deleted (Cherian Mathew)

#13 Updated by Andreas Kohlbecker almost 2 years ago

#14 Updated by Andreas Kohlbecker almost 2 years ago

latest location of the according documentation: http://www.ehcache.org/generated/2.10.3/html/ehc-all/#page/Ehcache_Documentation_Set%2Fco-tiers_configuring_disk_store.html%23

from that page:


To programmatically set a disk store path:

DiskStoreConfiguration diskStoreConfiguration = new DiskStoreConfiguration(); 
diskStoreConfiguration.setPath("/my/path/dir"); 
// Already created a configuration object ... 
configuration.addDiskStore(diskStoreConfiguration); 
CacheManager mgr = new CacheManager(configuration);

#15 Updated by Andreas Kohlbecker almost 2 years ago

  • Status changed from New to In Progress
  • Assignee set to Andreas Kohlbecker
  • Priority changed from Priority11 to Highest
  • Target version changed from Reviewed Next Major Release to Release 4.6
  • Private changed from Yes to No

#16 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#17 Updated by Andreas Kohlbecker almost 2 years ago

  • Tags set to ehcache

#18 Updated by Andreas Kohlbecker almost 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 50

#19 Updated by Andreas Kohlbecker almost 2 years ago

  • Related to feature request #5848: Problem with writing ehCache folder on network drive using UNC path (net.sf.ehcache.CacheException) added

#20 Updated by Andreas Kohlbecker almost 2 years ago

#21 Updated by Andreas Kohlbecker almost 2 years ago

  • Related to deleted (feature request #3580: Write permission error with temporary cdmserver echache dir)

#22 Updated by Andreas Kohlbecker almost 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 50 to 100

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)