You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by Dieter Laufkoetter <di...@siemens.com> on 2007/11/20 13:15:48 UTC

Third server not discovered by second server with LateralTCP

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-tf4843140.html#a13855881
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


Re: Third server not discovered by second server with LateralTCP

Posted by Manuel Cruz <ma...@guadaltel.es>.
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