Bug 745871 (EDG-70) - Params jboss.infinispan.*.server.host passed to EDG are ignored
Summary: Params jboss.infinispan.*.server.host passed to EDG are ignored
Keywords:
Status: CLOSED NEXTRELEASE
Alias: EDG-70
Product: JBoss Data Grid 5
Classification: JBoss
Component: Infinispan
Version: EAP 5.1.0 EDG TP
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: EAP 5.1.0 EDG TP
Assignee: Default User
QA Contact:
URL: http://jira.jboss.org/jira/browse/EDG-70
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-23 14:19 UTC by Radoslav Husar
Modified: 2011-10-11 17:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-28 14:06:58 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker EDG-70 0 Major Closed Params jboss.infinispan.*.server.host passed to EDG are ignored 2014-07-24 13:57:07 UTC

Description Radoslav Husar 2011-03-23 14:19:36 UTC
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}

Comment 1 Radoslav Husar 2011-03-23 14:20:32 UTC
Link: Added: This issue is a dependency of JBQA-4438


Comment 2 Galder Zamarreño 2011-03-28 09:44:46 UTC
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

Comment 3 Radoslav Husar 2011-03-28 14:03:29 UTC
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.

Comment 4 Radoslav Husar 2011-03-28 14:06:58 UTC
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}


Comment 5 Radoslav Husar 2011-03-28 14:09:27 UTC
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} 


Comment 6 Radoslav Husar 2011-03-28 14:09:38 UTC
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}

Comment 7 Galder Zamarreño 2011-03-29 09:04:24 UTC
Rado, that looks good. Thanks for adding extra info on the use case.

Comment 8 Anne-Louise Tangring 2011-10-11 17:06:04 UTC
Release Notes Docs Status: Removed: Not Required 



Note You need to log in before you can comment on or make changes to this bug.