7 Replies Latest reply on Aug 21, 2012 3:54 AM by wdfink

    Binding JBoss to two addresses but not all addresses

    dpbaker57

      In serveral of our environments we have a need to bind JBoss 5.1 to two addresses but not to all on the machine. We have two instances of the same application running on a single server. There are two IP ranges on different NICs. We can connect to the instances from one private NAT'ed from our intranet and another that faces the public Internet. We have been binding to all addresses on the machine and using the Jakarta plugin and multiple port numbers to sort things out. With IIS7 this solution is problematic. The IIS7 solution seems to requires that each instance of the application to be on a separate IP but if we continue to run multiple instances on the same we lose the ability to come in from our intranet unless we can bind JBoss to two addresses.

        • 1. Binding JBoss to two addresses but not all addresses
          wdfink

          AFAIK there is no option to bind jboss to multiple IP addresses, only a specific or all.

          • 2. Re: Binding JBoss to two addresses but not all addresses
            peterj

            Try this: in the server.xml file (in server/xxx/deploy/jbossweb.sar) change the existing HTTP protocol connector to use one of your IP addresses. Then make a copy of that <connector> entry and put in it the second IP address. I recall suggesting this to someone a few years ago and that seemed to work for them.

             

            I found that earlier post: http://community.jboss.org/message/199697

            1 of 1 people found this helpful
            • 3. Re: Binding JBoss to two addresses but not all addresses
              dpbaker57

              My friend Murphy, the guy with the law, is making me do this first on 4.0.5.

               

              So the file is deploy/jbossweb-tomcat55.sar/server.xml, right? I know it is but reassurance is always good.

               

              If add a second connector could I make it use a new variable like jboss.bind.address2? Then set that on the calling command line as "-D" param to the java command? We are still using JavaService.exe but will move to JavaServiceWrapper soon. I'm trying to figure out if it would work if I set it at the same place we set the variables used for the JVM and our application. I'm want to make it clear where to change the IP in the future for me or my successor, if needed. Rather than down somewhere in the configuration tree.

               

              One last question do you think I can do the same for AJP if needed? In the immediate case it isn't.

              • 4. Re: Binding JBoss to two addresses but not all addresses
                welle

                >  If add a second connector could I make it use a new variable like jboss.bind.address2?

                > Then set that on the calling command line as "-D" param to the java command?

                 

                Yes

                 

                > One last question do you think I can do the same for AJP if needed? In the immediate case it isn't.

                 

                Yes

                1 of 1 people found this helpful
                • 5. Binding JBoss to two addresses but not all addresses
                  dpbaker57

                  I have both 4.0.5 and 5.1 now listening on two specific ports for HTTP requests and I am confident the same could be done with AJP ports if needed. Thanks for all the help.

                  • 6. Re: Binding JBoss to two addresses but not all addresses
                    gigiaquino

                    How will you implement this in JBoss 7.1.1?

                    Is it possible in the mentioned version or it's just either one(127.0.0.1 or a IP address in IPv6 or IPv4 dotted decimal notation) or all (0.0.0.0) IP address?

                    • 7. Re: Binding JBoss to two addresses but not all addresses
                      wdfink

                      In 7.1.1 this is not possible.

                      But I suppose there is a option with specific virtual hosts in AS7.2.?, I'm not sure about that.

                       

                      But you should open a new thread in the AS7 forum and might add a link to this.