| Summary: | Params jboss.infinispan.*.server.host passed to EDG are ignored | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Data Grid 5 | Reporter: | Radoslav Husar <rhusar> |
| Component: | Infinispan | Assignee: | Default User <jbpapp-maint> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | EAP 5.1.0 EDG TP | CC: | galder.zamarreno, rhusar |
| Target Milestone: | --- | ||
| Target Release: | EAP 5.1.0 EDG TP | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://jira.jboss.org/jira/browse/EDG-70 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-03-28 14:06:58 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Link: Added: This issue is a dependency of JBQA-4438 Hmmmm, this is odd. If you add the following to bin/run.conf:
{code}JAVA_OPTS="$JAVA_OPTS -Djboss.infinispan.hotrod.server.host=1.2.3.4"{code}
You see the boot.log logging:
{code}11:29:44,502 DEBUG [ServerInfo] jboss.infinispan.hotrod.server.host: 1.2.3.4{code}
But when the Infinispan Servers get to the starting point, they and VisualVM see:
{code}jboss.infinispan.hotrod.server.host=127.0.0.1{code}
Now, if you pass '-b lo2' in the command line so that the general bind address is 127.0.0.2, you see that the boot.log still says:
{code}11:29:44,502 DEBUG [ServerInfo] jboss.infinispan.hotrod.server.host: 1.2.3.4{code}
But, the Infinispan Servers and VisualVM see:
{code}jboss.infinispan.hotrod.server.host=lo2{code}
So clearly, some code or something is in there that forces jboss.infinispan.hotrod.server.host to be whatever has been assigned to the '-b' parameter. In fact, this is being done by the binding service:
{code:xml}<bean class="org.jboss.services.binding.SystemPropertyBinding">
<constructor>
<parameter>jboss.infinispan.hotrod.server.host</parameter>
<parameter class="java.lang.String">
<value-factory bean="ServiceBindingManager" method="getStringBinding">
<parameter>Infinispan</parameter>
<parameter>HotRodServer</parameter>
<parameter><null/></parameter>
</value-factory>
</parameter>
</constructor>
</bean>{code}
So Rado, in your case simply use '-b <host/ip>'
If you need HotRod to point to a different IP as to the rest of servers (i.e. Memcached or REST), seems like at the moment you have to manually modify that file the datagrid-endpoint-hotrod.properties
Thanks for the great analysis Galder! But, no, I cant use -b since that actually lead to discovery of this issue. The bind address is something else than the public (to clients) facing interface. You typically don't want your UDP traffic to go the same interfaces you have tweaked for UDP as your client TCP HotRod communication. I don't understand the reject, but no worries, I am reopening and I will fix it myself since its trivial fix. Release Notes Docs Status: Added: Not Required
Release Notes Text: Added: Hi Galder,
Just committed revision 111046. Can you please review my change? The fix works in following fashion: if the jboss.infinispan.hotrod/memcache.server.host property is already specified, do not override this setting in binder.
Thanks
{code}
Index: bindings-jboss-beans.xml
===================================================================
--- bindings-jboss-beans.xml (revision 111043)
+++ bindings-jboss-beans.xml (working copy)
@@ -576,7 +576,7 @@
<bean class="org.jboss.services.binding.ServiceBindingMetadata">
<property name="serviceName">Infinispan</property>
<property name="bindingName">HotRodServer</property>
- <property name="hostName">${jboss.bind.address:127.0.0.1}</property>
+ <property name="hostName">${jboss.infinispan.hotrod.server.host,jboss.bind.address:127.0.0.1}</property>
<property name="port">11222</property>
<property name="description">Socket on which Infinispan's HotRod server listens</property>
</bean>
@@ -584,7 +584,7 @@
<bean class="org.jboss.services.binding.ServiceBindingMetadata">
<property name="serviceName">Infinispan</property>
<property name="bindingName">MemcachedServer</property>
- <property name="hostName">${jboss.bind.address:127.0.0.1}</property>
+ <property name="hostName">${jboss.infinispan.memcached.server.host,jboss.bind.address:127.0.0.1}</property>
<property name="port">11211</property>
<property name="description">Socket on which Infinispan's memcached server listens</property>
</bean>
{code}
Release Notes Text: Removed: Hi Galder,
Just committed revision 111046. Can you please review my change? The fix works in following fashion: if the jboss.infinispan.hotrod/memcache.server.host property is already specified, do not override this setting in binder.
Thanks
{code}
Index: bindings-jboss-beans.xml
===================================================================
--- bindings-jboss-beans.xml (revision 111043)
+++ bindings-jboss-beans.xml (working copy)
@@ -576,7 +576,7 @@
<bean class="org.jboss.services.binding.ServiceBindingMetadata">
<property name="serviceName">Infinispan</property>
<property name="bindingName">HotRodServer</property>
- <property name="hostName">${jboss.bind.address:127.0.0.1}</property>
+ <property name="hostName">${jboss.infinispan.hotrod.server.host,jboss.bind.address:127.0.0.1}</property>
<property name="port">11222</property>
<property name="description">Socket on which Infinispan's HotRod server listens</property>
</bean>
@@ -584,7 +584,7 @@
<bean class="org.jboss.services.binding.ServiceBindingMetadata">
<property name="serviceName">Infinispan</property>
<property name="bindingName">MemcachedServer</property>
- <property name="hostName">${jboss.bind.address:127.0.0.1}</property>
+ <property name="hostName">${jboss.infinispan.memcached.server.host,jboss.bind.address:127.0.0.1}</property>
<property name="port">11211</property>
<property name="description">Socket on which Infinispan's memcached server listens</property>
</bean>
{code}
Hi Galder,
Just committed revision 111046. Can you please review my change? The fix works in following fashion: if the jboss.infinispan.hotrod/memcache.server.host property is already specified, do not override this setting in binder.
Thanks
{code}
Index: bindings-jboss-beans.xml
===================================================================
--- bindings-jboss-beans.xml (revision 111043)
+++ bindings-jboss-beans.xml (working copy)
@@ -576,7 +576,7 @@
<bean class="org.jboss.services.binding.ServiceBindingMetadata">
<property name="serviceName">Infinispan</property>
<property name="bindingName">HotRodServer</property>
- <property name="hostName">${jboss.bind.address:127.0.0.1}</property>
+ <property name="hostName">${jboss.infinispan.hotrod.server.host,jboss.bind.address:127.0.0.1}</property>
<property name="port">11222</property>
<property name="description">Socket on which Infinispan's HotRod server listens</property>
</bean>
@@ -584,7 +584,7 @@
<bean class="org.jboss.services.binding.ServiceBindingMetadata">
<property name="serviceName">Infinispan</property>
<property name="bindingName">MemcachedServer</property>
- <property name="hostName">${jboss.bind.address:127.0.0.1}</property>
+ <property name="hostName">${jboss.infinispan.memcached.server.host,jboss.bind.address:127.0.0.1}</property>
<property name="port">11211</property>
<property name="description">Socket on which Infinispan's memcached server listens</property>
</bean>
{code}
Rado, that looks good. Thanks for adding extra info on the use case. Release Notes Docs Status: Removed: Not Required |
Workaround: Workaround Exists Workaround Description: Edit *.properties and change it to something else and pass that argument. project_key: EDG When you pass these params to EDG via -D param, they get ignored. The standard app server behaviour is that you can override these params. All servers except REST are affected. {code} [META-INF]$ cat datagrid-endpoint-hotrod.properties enabled = true # Service Binding Manager sets the system properties below according to the port setup chosen infinispan.server.host = ${jboss.infinispan.hotrod.server.host:127.0.0.1} {code}