Distributed EHCache issue

197 views
Skip to first unread message

Ivo de Bruijn

unread,
Jul 15, 2015, 2:01:40 PM7/15/15
to lu...@googlegroups.com
Hi,

I'm currently wrestling with the EHCache connections in Lucee on a clustered environment though I'm running into some very typical problems.

Currently I'm running 2 machines in Googles Compute Engine with Lucee (running 4.5.1.000 but I have tried running 4.5.1.022) and both servers are hooked up to a load balancing pool. Both machines also utilise EHCache but since the load balancing pool is using the round-robin algorithm they are required to have the same cached elements and not running out of sync.

If I set both machines op to have a local EHCache connection they work fine. But once I setup the distribution mode the cache connection refuses to work again. Both instances responded with "The cache name [ToombaObjectCache] does not exist, only the following caches are available: []." if I tried to verify the connection or actually check the application itself. 

Screenshots below show the current settings of my cache connection.

Both machines are ping-able using the internal ip's and all ports internally are opened to each other.


Machine #1 (internal ip of 10.240.162.220)

 
Machine #2 (internal ip of 10.240.208.91)


My question, what am I doing wrong or am I missing mandatory settings in order to solve my problem?


Note: I can't turn it on automatic since multicast TCP broadcasts are not working in Google compute engine, even though if I select it it gives me the same error message as described earlier.

Gert Franz

unread,
Jul 15, 2015, 2:59:30 PM7/15/15
to lu...@googlegroups.com
Did you try doing that in the web admin too first?

Gert

Sent from somewhere on the road
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/c0ebaa9c-04ce-4249-ad4e-b1ca7cba29e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ivo de Bruijn

unread,
Jul 15, 2015, 3:09:36 PM7/15/15
to lu...@googlegroups.com
Hi

I've only added this cache connection to the server admin in Lucee since the cache connection would be required for all applications running on the server. I haven't added the cache connection to the web admin in Lucee (yet) because of this reason

Op woensdag 15 juli 2015 20:59:30 UTC+2 schreef Gert Franz:

Andrew Dixon

unread,
Jul 15, 2015, 3:31:30 PM7/15/15
to lu...@googlegroups.com
Hi Ivo,

I don't think you should have the cache name in your RMIs URL field, it should just be IP and port number.

Kind regards,

Andrew

Ivo de Bruijn

unread,
Jul 15, 2015, 3:56:22 PM7/15/15
to lu...@googlegroups.com

Hi Andrew,


I've tried the solution but the issue still persists. 


I assume the EHCache documentation is relevant to the topic (http://ehcache.org/documentation/2.8/replication/rmi-replicated-caching#manual-peer-discovery-manual-peer-discovery) which shows RMI urls are allowed to have the cache name in it. Not sure if versions are equal but I assume the usage should be the same in Lucee. 


Op woensdag 15 juli 2015 21:31:30 UTC+2 schreef Andrew Dixon:

Ivo de Bruijn

unread,
Jul 16, 2015, 12:50:33 PM7/16/15
to lu...@googlegroups.com

I figured out what caused the issue which might be a user error but didn't seem logical at first.


The issue occurs once one of the cache connections within the context using EHCache is configured incorrectly. It results into that other connections won't work or won't even verify in the admin. After removing all my other cache connections and just adding one connection with the configuration shown in the screenshots it suddenly worked.


The problem also occurs if you have multiple connections using EHCache configured correctly and one of them is incorrectly configured. Other cache connections using EHCache might have the following problems:

  • The cache connection won't validate with the message The cache name [cachename] does not exist, only the following caches are available: []."
  • Or your cache connection won't work properly and only stores cache elements locally and won't distribute them to other servers. (If setup like that)
You can reproduce this by adding a faulty EHCache connection (enter an RMI url with "somethingthatwouldbewrong" and set the distribution type on manual) and checking other cache connections (which use EHCache) and see if they 'work'.


I guess this is just the way things work for EHCache because it loads up a single ehcache.xml per web context and once one of the configurations is setup incorrectly it stops working for all other connections using EHCache within the context.


Hope this might help out some other people in the future.


Thanks for helping me out though

Op woensdag 15 juli 2015 20:01:40 UTC+2 schreef Ivo de Bruijn:

Andrew Dixon

unread,
Jul 16, 2015, 3:18:44 PM7/16/15
to lu...@googlegroups.com
Thanks for coming back and let us all know Ivo that is good to know.

Kind regards,

Andrew

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Alexander Diedler

unread,
Sep 3, 2015, 10:29:30 AM9/3/15
to Lucee
Yes, we face the same issues.
If you have 2 nodes, with several caches you have to set ALL caches to distributed, then it works fine. If you have a mix of clustered and non-clustered caches, it will fail for the caches.
Reply all
Reply to author
Forward
0 new messages