Replicated Mode ...

Topics: Developer Forum
Sep 3, 2008 at 7:19 AM
http://www.sharedcache.com/cms/replicated_caching.aspx

using shared cache servers for replicated mode...

I set test environments
server 1 : ServiceFamilyMode="1"   replicatedServers add server 2
server 2 : ServiceFamilyMode="1"   replicatedServers add server 1

and restart services

and, modify WinServiceTestClient.exe.config like this

<servers>
   <add key="localhost" ipaddress="127.0.0.1" port="48888" />
   <add key="Srv22" ipaddress="121.134.XXX.XXX" port="48888" />
</servers>
<replicatedServers>
   <add key="Srv22" ipaddress="121.134.XXX.XXX" port="48888" />
</replicatedServers>


and run TestClient.exe, but client log has errors.

2008-09-03 14:17:24.1260|FATAL||REALWEB21-JK: Unhandled Exception appears: 동일한 키를 사용하는 항목이 이미 추가되었습니다. (translated to english : Already exists same key)
   위치: System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   위치: System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   위치: MergeSystem.Indexus.WinServiceCommon.Sockets.ManageTcpSocketConnectionPool..ctor(Boolean instanceClientPools)
   위치: MergeSystem.Indexus.WinServiceCommon.Sockets.ManageClientTcpSocketConnectionPoolFactory.GetClient(String host)
   위치: MergeSystem.Indexus.WinServiceCommon.IndexusMessage.Send()
   위치: MergeSystem.Indexus.WinServiceCommon.CacheUtil.HandleProtocol(IndexusMessage msg, String lastUsedServerNodeIp)


What's wrong?
Sep 3, 2008 at 8:42 AM
which version of sharedcache do you use? do you use latest change set  16874 or the latest release?
Sep 3, 2008 at 8:54 AM
using version 2.0.3.270.

should I use lastest release?
Sep 3, 2008 at 9:08 AM
i would suggest to do so - tonight (europe time) i will make a test with latest sources to clarify this issue.
Sep 4, 2008 at 3:44 AM
using lastest release 16874, but it was not working in replication mode.

console test application client log is same result.

another test by Test Client Application with 500

-> run first some client/server interactions before you call the statistics

and input command 300... result like this

"Add 100 items to cache with approx... "
".................."
Multi add:91ms"
"An exception appears [fell free to contact us at : SharedCache@indeXus.net]"
"Cannot casting System.Collections.Generic.List`1[System.String] to MergeSystem.Indexus.WinServiceCommon.CacheException type.

not work all distributed mode (replicated mode and partitioned mode)

What do i check ?

1. Open Firewall for MergeSystem.Indexus.WinService.exe
2. Open Firewall for TCP port 48888

need other check point...
Sep 4, 2008 at 3:54 AM
Sorry!!! my mistake in client configuration.

<servers>
   <add key="localhost" ipaddress="127.0.0.1" port="48888" />
   <!-- <add key="Srv22" ipaddress="121.134.XXX.XXX" port="48888" /> --> <!-- only one exists in servers or replicatedServers -->
</servers>
<replicatedServers>
   <add key="Srv22" ipaddress="121.134.XXX.XXX" port="48888" />
</replicatedServers>

it work greatly...

Thanks your reply and excellent software.