Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

Issue with non-default cluster-config.mirror-service.url in deployment with WAN Gateway

Due to naming conflict with other components using the mirror service in the same data-grid, it was necessary to change from the default "mirror-service" URL. Below I've used "NEW-mirror-service" as example of my code change.

Changes made in pu.xml files

Space PU file change:

                <prop key="cluster-config.mirror-service.url">jini://*/*/NEW-mirror-service</prop>

Mirror-service PU file change:

 <os-core:mirror id="NEW-mirror" url="/./NEW-mirror-service" space-sync-endpoint="hibernateSpaceSynchronizationEndpoint" operation-grouping="group-by-replication-bulk">
        <os-core:source-space name="MySpaceName" partitions="99" backups="99"/>

Since making this change, persistence via the mirror-service no longer functions in geo-redundant deployments which use the WAN Gateway.

Is there another mirror-service URL property which needs be be overwritten when the WAN gateway is part of the deployment?

asked 2016-12-02 09:59:05 -0500

Siobhán gravatar image
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

Hi, Please make sure you enabled mirror at space pu:(cluster-config.mirror-service.enabled=true or mirrored="true" see:http://docs.gigaspaces.com/xap102/asynchronous-persistency-with-the-mirror.html consider specifying full url name with container name for mirror, and when defining mirror you can define name instead of url,As aside note if your space contains 99 primaries and 99 backups , you should specify backups="1" as its number of backups per 1 primary.

Regards, Ester.

answered 2016-12-05 01:15:26 -0500

Ester gravatar image
edit flag offensive delete link more


Hi Ester,

cluster-config.mirror-service.enabled is already set to "true" in my space PU configuration. My mirror-service deployment was working correctly until it became necessary to change the URL from the default ("mirror-service") so I already know for sure that all the other configurations are set correctly. The only thing that has been changed in the mirror-service name itself.

Had some difficulty initially interpreting which URL or name you were recommending change for, but with some trial and error I've gotten this feature working with the modified mirror-service name.

Mirror Service PU.xml

<os-core:mirror id="mirror" url="/./NEW-mirror-service" space-sync-endpoint="hibernateSpaceSynchronizationEndpoint" operation-grouping="group-by-replication-bulk">
    <os-core:source-space name="ContextStoreSpace" partitions="99" backups="1"/>

Space PU.xml (adding the container name to this URL resolved the problem for deployments with WAN gateway)

<os-core:space id="space" url="/./ContextStoreSpace" versioned="true">
            <prop key="cluster-config.mirror-service.url">jini://*/NEW-mirror-service_container/NEW-mirror-service</prop>

NB: When I tried to use "name" instead of "url" as you suggested above this error was encountered, "name" doesn't seem to be a valid option for mirror configuration.

Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 40 in XML document from Byte array resource [resource loaded from byte array] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'name' is not allowed to appear in element 'os-core:mirror'.

Thank you for your assistance.

Regards, Siobhán

Siobhán gravatar imageSiobhán ( 2016-12-05 10:33:15 -0500 )edit

try this form

<os-core:space id="mirror" url="/./prod-mirror-${productmaster.gigaspaces.system.env}" schema="mirror" space-sync-endpoint="productMirrorJDBCDataSource" lookup-locat\="" ors="${productmaster.gigaspaces.lookup.locators}">

jb gravatar imagejb ( 2016-12-05 15:40:45 -0500 )edit

Hi JB,

Is your form above now the recommended way?

I've been able to get this working again by adding the container name to the space as per my previous comment above.

Regards, Siobhán

Siobhán gravatar imageSiobhán ( 2016-12-12 06:41:41 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-12-02 09:45:50 -0500

Seen: 174 times

Last updated: Dec 05 '16