-
1. Re: How to replicate cache in different Blade in a Data Center?
nadirx Mar 8, 2016 3:11 PM (in response to udit-mishra-5113a21a)Sure you can.
Look at cross-site replication: http://infinispan.org/docs/8.2.x/user_guide/user_guide.html#CrossSiteReplication
-
2. Re: How to replicate cache in different Blade in a Data Center?
udit-mishra-5113a21a Mar 9, 2016 12:51 AM (in response to nadirx)Is it available from 8.2.x onwards?
-
3. Re: How to replicate cache in different Blade in a Data Center?
nadirx Mar 9, 2016 10:17 AM (in response to udit-mishra-5113a21a)It's been available since Infinispan 6.0
-
4. Re: How to replicate cache in different Blade in a Data Center?
udit-mishra-5113a21a Mar 11, 2016 12:39 AM (in response to nadirx)Hello nadirx,
Sorry to say, but the reference seems outdated. I could not find mentioned infinispan.xml. Could you provide me an updated reference with the exact tags and files mentioned, please?
-
5. Re: How to replicate cache in different Blade in a Data Center?
nadirx Mar 11, 2016 4:22 AM (in response to udit-mishra-5113a21a)That reference is for embedded mode. In server mode the jgroups transport needs to be configured in a slightly different way. Look in the server distribution under docs/examples/configs for the clustered-xsite.xml file for an example on how to configure xsite replication
-
6. Re: How to replicate cache in different Blade in a Data Center?
udit-mishra-5113a21a Mar 11, 2016 5:52 AM (in response to nadirx)Thank you nadirx , I went through the specified example. I tell you step by step what I did, may be then you could tell me what I did wrong.
I have two DC at two sub domains , first is UDIT and the second is JBOSS (will be used as Backup Site).
Changes made in UDIT's domain.xml
(a) Added <channel name="xsite" stack="tcp"/>
(b) Made relay entry as
<relay site="UDIT">
<remote-site name="JBOSS" channel="xsite"/>
</relay>
(c) Then Added JBOSS in the Back up site as
<distributed-cache name="default" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER">
<locking acquire-timeout="30000" concurrency-level="1000" striping="false"/>
<transaction mode="NONE"/>
<backups>
<backup site="JBOSS" strategy="SYNC" enabled="true" />
</backups>
</distributed-cache>
Changes made in JBOSS's domain.xml
(a) Added <channel name="xsite" stack="tcp"/>
(b) Made relay entry as
<relay site="JBOSS">
<remote-site name="UDIT" channel="xsite"/>
</relay>
(c) Then said this is a remote cache
<distributed-cache name="default" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER">
<locking acquire-timeout="30000" concurrency-level="1000" striping="false"/>
<transaction mode="NONE"/>
<backup-for remote-cache="default" remote-site="UDIT"/>
</distributed-cache>
Now, I started DC on UDIT. It started fine, no messages for joining bridge come however.
Then I started DC on JBOSS. It also started fine, with a message - [Server:ServerOne] 15:33:10,186 INFO [org.jgroups.protocols.relay.RELAY2] (Timer-2,Jboss1:ServerOne) _Jboss1:ServerOne:JBOSS: joined bridge cluster 'xsite'
Then I wrote code to put cache in UDIT and get from JBOSS, but it gives me null. The error on UDIT's console is - [Server:ServerOne] 16:08:06,373 WARN [org.infinispan.xsite.BackupSenderImpl] (HotRodServerWorker-8-1) ISPN000202: Problems backing up data for cache default to site JBOSS: java.lang.NullPointerException
However on Server Management Console, the default cache is shown as Remotely backed up
What did I miss out?
-
7. Re: How to replicate cache in different Blade in a Data Center?
udit-mishra-5113a21a Mar 14, 2016 1:44 AM (in response to udit-mishra-5113a21a)Today I see fresh error message -
[Server:ServerOne] 11:11:01,220 ERROR [org.jgroups.protocols.relay.RELAY2] (HotRodServerWorker-8-2) Udit:ServerOne: no route to JBOSS: dropping message
[Server:ServerOne] 11:11:11,222 WARN [org.infinispan.xsite.BackupSenderImpl] (HotRodServerWorker-8-2) ISPN000202: Problems backing up data for cache default to site JBOSS: org.infinispan.util.concurrent.TimeoutException: Timed out after 10 seconds waiting for a response from JBOSS (sync, timeout=10000)
I am sure, some communication details is missing, but whats that, I have little idea. Kindly help me guys nadirx , galder.zamarreno -
8. Re: How to replicate cache in different Blade in a Data Center?
udit-mishra-5113a21a Mar 14, 2016 3:49 AM (in response to udit-mishra-5113a21a)They both join the bridge cluster 'xsite' , but the node UDIT is not able to backup data to JBOSS.
I do not understand what I have missed..
-
9. Re: How to replicate cache in different Blade in a Data Center?
udit-mishra-5113a21a Mar 14, 2016 6:22 AM (in response to udit-mishra-5113a21a)Hey nadirx , is there any well documented resource for implementing cross site replication with infinispan 8.2 for server mode? I am stuck and can not find resources
-
10. Re: How to replicate cache in different Blade in a Data Center?
pruivo Mar 14, 2016 6:58 AM (in response to udit-mishra-5113a21a)Hi Udit,
Can you please attach your domain.xml? and, if possible, the logs.
Thanks
Pedro
-
11. Re: How to replicate cache in different Blade in a Data Center?
udit-mishra-5113a21a Mar 14, 2016 7:09 AM (in response to pruivo)Hello Pedro,
I have attached my domain.xml file
Below are the console log when I put in UDIT and try to get from JBOSS -
[Server:ServerOne] 16:30:47,433 INFO [org.infinispan.server.endpoint] (MSC service thread 1-5) DGENDPT10002: REST mapped to /rest
[Server:ServerOne] 16:30:47,590 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Infinispan Server 8.2.0.Final (WildFly Core 2.0.10.Final) started in 21242ms - Started 208 of 264 services (154 services are lazy, passive or on-demand)
[Server:ServerOne] 16:31:00,551 INFO [org.jgroups.protocols.relay.RELAY2] (Timer-2,Udit:ServerOne) _Udit:ServerOne:UDIT: joined bridge cluster 'xsite'
[Server:ServerOne] 16:33:48,785 ERROR [org.jgroups.protocols.relay.RELAY2] (HotRodServerWorker-8-1) Udit:ServerOne: no route to JBOSS: dropping message
[Server:ServerOne] 16:33:58,789 WARN [org.infinispan.xsite.BackupSenderImpl] (HotRodServerWorker-8-1) ISPN000202: Problems backing up data for cache default to site JBOSS: org.infinispan.util.concurrent.TimeoutException: Timed out after 10 seconds waiting for a response from JBOSS (sync, timeout=10000)
[Server:ServerOne] 16:34:35,157 ERROR [org.jgroups.protocols.relay.RELAY2] (HotRodServerWorker-8-2) Udit:ServerOne: no route to JBOSS: dropping message[Server:ServerOne] 16:34:45,158 WARN [org.infinispan.xsite.BackupSenderImpl] (HotRodServerWorker-8-2) ISPN000202: Problems backing up data for cache default to site JBOSS: org.infinispan.util.concurrent.TimeoutException: Timed out after 10 seconds waiting for a response from JBOSS (sync, timeout=10000)
-
JBoss - domain.xml.zip 3.8 KB
-
Udit - domain.xml.zip 3.7 KB
-
-
12. Re: How to replicate cache in different Blade in a Data Center?
udit-mishra-5113a21a Mar 14, 2016 9:23 AM (in response to udit-mishra-5113a21a)Somebody please help. nadirx could you? please?
-
13. Re: How to replicate cache in different Blade in a Data Center?
pruivo Mar 14, 2016 12:42 PM (in response to udit-mishra-5113a21a)Hi Udit,
It is a wrong configuration for the network. From the previous messages, I assume both sites (jboss and udit) and in the same network.
If that is the case, each of them must have different multicast address/ports otherwise they wouldn't see each other as a separate site.
The configuration parameters are located in the domain.xml file, in the end: <socket-binding name="jgroups-mping"...> and <socket-binding name="jgroups-udp"...>. You need to change in one of yours sites the multicast-address or the multicast-port.
Cheers,
Pedro
-
14. Re: How to replicate cache in different Blade in a Data Center?
n.dobryukha Mar 14, 2016 5:53 PM (in response to pruivo)Hi Pedro,
I'm also interesting in this case. I tried to reproduce Udit's config with replaced parameters "jgroups-mping" and "jgroups-udp" from 234.99.54.14 to 234.99.54.15 in one of sites. It didn't help. I've got the same error:
[Server:server-two] 00:41:06,234 ERROR [org.jgroups.protocols.relay.RELAY2] (HotRodServerWorker-9-1) master:server-two: no route to BACKUP: dropping message [Server:server-two] 00:41:16,237 WARN [org.infinispan.xsite.BackupSenderImpl] (HotRodServerWorker-9-1) ISPN000202: Problems backing up data for cache libraryCache to site BACKUP: org.infinispan.util.concurrent.TimeoutException: Timed out after 10 seconds waiting for a response from BACKUP (sync, timeout=10000)