5 Replies Latest reply on Nov 21, 2013 5:15 AM by spbhosale

    How to update IP address in public interface using CLI?

    spbhosale

      Hi,

      I am working on JBoss AS 7.1.1 Final and using standalone-full.xml to start JBoss. I want to make my web application public, so that it can be accessible from remote machine.

      For that I have modified IP from "127.0.0.1" to "XXX.XXX.XXX.XXX" in <interface name="public">.

      Also I have added interface="public" parameter in http socket-binding. All these changes are done in standalone-full.xml

      My changes working fine but these are done manually.

      Does any one know CLI script to update these changes?

       

      Resource used : http://stackoverflow.com/questions/14199474/jboss-application-server-accessing-deployed-web-application-from-another-mac…

        • 1. Re: How to update IP address in public interface using CLI?
          rhusar

          Would this be enough?

           

          [rhusar@rhusar jboss-as-7.1.1.Final]$ ./bin/jboss-cli.sh -c

          [standalone@localhost:9999 /] /interface=public/:write-attribute(name=inet-address,value=192.168.0.10)

          {

              "outcome" => "success",

              "response-headers" => {

                  "operation-requires-reload" => true,

                  "process-state" => "reload-required"

              }

          }

          • 2. Re: How to update IP address in public interface using CLI?
            spbhosale

            Thanks a lot Radoslav Husar. This command works fine and IP is changed.

            But until I add this public interface in "socket-binding" for http this application will be not accessible from remote machine.

            Do you have any idea to add parameter interface="public" also I need to change the http port to 8280.

            • 3. Re: How to update IP address in public interface using CLI?
              spbhosale

              Simply saying I want following changes in standalone-full.xml.PublishApps.png

              • 4. Re: How to update IP address in public interface using CLI?
                wdfink

                You can use this to change the port:

                  /socket-binding-group=standard-sockets/socket-binding=http:write-attribute(name=port, value=8280)

                If you use the default configuration the public interface should be the default if no interface is explicit given.

                   <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

                 

                Anyway you can add the interface by using

                /socket-binding-group=standard-sockets/socket-binding=http:write-attribute(name=interface, value=public)

                 

                CLI will help you with tab-completition and, if you update to a later version the CLI will help you more.

                Also you can use the GUI mode with jboss-cli --gui which you might find helpful.

                1 of 1 people found this helpful
                • 5. Re: How to update IP address in public interface using CLI?
                  spbhosale

                  Thanks a lot Wolf-Dieter Fink. Your suggestions are really helpful & exactly meet my requirement.