HotRod connector is not able to resolve expression for external-host in JDG6

Solution Verified - Updated -

Issue

  • We need to form a cluster between two nodes both running behind a bridged network (using docker), but it is not possible to set the external address to a system property. We need this so that state transfer indications over hotrod tell the clients to connect to the "external" ip instead of a node local ip. Configuration and error like followed:
<system-properties>
    <property name="infinispan.external_host" value="1.2.3.4"></property>
</system-properties>
...
<subsystem xmlns="urn:infinispan:server:endpoint:6.1">
    <hotrod-connector cache-container="clustered" socket-binding="hotrod">
        <topology-state-transfer  external-host="${infinispan.external_host}" ...></topology>
    </hotrod-connector>
    ..........
</subsystem>
TRACE AbstractTransport:34 - Read string is: ${infinispan.external_addr}
TRACE AbstractTransport:34 - Read string is: ${infinispan.external_addr}
TRACE TcpTransport:211 - Offset: 0, len=2, size=2
TRACE TcpTransport:211 - Offset: 0, len=2, size=2
TRACE TcpTransport:231 - Successfully read array with size: 2
14:31:32 TRACE TcpTransport:231 - Successfully read array with size: 2
14:31:32 TRACE TcpTransport:180 - Read byte 3 from socket input in Socket[addr=localhost/127.0.0.1,port=11222,localport=55162]
   ............
INFO  Codec21:413 - ISPN004006: localhost/127.0.0.1:11222 sent new topology view (id=0, age=0) containing 1 addresses: [${infinispan.external_host}:11222]
INFO  Codec21:413 - ISPN004006: localhost/127.0.0.1:11222 sent new topology view (id=0, age=0) containing 1 addresses: [${infinispan.external_host}:11222]
TRACE TcpTransportFactory:371 - Current list: [localhost/127.0.0.1:11222]
TRACE TcpTransportFactory:371 - Current list: [localhost/127.0.0.1:11222]
TRACE TcpTransportFactory:372 - New list: [${infinispan.external_host}:11222]
TRACE TcpTransportFactory:372 - New list: [${infinispan.external_host}:11222]
TRACE TcpTransportFactory:373 - Added servers: [${infinispan.external_host}:11222]
TRACE TcpTransportFactory:373 - Added servers: [${infinispan.external_host}:11222]
TRACE TcpTransportFactory:374 - Removed servers: [localhost/127.0.0.1:11222]
TRACE TcpTransportFactory:374 - Removed servers: [localhost/127.0.0.1:11222]
INFO  TcpTransportFactory:384 - ISPN004014: New server added(${infinispan.external_host}:11222), adding to the pool.
INFO  TcpTransportFactory:384 - ISPN004014: New server added(${infinispan.external_host}:11222), adding to the pool.
TRACE TcpTransport:75 - Could not connect to server: ${infinispan.external_host}:11222
java.net.UnknownHostException

Environment

  • Red Hat JBoss Data Grid (JDG)
    • 6.x
    • 7.0.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content