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 thoughOp woensdag 15 juli 2015 20:01:40 UTC+2 schreef Ivo de Bruijn:
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)
https://lh3.googleusercontent.com/-KO7CfGxvBpA/VaaeTqPG-_I/AAAAAAAADmQ/0dOAVU40R-o/s1600/screencapture-104-155-39-41-lucee-admin-server-cfm-1436982140174.png
Machine #2 (internal ip of 10.240.208.91)
https://lh3.googleusercontent.com/-IWHnhzR8m-U/VaaeUgEiiLI/AAAAAAAADmY/8EvrKx78WJ4/s1600/screencapture-130-211-82-128-lucee-admin-server-cfm-1436982167028.png
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.