1 2 Previous Next 19 Replies Latest reply on Aug 23, 2010 4:15 AM by timfox Go to original post
      • 15. Re: Configuring multi-homed with firewall address translation NAT
        timfox

        Hugh Bragg wrote:

         

        So I finally sorted this out if anyone's interested.

         

        I already tried Andreas' suggestion but the bind failed.

         

        HornetQ documentation doesn't mention where to keep configuration files.

        Really?

         

        http://hornetq.sourceforge.net/docs/hornetq-2.1.2.Final/user-manual/en/html/using-server.html#using-server.configuration

         

        Hugh Bragg wrote:


        I thought perhaps the client used the connectors configuration files. It might be obvious to anyone with experience setting it up, but not to a newbie.

        Connectors / Acceptors are explained in detail here:

         

        http://hornetq.sourceforge.net/docs/hornetq-2.1.2.Final/user-manual/en/html/configuring-transports.html

         

        At the end of the day it's just TCP connections. A TCP connection is defined by:

         

        a) An address:port at one end of the connection

        b) An address:port at the other end of the connection

         

        When you create a TCP connection from a client to a server, you need to tell the client which remote address:port you want it to connect to. There has to be a server listening at that address:port for that connection to work.

         

        The acceptors are the things that tell the server at what address:port to listen at, the connectors are the things that tell the client what address:port to connect to.

         

        No rocket science here.

        • 16. Re: Configuring multi-homed with firewall address translation NAT
          hughbragg

          Yes really Tim.

           

          The cited document doesn't explicitly say whether these files belong on the server or on the client and the examples mix things together so much that it's really quite confusing at first. (This was a specific question I asked several times.)

           

          Also, in my first mail I explained how this configuration was working with JBossMQ. JBoss was never bound to that public address, only the NAT address, but it worked fine.

           

          Netty offers a better solution though because I don't need to tell the JMS client connecting to the public address to ignore the JNDI connect address which the firewall can't rewrite. (That's why I was looking for client configuration options and wondering if connectors were defined there.)

           

          Thanks anyway Tim, Clebert. I know you meant well.

          • 17. Re: Configuring multi-homed with firewall address translation NAT
            clebert.suconic
            The cited document doesn't explicitly say whether these files belong on the server or on the client and the examples mix things together so much that it's really quite confusing at first. (This was a specific question I asked several times.)

             

             

            Do you want something more explicit than this?

             

            "The configuration directory is specified on the classpath in the run scripts run.sh and run.bat This directory can contain the             following files."

             

            Honestly, I haven't seen many products (commercial or not) with more detailed documentation than hornetq. Perhaps you just have to read it. ;-) (it's useless if you don't)

             

            Also, in my first mail I explained how this configuration was working with JBossMQ. JBoss was never bound to that public address, only the NAT address, but it worked fine.

             

            In your first email you were explicit asking how to configure a firewal. I answered you that HornetQ just needs to listen to a socket... what more explicit answer do you need?

             

             

            Netty offers a better solution though because I don't need to tell the JMS client connecting to the public address to ignore the JNDI connect address which the firewall can't rewrite. (That's why I was looking for client configuration options and wondering if connectors were defined there.)

             

            You don't need JNDI with HornetQ. It's your choice how you configure it on hornetq-beans (also explained on the user's manual)

            • 18. Re: Configuring multi-homed with firewall address translation NAT
              andreas_back

              Hello Hugh,

               

              thank you for sharing your solution with us.

               

              In our company we are working with open source since the early Jserv and Tomcat days.

              And yes, the HornetQ documentation and the examples are - from my perspective - outstanding.

               

              On the other hand: To configure a client - server system in a non-trivial network topology isn't always a trivial task.

              One benefit of a really responsive forum is to help to clearify the concepts someone is looking at the things with.

               

              In the end, you made it running on your machines!

               

              With best regards

               

              Andreas

              • 19. Re: Configuring multi-homed with firewall address translation NAT
                timfox

                Hugh Bragg wrote:

                 

                Yes really Tim.

                 

                The cited document doesn't explicitly say whether these files belong on the server or on the client

                Well the chapter is called "Using the Server", which might provide a hint

                 

                Hugh Bragg wrote:

                 


                 

                Also, in my first mail I explained how this configuration was working with JBossMQ. JBoss was never bound to that public address, only the NAT address, but it worked fine.


                JBoss MQ has no more functionality than HQ. As I mentioned before when you create a socket you simply specify the address you're listening at / connecting to, there's no special code there to deal with the NAT case, in either JBoss MQ or HornetQ.

                 


                Netty offers a better solution though because I don't need to tell the JMS client connecting to the public address to ignore the JNDI connect address which the firewall can't rewrite. (That's why I was looking for client configuration options and wondering if connectors were defined there.)

                There's no requirement in HornetQ to use JNDI (unlike JBoss MQ). There's a chapter in the user manual that explains how to do this, and a fully working example in the distro, so you can copy the config if you like:

                 

                http://hornetq.sourceforge.net/docs/hornetq-2.1.2.Final/user-manual/en/html/using-jms.html#d0e1186

                 

                If you're directly instantiating connection factories on the client side you can pass in the TCP address:port (connector info) directly from your client code. The API for this is described in the javadoc.

                 

                Hope that helps.

                1 2 Previous Next