The file userCache.data is created by a 3rd party and is a caching technology used particularly with the CEM part of our APM software.
Due to the integrated nature of the product in APM 9, all Enterprise Manager installations will be creating the file.
Problems occur where there is more than one Enterprise Manager running on the same machine as each installation will want to make its own userCache.data file.
The file is created in the user's temp directory.
We have seen some access issues which would prevent the Enterprise Manager from starting as below:
[ERROR] [main] [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userCacheBackend' defined in ServletContext resource[/WEB-INF/tess-security.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: userCacheCache: Could not create diskstore.
Initial cause was /tmp/userCache.data (Permission denied)
net.sf.ehcache.CacheException: userCacheCache: Could not create disk store. Initial cause was /tmp/userCache.data (Permission denied)
Beyond checking the permissions of the user that runs the application against the /tmp and files in that directory:
We have seen a situation with multiple collectors on the same machine, and each collector was running as a different user under UNIX/LINUX, for security reasons.
However, all collectors were all trying to use the same file in the /tmp directory, and producing the error.
The default configuration in the ehcache software points to "java.io.tmpdir"
Our suggestion is to provide a specific temp location for each Enterprise Manager by updating the configuration in the lax file to:
lax.nl.java.option.additional=-Xms512m -Xmx1024m -Djava.awt.headless=false -XX:MaxPermSize=256m -Dmail.mime.charset=UTF-8 -Dorg.owasp.esapi.resources=./config/esapi -Xss512k -Djava.io.tmpdir=/mycompany/user1
lax.nl.java.option.additional=-Xms512m -Xmx1024m -Djava.awt.headless=false -XX:MaxPermSize=256m -Dmail.mime.charset=UTF-8 -Dorg.owasp.esapi.resources=./config/esapi -Xss512k -Djava.io.tmpdir=/mycompany/user2