7 Replies Latest reply on Feb 3, 2013 8:11 AM by wdfink

    Need to demo JBoss AS7 in Domain Mode, Domain and Slave on one notebook

    techsjs2012

      I Need to demo JBoss AS7 in Domain Mode, Domain and Slave on one notebook.

       

      its on a MAC.

       

      I downloaded AS7 and copied it into two spots /home/username/as7/master and

      /home/username/as/7/slave

       

      i made all the changes as the documents states and I start the master first but then I start the master and I get the following error

       

      Address already in use /127.0.0.1:9999. It looks like the master and slaves are trying to use the same ports.. any quick way around this.. also attached is the full console output from the slave so you can see all the errors.  the master looks fine and if I goto the web admin console I can see the slave but cant start any of the servers..

        • 1. Re: Need to demo JBoss AS7 in Domain Mode, Domain and Slave on one notebook
          nickarls

          Haven't played around with clustingering but the normal way of getting two instances to run on the same interface is to pass a

          -Djboss.socket.binding.port-offset=100 etc to one of them (or edit the offset in the server config file)

          • 2. Re: Need to demo JBoss AS7 in Domain Mode, Domain and Slave on one notebook
            ssilvert

            Try this. First, download AS7.  Don't make any changes.

             

            For the master:

            cd <JBOSS_HOME>/bin
            ./domain --host-config=host-master.xml -b=<my IP address>
            

             

            For the slave:

            cd <JBOSS_HOME>/bin
            ./domain --host-config=host-slave.xml --master-address=127.0.0.1 -Djboss.management.native.port=10999
            

             

            Stan

            • 3. Re: Need to demo JBoss AS7 in Domain Mode, Domain and Slave on one notebook
              techsjs2012

              it looks like it started without a error but I dont have any servers in my master that way

              • 4. Re: Need to demo JBoss AS7 in Domain Mode, Domain and Slave on one notebook
                wdfink

                If you start two instances at the same system you need to use different ports or different IP address.

                Start the master first, if you use no additional options interfaces are bound against 127.0.0.1.

                If you start the slave use '-b IP -bmanagement IP' that should be working.

                 

                If you use host-master you may add server to the 'host-master.xml' file.

                 

                If you have further questions, please post your commands and what you've changed

                • 5. Re: Need to demo JBoss AS7 in Domain Mode, Domain and Slave on one notebook
                  techsjs2012

                  ok. I did a new install of the master and slave started the master with:


                  ./domain.sh --host-config=host-master.xml -b=192.168.1.5

                   

                  and the slave with:

                   

                  ./domain.sh --host-config=host-slave.xml --master-address=127.0.0.1 -Djboss.management.native.port=10999

                   

                  and it looks like everything starts ok but the only servers I see is on the slave.. where are the servers on the master??

                   

                   

                  then I stopped the slave and resetted it with:

                   

                  ./domain.sh --master-address=127.0.0.1 -Djboss.management.native.port=10999

                   

                  and I get the following errors:  can someone please tell me why

                   

                  17:31:45,052 INFO  [org.jboss.modules] (main) JBoss Modules version 1.1.1.GA

                  17:31:45,172 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.2.GA

                  17:31:45,230 INFO  [org.jboss.as] (MSC service thread 1-3) JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

                  17:31:45,631 INFO  [org.xnio] (MSC service thread 1-3) XNIO Version 3.0.3.GA

                  17:31:45,641 INFO  [org.xnio.nio] (MSC service thread 1-3) XNIO NIO Implementation Version 3.0.3.GA

                  17:31:45,647 INFO  [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 3.2.3.GA

                  17:31:46,969 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010927: Registered at domain controller

                  17:31:46,999 INFO  [org.jboss.as] (Controller Boot Thread) JBAS010902: Creating http management service using network interface (management) port (9990) securePort (-1)

                  17:31:47,005 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.0.0.1:10999

                  17:31:47,073 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: Address already in use /127.0.0.1:9990

                            at org.jboss.as.server.mgmt.HttpManagementService.start(HttpManagementService.java:210) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                            at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_11]

                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_11]

                            at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]

                  Caused by: java.net.BindException: Address already in use

                            at sun.nio.ch.Net.bind0(Native Method) [rt.jar:1.7.0_11]

                            at sun.nio.ch.Net.bind(Net.java:344) [rt.jar:1.7.0_11]

                            at sun.nio.ch.Net.bind(Net.java:336) [rt.jar:1.7.0_11]

                            at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199) [rt.jar:1.7.0_11]

                            at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) [rt.jar:1.7.0_11]

                            at org.jboss.sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:144)

                            at org.jboss.sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:54)

                            at org.jboss.sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:38)

                            at org.jboss.com.sun.net.httpserver.HttpServer.create(HttpServer.java:147)

                            at org.jboss.as.domain.http.server.ManagementHttpServer.create(ManagementHttpServer.java:145) [jboss-as-domain-http-interface-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.as.server.mgmt.HttpManagementService.start(HttpManagementService.java:177) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                            ... 5 more

                   

                   

                  17:31:47,088 INFO  [org.jboss.as.controller] (MSC service thread 1-5) JBAS014774: Service status report

                  JBAS014777:   Services which failed to start:      service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: Address already in use /127.0.0.1:9990

                   

                   

                  17:31:47,139 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010922: Starting server server-one

                  17:31:47,169 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010922: Starting server server-two

                  17:31:47,194 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990

                  17:31:47,195 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" (Host Controller) started in 2482ms - Started 11 of 11 services (0 services are passive or on-demand)

                  17:31:51,649 INFO  [org.jboss.as.domain.controller.mgmt] (proxy-threads - 1) JBAS010920: Server [Server:server-one] registered using connection [Channel ID 664fefa3 (inbound) of Remoting connection 59367702 to /127.0.0.1:61253]

                  17:31:51,765 INFO  [org.jboss.as.host.controller] (proxy-threads - 1) JBAS010919: Registering server server-one

                  17:31:51,970 INFO  [org.jboss.as.domain.controller.mgmt] (proxy-threads - 1) JBAS010920: Server [Server:server-two] registered using connection [Channel ID 2aa5e949 (inbound) of Remoting connection 734f6fe1 to /127.0.0.1:61255]

                  17:31:52,069 INFO  [org.jboss.as.host.controller] (proxy-threads - 1) JBAS010919: Registering server server-two

                  • 6. Re: Need to demo JBoss AS7 in Domain Mode, Domain and Slave on one notebook
                    nickarls

                    First you might want to stop all instances and try telnet localhost 9999 to see that you don't have anything on that port to start with.

                    • 7. Re: Need to demo JBoss AS7 in Domain Mode, Domain and Slave on one notebook
                      wdfink

                      If you start

                        ./domain.sh --master-address=127.0.0.1 -Djboss.management.native.port=10999

                      you will have a second instance acting as DC (not as slave).

                      The configuration will use the host.xml.

                      If you look into the host.xml the http-management interface will start on that port, where your first DC is still listen on!

                       

                      I recommend that you read the Domain Setup part of the documentation to understand how that configuration works and what you need to run two instances on the same box.