3 Replies Latest reply on Sep 17, 2012 6:07 AM by Radoslav Husar

    standalone.xml + web server + mod_cluster?

    Steven ONeill Newbie

      Hi,

       

      I have a simple application running in standalone.xml.  I need to put a web server in front of it. 

       

      From the documentation for JBoss AS7, I've gathered mod_cluster is the most efficient/best choice for the connector; other options seemed to be mod_jk and mod_proxy.

       

      However, if I understand the documentation correctly, it appears that an "-ha.xml" config file is required for using mod_cluster .  I'd really like to keep the simpler standalone.xml file and just add to it what I need.

       

      Is it possible to use mod_cluster without having to go with a "-ha.xml" config file?  If not, should I be considering another option or setting up the front-end web server in another way?   Maybe I misunderstood the documentation.

       

      Thank you,

      -Steve

        • 1. Re: standalone.xml + web server + mod_cluster?
          Steven ONeill Newbie

          I see now that the only major difference between standalone.xml and standalone-ha.xml, other than mod_cluster extension (which I would need anyway, right?), is org.jboss.as.clustering.jgroups.

           

          I'll look at this some more...

          • 2. Re: standalone.xml + web server + mod_cluster?
            Steven ONeill Newbie

            Okay, I think I understand now, mod_cluster REQUIRES the 2 extra extension modules in the ha config files, jgroups and modcluster.

            • 3. Re: standalone.xml + web server + mod_cluster?
              Radoslav Husar Master

              Wait a minute, that is not correct. You DO NOT need other dependencies even though its typical to use mod_cluster with clustering, you can still cleanly use it with a standalon server instead of mod_jk, mod_proxy or whatnot.

               

              A simple test for this is to openup a standalone-ha.xml profile, remove jgroups and infinispan and keep mod_cluster subsystem. I turned on some debug logging and mod_cluster started successfully:

               

              12:01:49,768 INFO  [org.jboss.modules] JBoss Modules version 1.1.3.GA

              12:01:49,943 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

              12:01:49,992 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.3.Final-SNAPSHOT "Arges" starting

              12:01:50,619 INFO  [org.xnio] XNIO Version 3.0.6.GA

              12:01:50,623 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)

              12:01:50,626 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.6.GA

              12:01:50,634 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.8.SP1

              12:01:50,654 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

              12:01:50,657 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem

              12:01:50,701 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011906: Activating OSGi Subsystem

              12:01:50,704 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem

              12:01:50,720 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013171: Activating Security Subsystem

              12:01:50,735 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.12.Final)

              12:01:50,774 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension

              12:01:50,780 INFO  [org.jboss.as.security] (MSC service thread 1-1) JBAS013170: Current PicketBox version=4.0.13.Final

              12:01:50,788 INFO  [org.jboss.as.naming] (MSC service thread 1-6) JBAS011802: Starting Naming Service

              12:01:50,799 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

              12:01:50,805 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-3) JBAS015400: Bound mail session [java:jboss/mail/Default]

              12:01:50,978 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-8) JBoss Web Services - Stack CXF Server 4.0.5.GA

              12:01:50,999 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) Starting Coyote HTTP/1.1 on http-/127.0.0.1:8080

              12:01:51,002 INFO  [org.apache.coyote.ajp.AjpProtocol] (MSC service thread 1-2) Starting Coyote AJP/1.3 on ajp-/127.0.0.1:8009

              12:01:51,060 INFO  [org.jboss.modcluster.ModClusterService] (ServerService Thread Pool -- 50) Initializing mod_cluster 1.2.1.Final

              12:01:51,092 INFO  [org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (ServerService Thread Pool -- 50) Listening to proxy advertisements on 224.0.1.105:23,364

              12:01:51,092 DEBUG [org.jboss.modcluster.ModClusterService] (ServerService Thread Pool -- 50) Received server start event

              12:01:51,093 DEBUG [org.jboss.modcluster.ModClusterService] (ServerService Thread Pool -- 50) Check status for engine [jboss.web]

              12:01:51,179 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

              12:01:51,311 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-3) JBAS015012: Started FileSystemDeploymentService for directory /home/rhusar/git/jboss-as/build/target/mc_test/standalone/deployments

              12:01:51,314 INFO  [org.jboss.as.remoting] (MSC service thread 1-6) JBAS017100: Listening on 127.0.0.1:4447

              12:01:51,314 INFO  [org.jboss.as.remoting] (MSC service thread 1-7) JBAS017100: Listening on 127.0.0.1:9999

              12:01:51,393 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management

              12:01:51,395 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990

              12:01:51,396 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.3.Final-SNAPSHOT "Arges" started in 1793ms - Started 139 of 221 services (81 services are passive or on-demand)

              12:02:00,922 DEBUG [org.jboss.modcluster.ModClusterService] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Check status for engine [jboss.web]

               

              Could you make sure that you configured mod_cluster properly?

               

              • added an extension
              • added a configuration section
              • added scoket binding
              • ajp connector
              • (just copy them over from HA profile)
              1 of 1 people found this helpful