Crowd fails with net.sf.ehcache.CacheException: java.io.StreamCorruptedException: invalid stream header: 3FA4BE5A

Still need help?

The Atlassian Community is here for you.

Ask the community

This article only applies to Atlassian's server products. Learn more about the differences between cloud and server.

Problem

The following appears in atlassian-crowd.log.

2017-12-26 04:07:47,585 ajp-bio-8008-exec-8 ERROR [[Catalina].[localhost].[/crowd].[default]] Servlet.service() for servlet [default] in context with path [/crowd] threw exception
net.sf.ehcache.CacheException: java.io.StreamCorruptedException: invalid stream header: 3FA4BE5A
	at net.sf.ehcache.store.disk.DiskStorageFactory.retrieve(DiskStorageFactory.java:891)
	at net.sf.ehcache.store.disk.Segment.decodeHit(Segment.java:182)
	at net.sf.ehcache.store.disk.Segment.get(Segment.java:225)
	at net.sf.ehcache.store.disk.DiskStore.fault(DiskStore.java:210)
	at net.sf.ehcache.store.CacheStore$4.call(CacheStore.java:198)
	at net.sf.ehcache.store.CacheStore$4.call(CacheStore.java:192)
...
Caused by: java.io.StreamCorruptedException: invalid stream header: 3FA4BE5A
...

Cause

The files used by ehcache become corrupted on disk and cannot be used by the Crowd. This is not the session variable cache, but a database cache used to optimise the requests to the database.

Resolution

The files in the cache need to be deleted form the temporary directory. First check where the temp files are located, this is identified by the Java system parameter java.io.tmpdir. To find this in Linux run this command from the installation directory

Crowd ...
sudo jinfo `cat apache-tomcat/work/catalina.pid` | fgrep "java.io.tmpdir ="

In general the location will usually be one of

  • /tmp
  • <crowd-install>/apache-tomcat/temp/

Then

  1. Shutdown Crowd
  2. Delete the files in the directory identified by the jinfo command for java.io.tmpdir
  3. Restart Crowd


Last modified on Dec 29, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.