jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Smuts <asm...@yahoo.com>
Subject Re: Third server not discovered by second server with LateralTCP
Date Thu, 09 Jul 2009 13:30:48 GMT

I didn't know about the 3rd server problem.  The issue should be added to JIRA

https://issues.apache.org/jira/secure/BrowseProject.jspa

I think the problem was in the getInstance method, not the getInstances.  I fixed it.  I'll
check it in and cut a temp build soon.

In any case, that code needs to change.  I'm making it so that you can have multiple instances
of JCS.  There are only a few things left that assume that JCS is a singleton. . . .

Aaron



--- On Thu, 7/9/09, Manuel Cruz <manuelcruz@guadaltel.es> wrote:

> From: Manuel Cruz <manuelcruz@guadaltel.es>
> Subject: Re: Third server not discovered by second server with LateralTCP
> To: jcs-dev@jakarta.apache.org
> Date: Thursday, July 9, 2009, 12:58 AM
> 
> Hello Dieter.
> 
>   We look your post in nabble's forum about "Thirds
> erver not discovered by
> second server with LateralTCP". We have the same problem
> but the solution
> you gave (synchronized ( instances ) in method
> getInstances() ) not work to
> us   
> 
>   Can you help us ?    We paste cache.ccf if
> you can see it.
> 
> # DEFAULT CACHE REGION
> 
> jcs.default=LTCP
> jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> jcs.default.cacheattributes.MaxObjects=1000
> jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
> jcs.default.elementattributes.IsEternal=true
> #jcs.default.elementattributes.MaxLifeSeconds=21600
> jcs.default.cacheattributes.UseMemoryShrinker=false
> jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
> jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=360000
> jcs.default.elementattributes.IsSpool=false
> jcs.default.elementattributes.IsRemote=false
> jcs.default.elementattributes.IsLateral=true
> 
> 
> # PRE-DEFINED CACHE REGIONS
> 
> jcs.region.infocorCacheLateral=LTCP
> jcs.region.infocorCacheLateral.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> jcs.region.infocorCacheLateral.cacheattributes.MaxObjects=1000
> jcs.region.infocorCacheLateral.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
> jcs.region.infocorCacheLateral.elementattributes.IsEternal=true
> #jcs.region.infocorCacheLateral.elementattributes.MaxLifeSeconds=21600
> jcs.region.infocorCacheLateral.cacheattributes.UseMemoryShrinker=false
> jcs.region.infocorCacheLateral.cacheattributes.ShrinkerIntervalSeconds=60
> jcs.region.infocorCacheLateral.cacheattributes.MaxMemoryIdleTimeSeconds=360000
> jcs.region.infocorCacheLateral.elementattributes.IsSpool=false
> jcs.region.infocorCacheLateral.elementattributes.IsRemote=false
> jcs.region.infocorCacheLateral.elementattributes.IsLateral=true
> 
> # AVAILABLE AUXILIARY CACHES
> 
> jcs.auxiliary.LTCP=org.apache.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
> jcs.auxiliary.LTCP.attributes=org.apache.jcs.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
> jcs.auxiliary.LTCP.attributes.TransmissionTypeName=TCP
> jcs.auxiliary.LTCP.attributes.TcpServers=192.168.1.176:41000,192.168.196:41000
> jcs.auxiliary.LTCP.attributes.TcpListenerPort=41100
> jcs.auxiliary.LTCP.attributes.UdpDiscoveryEnabled=false
> jcs.auxiliary.LTCP.attributes.Receive=true
> jcs.auxiliary.LTCP.attributes.AllowGet=true
> jcs.auxiliary.LTCP.attributes.IssueRemoveOnPut=true
> jcs.auxiliary.LTCP.attributes.FilterRemoveByHashCode=false
> jcs.auxiliary.LTCP.attributes.PutOnlyMode=false
> 
> 
>    Regards and thank you  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Dieter Laufkoetter wrote:
> > 
> > Hello,
> > 
> > we use an net with 3 servers and use the LateralTCP
> protocol.
> > We don´t use musticast
> (jcs.auxiliary.LTCP.attributes.UdpDiscoveryEnabled
> > = false).
> > Each server is configured the other two servers with
> > jcs.auxiliary.LTCP.attributes.TcpServers.
> > 
> > At first we start server 1.
> > Server 1 tries to connect to server 2 and 3.
> > 
> > Then we start server 2.
> > Server 2 connects to server 1 but does not try to
> connect to server 3.
> > Server 1 connects to server 2
> > 
> > Then we start server 3.
> > Server 3 connects to server 1 and 2.
> > Server 1 connects to server 3.
> > 
> > The error:
> > Server 2 never tries to connect to server 3 and so the
> puts of server 2
> > never reach server 3.
> > 
> > This error occurs with 3 servers on 3 nodes and also
> with 3 servers on the
> > same node.
> > 
> > 
> > we found a solution for the problem:
> > In the class
> >
> org.apache.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheManager
> the Map
> > "instances" is synchronised at getInstance() but not
> at getInstances(). So
> > an inconsistent value of instances may be got by call
> of getInstances().
> > The following change of getInstances() fixes the
> problem:
> > 
> >     public Map getInstances()
> >     {
> >         synchronized (
> instances ) {
> >         
>    return instances;
> >         }
> >     }
> > 
> > We use new and fast machines, maybe that older and
> slower machines does
> > not produce this synchronisation error.
> > 
> > best regards,
> > 
> > Dieter
> > 
> > 
> > 
> :-((:-((
> -- 
> View this message in context: http://www.nabble.com/Third-server-not-discovered-by-second-server-with-LateralTCP-tp13855881p24405813.html
> Sent from the JCS - Dev mailing list archive at
> Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jcs-dev-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


Mime
View raw message