Combination View Flat View Tree View
Threads [ Previous | Next ]
Jesper W
5.2.2 Clustered Ehcache problem?
February 17, 2009 3:37 AM
Answer

Jesper W

Rank: Expert

Posts: 315

Join Date: March 25, 2007

Recent Posts

This morning we attempted to deploy a 5.2.2 based release to our production cluster.
It failed. Unfortunatly we have only a single VM stageing environment to test in... ;-)

Has anyone successfully started Liferay 5.2.2 clustered?

It seems to me the problem would show everywhere.

The traceback of the problem (IP adresses censored with ....):

 1java.lang.ExceptionInInitializerError
 2    at com.liferay.portal.events.StartupAction.run(StartupAction.java:84)
 3....
 4Caused by: net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //...:53270/com.liferay.portal.kernel.dao.orm.FinderCache#com.liferay.portal.model.Company. Initial cause was invalid character, '#', in URL name: //...:53270/com.liferay.portal.kernel.dao.orm.FinderCache#com.liferay.portal.model.Company
 5    at java.lang.Thread.run(Thread.java:619)
 6    at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:513)
 7....
 8    at com.liferay.portal.cache.EhcachePortalCacheManager.getCache(EhcachePortalCacheManager.java:75)
 9....
10Caused by: java.net.MalformedURLException: invalid character, '#', in URL name: //...:53270/com.liferay.portal.kernel.dao.orm.FinderCache#com.liferay.portal.model.Company
11    at java.rmi.Naming.intParseURL(Naming.java:262)
12    at java.rmi.Naming.parseURL(Naming.java:220)
13    at java.rmi.Naming.rebind(Naming.java:154)
14    at net.sf.ehcache.distribution.RMICacheManagerPeerListener.bind(RMICacheManagerPeerListener.java:230)


The same server runs the 5.1 release just fine.
The #-character in the cache name has been there since 5.1.
So compared to 5.1 we have the same URL, the same Java, but an updated Ehcache version.
Not shure what to make of that...

Any ideas?
Mika Koivisto
RE: 5.2.2 Clustered Ehcache problem?
February 17, 2009 3:31 AM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1513

Join Date: August 7, 2006

Recent Posts

EhCache was upgraded to 1.5 so could that cause the problem. I'm not familiar with EhCache RMI inner workings but I'm just wondering why is the hash mark part of the rmiUrl shouldn't that be the cache key.
Jesper W
RE: 5.2.2 Clustered Ehcache problem?
February 17, 2009 4:51 AM
Answer

Jesper W

Rank: Expert

Posts: 315

Join Date: March 25, 2007

Recent Posts

Actually the same problem occurs if I replace with echache.jar 1.4.1
So it seems to be Liferay related.

It's easy to reproduce, just take 5.2.x branch and change to:

net.sf.ehcache.configurationResourceName=/ehcache/hibernate-clustered.xml
ehcache.multi.vm.config.location=/ehcache/liferay-multi-vm-clustered.xml

Start server and watch the crash...
Jesper W
RE: 5.2.2 Clustered Ehcache problem?
February 17, 2009 5:40 AM
Answer

Jesper W

Rank: Expert

Posts: 315

Join Date: March 25, 2007

Recent Posts

Also verified that the same problem exists in trunk.
Jonas Yuan
RE: 5.2.2 Clustered Ehcache problem?
February 17, 2009 5:47 AM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 993

Join Date: April 26, 2007

Recent Posts

Hi Jesper,

Thank you!

According to our experience in Sesame Street, the clustering settings must be used in the clustering environment only.

That is, in the normal environment, we have to remove the clustering settings. Only in the clustering environment, we need to turn on the clustering settings. Does this make sense?

Best regards,

Jonas Yuan
Jesper W
RE: 5.2.2 Clustered Ehcache problem?
February 17, 2009 5:50 AM
Answer

Jesper W

Rank: Expert

Posts: 315

Join Date: March 25, 2007

Recent Posts

It makes sense, but I'm afraid exactly the same crash happens in the real clustered environment.
Have you gotten 5.2.2 running clustered?
Brian Chan
RE: 5.2.2 Clustered Ehcache problem?
February 17, 2009 11:36 AM
Answer

Brian Chan

LIFERAY STAFF

Rank: Liferay Master

Posts: 751

Join Date: August 4, 2004

Recent Posts

Fixed in LPS-2120.
Jonas Yuan
RE: 5.2.2 Clustered Ehcache problem?
February 17, 2009 12:47 PM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 993

Join Date: April 26, 2007

Recent Posts

Thank you so much, Brian!

It was getting fixed so quick ....
Jesper W
RE: 5.2.2 Clustered Ehcache problem?
February 19, 2009 11:03 PM
Answer

Jesper W

Rank: Expert

Posts: 315

Join Date: March 25, 2007

Recent Posts

For the record, there was actually two problems here. Fixing the first one exposed a class loader problem in JBoss which is now fixed in LPS-2178.
/j
Marco Altieri
RE: 5.2.2 Clustered Ehcache problem?
March 17, 2009 8:19 AM
Answer

Marco Altieri

Rank: New Member

Posts: 16

Join Date: March 7, 2008

Recent Posts

Hi all,
where can I get the a patch for this bug?

thanks
Jesper W
RE: 5.2.2 Clustered Ehcache problem?
March 19, 2009 3:21 PM
Answer

Jesper W

Rank: Expert

Posts: 315

Join Date: March 25, 2007

Recent Posts

Read the respective LPS issues on http://support.liferay.com.
Marco Altieri
RE: 5.2.2 Clustered Ehcache problem?
April 9, 2009 3:22 AM
Answer

Marco Altieri

Rank: New Member

Posts: 16

Join Date: March 7, 2008

Recent Posts

Ok, thank you!
Marco