Quantcast
Channel: VMware Communities : Unanswered Discussions - vFabric GemFire [ARCHIVED]
Viewing all articles
Browse latest Browse all 532

Confusion with locator installation

$
0
0

We have gemfire 7 packaged into tcServer instances with spring-data for as much as we can. Factory methods for the rest.

Multiple environments (dev/qa/prod/ types) on a single server.

 

We are differentiating by ip.

 

Ok, so we try to drop in a locator.

Here's a piece of configuration xml to bring up a locator.

 

 

<beanid="locator"class="com.gemstone.gemfire.distributed.Locator"factory-method="startLocatorAndDS">

  <constructor-argvalue="${locator.port}"/>

  <constructor-argvalue="${locator.log-file}"/>

 

  <constructor-arg>

  <beanclass="java.net.InetAddress"factory-method="getByName">

    <constructor-argvalue="${locator.bind-address}"/>

  </bean>

  </constructor-arg>

  <constructor-argref="locatorProperties"/>

  <constructor-argvalue="true"/>

  <constructor-argvalue="true"/>

  <constructor-argvalue="${locator.bind-address}"/>

</bean>

 

<!-- Properties file bean - required for the LocatorFactory which creates the locator -->

<beanid="locatorProperties"class="org.springframework.beans.factory.config.PropertiesFactoryBean"depends-on="placeholderConfig">

  <propertyname="properties">

    <props>

      <propkey="locators">${locator.locators}</prop>

      <propkey="bind-address">${locator.bind-address}</prop>

      <propkey="mcast-port">${locator.mcast-port}</prop>

      <propkey="log-file">${locator.log-file}</prop>

      <propkey="log-level">${locator.log-level}</prop>

      <propkey="license-data-management">${locator.license-data-management}</prop>

    </props>

  </property>

</bean>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

There was a lot of trial and error went into this, so there may be some pieces that are superfluous.

It does however work.

 

 

Ok, here's the problem.

Machine has multiple network cards.

When we try to start this up, the locator is binding to the designated port, but on all addresses, so if we wanted (say) dev on 10.2.1.1 and the locator on10001 and qa on 10:2:1.2 so we are running two different grids, it doesn't work as desired.

The first one up is bound to the port everywhere, so that's all she wrote for the second.

 

Is this expected behaviour?

If not, which piece of the configuration did I miss that would allow this to work as described. I had some vague hope that the bind-address controlled this.


Viewing all articles
Browse latest Browse all 532

Trending Articles