1 2 Previous Next 20 Replies Latest reply on Jun 28, 2017 4:14 PM by jasonglass Go to original post
      • 15. Re: AS 7 Messaging ( HORNETQ ) Client access remote:// Problem with Server listening on 0.0.0.0 Interface
        jbertram

        That's the work-around for the versions where HORNEQ-952 isn't resolved (i.e. 2.2.18 and earlier).  In later versions you shouldn't need to do that.  It should just work.

        • 16. Re: AS 7 Messaging ( HORNETQ ) Client access remote:// Problem with Server listening on 0.0.0.0 Interface
          will.tatam

          HORNEQ-952 resolves the issue by attempting to convert 0.0.0.0 into a proper ip by guessing that you want the server's hostname to be used. This assumes that the hostname of the box is the name you wish your client to use, this is not a replacement for being able to set the hostname.

           

          For example

           

          myapp.example.com = 123.123.123.123 (bound to firewall)

          appserver.mynetwork.local = 192.168.1.123 (bound to server behind firewall)

           

          You want to be able to do something similar to webservices, where you can configure what the external name is for clients to connect

           

          <subsystem xmlns="urn:jboss:domain:webservices:1.1">

                      <wsdl-host>myapp.example.com</wsdl-host>

           

          For EJB invocation you use remote://myapp.example.com:4447 but when you then use JNDI, you need a way for anything returned to have the public details listed so the remote client can connect

           

          This feature is also needed so that you can say use JMS to a box in EC2, where you client connect to the elastic ip but the server is running on a private ip and has a "random" hostname. You should be able to do this without resorting to manually configuring the HornetQ connection rather than using JNDI to get RemoteConnectionFactory

          • 17. Re: AS 7 Messaging ( HORNETQ ) Client access remote:// Problem with Server listening on 0.0.0.0 Interface
            jbertram

            I guess I'm confused about what (if anything) needs to be fixed.  You're saying that you don't want to manually configure the connector, but in your use-case it seems to me that the connector which the client downloads from JNDI needs to point to an address which the server running the application server doesn't know anything about unless you manually configure it.  Please clarify.

            • 18. Re: AS 7 Messaging ( HORNETQ ) Client access remote:// Problem with Server listening on 0.0.0.0 Interface
              will.tatam

              The server will need to be configured manually to know the address that the remote client should use to connect, the question is jus the neatest way to edit the standalone-full.xml

               

              As I understand the post from jaikiran pai, since 7.1.1 there has been an offical way to deal with configuring the server with this destination address. This is to add the extra information to the socket-binding details. This is defined within jboss-as-config_1_2.xsd and follows with the whole design goal of AS7 that the xml should be based on a strict schema.

               

              From the testing I have done, it would appeat that the netty-connector tag references the socket-binding, but does not respect the client-mapping tag nested inside it. I would say that this is a bug.

               

              You can work around the bug, by removing the netty-connector tag and replacing it with a "manual" connector where you define the class that implements it and pass the name-value parameters to it in order to statically set the host and port. This is going back to the pre-AS7 style of configuration as it's not using a strict schema to configure the connector, breaks away form the whole idea in the AS7 config of putting all the binding details in a single place and also is not as flexible as the client-mapping as you can't define different host values based on client ip (not that I actually need this aspect of client-mapping though)

               

              clearer now ?

              • 19. Re: AS 7 Messaging ( HORNETQ ) Client access remote:// Problem with Server listening on 0.0.0.0 Interface
                jbertram

                Thank you for the clarification.

                • 20. Re: AS 7 Messaging ( HORNETQ ) Client access remote:// Problem with Server listening on 0.0.0.0 Interface
                  jasonglass

                  Hi @jbertram!  I know this is a bit old, but I'm running into the same issue with a JBoss cluster in a NAT'ed/firewall environment with JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8)

                  In domain.xml for:
                  <socket-binding-group name="smp_svr1-sockets" default-interface="public">

                  <socket-binding name="messaging" port="10206">

                       <client-mapping destination-address="10.250.240.25"/>

                  </socket-binding>

                  <socket-binding-group name="smp_svr2-sockets" default-interface="public">

                  <socket-binding name="messaging" port="10206">

                       <client-mapping destination-address="10.250.240.26"/>

                  </socket-binding>

                   

                  Theres actually 4 servers in the cluster...  I guess once the JNDI lookup occurs, the client is passed the connection factories for the local IP''s for example 10.140.40.X instead of the firewall NAT'ed IP's.

                   

                  I got this working on a stand alone server in a domain with a single server using domain.xml with the nettty connection factory "override" of (Note I used FQDN as it was easier than say adding a Virtual IP so the JBoss server could act as its own client):

                  <connector name="netty">

                  <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

                  <param key="host" value="an00sigap001u.uat.corp.myCompany.net"/>

                  <param key="port" value="10206"/>

                  <param key="ssl-enabled" value="true"/>

                  </connector>

                   

                  But havent been able to get that working with the four node cluster, e.g. adding a connector per clustered server with the servers unique FQDN as the host.

                   

                  I've been researching and banging my head on this for days, do you have any ideas or suggestions?  I can open a new thread if you like!

                   

                  Sincerely

                   

                  Jay Glass

                  1 2 Previous Next