[Opensymphony-oscache] Clustering sync problem with JGroups
Andre Kovacs <[email protected]> Thu, 04 Aug 2005 09:29:27 CDT
| Newsgroups | gmane.comp.java.open-symphony.os-cache |
|---|---|
| Message-ID | <14561184.1123165797751.JavaMail.os-j2ee@opensymphony01.contegix.com> |
I'm trying to use the OSCache (2.1.1) APIs on a clustered environment, using JGroups (2.2.7).
It's a simple test, where one of the cluster nodes insert a value in the cache, and the second node reads the value from cache.
The cluster seems to be ok, examining the log output, but the cached value doesn't seem to be updated in all cluster nodes.
My test environment is a two JVMs on a single box.
The OSCache config is the default config, with the JGroups event listener:
"cache.event.listeners=com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener"
Here's the updating node console output:
"INFO - Properties {cache.event.listeners=com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener}
INFO - Constructed GeneralCacheAdministrator()
INFO - Creating new cache
INFO - AbstractBroadcastingListener registered
INFO - Starting a new JavaGroups broadcasting listener with properties=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;mcast_send_buf_size=150000;mcast_recv_buf_size=80000):PING(timeout=2000;num_initial_members=3):MERGE2(min_interval=5000;max_interval=10000):FD_SOCK:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800;max_xmit_size=8192):UNICAST(timeout=300,600,1200,2400):pbcast.STABLE(desired_avg_gossip=20000):FRAG(frag_size=8096;down_thread=false;up_thread=false):pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=true)
INFO - unicast sockets will use interface 10.129.206.106
INFO - socket information:
local_addr=SPOBLUIS5103:1583, mcast_addr=231.12.21.132:45566, bind_addr=/10.129.206.106, ttl=32
sock: bound to 10.129.206.106:1583, receive buffer size=64000, send buffer size=32000
mcast_recv_sock: bound to 10.129.206.106:45566, send buffer size=150000, receive buffer size=80000
mcast_send_sock: bound to 10.129.206.106:1584, send buffer size=150000, receive buffer size=80000
-------------------------------------------------------
GMS: address is SPOBLUIS5103:1583
-------------------------------------------------------
INFO - JavaGroups clustering support started successfully
INFO - A new member at address 'SPOBLUIS5103:1583' has joined the cluster
timeoutString=
timeoutString=10
hashCode='858198158'
timeout='10'
com.opensymphony.oscache.base.NeedsRefreshException
at com.opensymphony.oscache.base.Cache.getFromCache(Cache.java:309)
at com.opensymphony.oscache.base.Cache.getFromCache(Cache.java:205)
at com.opensymphony.oscache.general.GeneralCacheAdministrator.getFromCache(GeneralCacheAdministrator.java:143)
at com.indra.esf.foundation.cache.OSCacheCacheManager.putObjectInCache(OSCacheCacheManager.java:100)
at com.indra.esf.foundation.cache.CacheManager.putObjectInCache(CacheManager.java:44)
at test.Cache.main(Cache.java:48)
hashCode='858198158'
cachedValue=haha
timeoutString=10
hashCode='858198158'
timeout='10'
haha
INFO - A new member at address 'SPOBLUIS5103:1586' has joined the cluster
INFO - Member at address 'SPOBLUIS5103:1586' left the cluster"
Here's the reading node console cache:
"INFO - Properties {cache.event.listeners=com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener}
INFO - Constructed GeneralCacheAdministrator()
INFO - Creating new cache
INFO - AbstractBroadcastingListener registered
INFO - Starting a new JavaGroups broadcasting listener with properties=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;mcast_send_buf_size=150000;mcast_recv_buf_size=80000):PING(timeout=2000;num_initial_members=3):MERGE2(min_interval=5000;max_interval=10000):FD_SOCK:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800;max_xmit_size=8192):UNICAST(timeout=300,600,1200,2400):pbcast.STABLE(desired_avg_gossip=20000):FRAG(frag_size=8096;down_thread=false;up_thread=false):pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=true)
INFO - unicast sockets will use interface 10.129.206.106
INFO - socket information:
local_addr=SPOBLUIS5103:1586, mcast_addr=231.12.21.132:45566, bind_addr=/10.129.206.106, ttl=32
sock: bound to 10.129.206.106:1586, receive buffer size=64000, send buffer size=32000
mcast_recv_sock: bound to 10.129.206.106:45566, send buffer size=150000, receive buffer size=80000
mcast_send_sock: bound to 10.129.206.106:1587, send buffer size=150000, receive buffer size=80000
-------------------------------------------------------
GMS: address is SPOBLUIS5103:1586
-------------------------------------------------------
INFO - JavaGroups clustering support started successfully
INFO - A new member at address 'SPOBLUIS5103:1583' has joined the cluster
INFO - A new member at address 'SPOBLUIS5103:1586' has joined the cluster
timeoutString=
hashCode='858198158'
com.opensymphony.oscache.base.NeedsRefreshException
at com.opensymphony.oscache.base.Cache.getFromCache(Cache.java:309)
at com.opensymphony.oscache.base.Cache.getFromCache(Cache.java:183)
at com.opensymphony.oscache.general.GeneralCacheAdministrator.getFromCache(GeneralCacheAdministrator.java:124)
at com.indra.esf.foundation.cache.OSCacheCacheManager.getObjectFromCache(OSCacheCacheManager.java:47)
at test.Cache.main(Cache.java:52)
cachedValue=null"
Here's the netstat -a output:
" Proto Endereço local Endereço externo Estado
TCP SPOBLUIS5103:epmap SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:microsoft-ds SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:1036 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:1038 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:1039 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:1042 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:1051 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:1588 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:1589 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:4899 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:7070 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:7500 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:7580 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:10309 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:49152 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:49153 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:netbios-ssn SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:1588 SPOBLUIS5103:49152 ESTABLISHED
TCP SPOBLUIS5103:1589 SPOBLUIS5103:49153 ESTABLISHED
TCP SPOBLUIS5103:49152 SPOBLUIS5103:1588 ESTABLISHED
TCP SPOBLUIS5103:49153 SPOBLUIS5103:1589 ESTABLISHED
TCP SPOBLUIS5103:1035 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:1035 SPOBLUIS5103:1036 ESTABLISHED
TCP SPOBLUIS5103:1036 SPOBLUIS5103:1035 ESTABLISHED
TCP SPOBLUIS5103:1037 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:1037 SPOBLUIS5103:1038 ESTABLISHED
TCP SPOBLUIS5103:1038 SPOBLUIS5103:1037 ESTABLISHED
TCP SPOBLUIS5103:1041 SPOBLUIS5103:0 LISTENING
TCP SPOBLUIS5103:1041 SPOBLUIS5103:1042 ESTABLISHED
TCP SPOBLUIS5103:1042 SPOBLUIS5103:1041 ESTABLISHED
TCP SPOBLUIS5103:5679 SPOBLUIS5103:0 LISTENING
UDP SPOBLUIS5103:microsoft-ds *:*
UDP SPOBLUIS5103:1584 *:*
UDP SPOBLUIS5103:1587 *:*
UDP SPOBLUIS5103:4725 *:*
UDP SPOBLUIS5103:10309 *:*
UDP SPOBLUIS5103:10310 *:*
UDP SPOBLUIS5103:45566 *:*
UDP SPOBLUIS5103:netbios-ns *:*
UDP SPOBLUIS5103:netbios-dgm *:*
UDP SPOBLUIS5103:isakmp *:*
UDP SPOBLUIS5103:1583 *:*
UDP SPOBLUIS5103:1586 *:*
UDP SPOBLUIS5103:1059 *:*
UDP SPOBLUIS5103:1310 *:*
UDP SPOBLUIS5103:1531 *:*"
Thanks,
Andre
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=5098&messageID=12123#12123