1
votes

I am running JBoss EAP 6.2 (embedded HornetQ 2.3.12.Final) as a standalone Messaging server that will host JMS Queues and Topics.

There will be other JBoss servers that remotely connect to the Messaging Server's Queues and Topics.

Using this Stackoverflow answer: Binding JBoss AS 7 to all interfaces

I made the following change to my standalone-full.xml configuration:

<interfaces>
    ...
    <interface name="public">     
<!--<inet-address value="${jboss.bind.address:127.0.0.1}"/>-->
        <any-address/>
    </interface>
</interfaces>

After making this change, I can successfully connect from other JBoss servers via port 4447 (JBoss Remoting) and writing JMS Client code (ConnectionFactory, Connection, MessageProducer, etc).

JBoss log has the following, which is reassuring:

[org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: 
Listening on 0.0.0.0:4447

However, I cannot connect via a remote MDB. :-( I need to figure this out because we do MDBs and not JMS Client code.

I looked at my JBoss log, and see the following error:

HQ121005: Invalid "host" value "0.0.0.0" detected for "netty" connector. 
Switching to "ptenn-fc20.arbfile.org". If this new address is incorrect please 
manually configure the connector to use the proper one.

I looked through the <subsystem xmlns="urn:jboss:domain:messaging:1.4"><hornetq-server> ... section and did not see anything about how to specify a different address for the "netty" connector.

It definitely seems that Netty is using the public interface that I specified, I'm puzzled as to why JBoss Remoting (on port 4447) is fine listening on 0.0.0.0, but Netty (on port 5445) is not.

If anyone has any ideas, insight, or suggestions, I would sincerely appreciate it. :-)

Thanks,

Philip

1

1 Answers

1
votes

Philip,

The host is specified via the interfaces element of standalone-full-ha.xml.

You then refer to that interface in the socket-bindings element of same config file.

e.g. The sample below binds JMS to a specific IP address and no longer 0.0.0.0...

<interfaces>
    <interface name="management">
        <!--<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>-->
        <inet-address value="0.0.0.0"/>
    </interface>
    <interface name="public">
        <inet-address value="0.0.0.0"/>
        <!--just an FYI that we can use the following syntax too-->
        <!--<any-address/>-->
    </interface>
    <interface name="jms">  <-- HERE
        <inet-address value="${jboss.bind.address}"/>
    </interface>
    <!-- TODO - only show this if the jacorb subsystem is added  -->
    <interface name="unsecure">
        <!--
          ~  Used for IIOP sockets in the standard configuration.
          ~                  To secure JacORB you need to setup SSL 
          -->
        <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
    </interface>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
    .
    .
    .

    <!--JMS-->
    <socket-binding name="messaging" port="5445" interface="jms"/>  <-- HERE
    .
    .
    .
</socket-binding-group>

Rob