1 2 3 Previous Next 30 Replies Latest reply on Nov 21, 2013 3:36 AM by dabraham81 Go to original post
      • 15. Re: JBoss AS 7 Clustering and httpd virtualhost
        hfluz

        My host.xml:

         

         

        <?xml version='1.0' encoding='UTF-8'?>
        <host name="master" xmlns="urn:jboss:domain:1.2">
            <management>
                <security-realms>
                    <security-realm name="ManagementRealm">
                        <authentication>
                            <properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>
                        </authentication>
                    </security-realm>
                    <security-realm name="ApplicationRealm">
                        <authentication>
                             <properties path="application-users.properties" relative-to="jboss.domain.config.dir" />
                        </authentication>
                    </security-realm>
                </security-realms>
                <management-interfaces>
                    <native-interface security-realm="ManagementRealm">
                        <socket interface="management" port="${jboss.management.native.port:9999}"/>
                    </native-interface>
                    <http-interface security-realm="ManagementRealm">
                        <socket interface="management" port="${jboss.management.http.port:9990}"/>
                    </http-interface>
                </management-interfaces>
            </management>
        
        
            <domain-controller>
               <local/>
            </domain-controller>
        
        
            <interfaces>
                <interface name="management">
                    <inet-address value="${jboss.bind.address.management:189.90.70.58}"/>
                </interface>
                <interface name="public">
                   <inet-address value="${jboss.bind.address:189.90.70.58}"/>
                </interface>
                <interface name="unsecure">
                    <!-- Used for IIOP sockets in the standard configuration.
                         To secure JacORB you need to setup SSL -->
                    <inet-address value="${jboss.bind.address.unsecure:189.90.70.58}"/>
                </interface>
            </interfaces>
        
            <jvms>
                        <jvm name="default">
                    <heap size="64m" max-size="256m"/>
                    <permgen size="256m" max-size="256m"/>
                      <jvm-options>
                          <option value="-server"/>
                      </jvm-options>
                 </jvm>
                     </jvms>
        
        
                  <servers>
                <server name="server-one" group="main-server-group">
                          <socket-bindings socket-binding-group="ha-sockets" port-offset="150"/>
                </server>
                <server name="server-two" group="main-server-group" auto-start="true">
                    <socket-bindings socket-binding-group="ha-sockets" port-offset="250"/>
                                      <jvm name="default"/>
                </server>
                <server name="server-three" group="other-server-group" auto-start="true">
                    <socket-bindings socket-binding-group="ha-sockets" port-offset="350"/>
                                      <jvm name="default"/>
                </server>
            </servers>
        </host>
        
        • 16. Re: JBoss AS 7 Clustering and httpd virtualhost
          hfluz

          I uploaded all the files that might be relevant.

          • 17. Re: JBoss AS 7 Clustering and httpd virtualhost
            hfluz

            I'd like to debug using the JBoss-cli, but I just can't use it.

             

            In the JBoss AS 7 Administration book  the command :list-proxies is executed inside the modcluster subsystem, but when I try to execute it, cli simply can't find it.

             

             

            [domain@189.90.70.58:9999 /] cd subsystem=modcluster  
            [domain@189.90.70.58:9999 subsystem=modcluster] :list-proxies            
            {
                "outcome" => "failed",
                "failure-description" => "JBAS010850: No handler for operation list-proxies at address [(\"subsystem\" => \"modcluster\")]",
                "rolled-back" => true
            }
            

             

            The book is based on JBoss AS 7.0, something changed in the 7.1 version?

            • 18. Re: JBoss AS 7 Clustering and httpd virtualhost
              kazaag

              If I read well your configuration on server-three is using a ha profile, so it is the only one that will use modcluster.

               

              For cli the example used the standalone configuration as you are using the domain one it will be different.

               

              The path structure is different in domain mode (https://docs.jboss.org/author/display/AS71/Admin+Guide#AdminGuide-Manageddomain)

               

              You can get to /profile=full-ha/subsystem but this will only list the configuration point of view.  To see the discovered list you need to go to /master/server=server-three/subsystem=modcluster

              • 19. Re: JBoss AS 7 Clustering and httpd virtualhost
                hfluz

                Actually I realized that a few hours ago and changed to:

                 

                <server-groups>
                        <server-group name="main-server-group" profile="full-ha">
                            <jvm name="default">
                                <heap size="64m" max-size="512m"/>
                            </jvm>
                            <socket-binding-group ref="full-ha-sockets"/>
                        </server-group>
                        <server-group name="other-server-group" profile="full-ha">
                            <jvm name="default">
                                <heap size="64m" max-size="512m"/>
                            </jvm>
                            <socket-binding-group ref="full-ha-sockets"/>
                        </server-group>
                </server-groups>
                

                 

                But that unhappily didn't solve my issue.

                 

                And previously I sent the wrong host.xml, the right one is attached to this post.

                 

                About CLI, how I go into a server-group? "cd server-group=main-server-group"?

                • 20. Re: JBoss AS 7 Clustering and httpd virtualhost
                  hfluz

                  I managed to add the advertise multicast address to the proxy-list through jboss cli gui (a very helpful tool). Using the same tool I can view the mod_cluster configuration in JBoss:

                   

                  jboss-cli-gui-mod-cluster.png

                   

                  But 189.90.70.58:8888/mod_cluster-manager still doesn't display any connection between httpd and jboss.

                  • 21. Re: JBoss AS 7 Clustering and httpd virtualhost
                    hfluz

                    And that's mod_cluster info in full-ha-socket.

                     

                    jboss-cli-gui-mod-cluster-socket.png

                    • 22. Re: JBoss AS 7 Clustering and httpd virtualhost
                      kazaag

                      So advertising is working, JBoss nodes are aware of the proxy.

                       

                      So it seems that there is an issue when the JBoss try to register them-self to the proxy.  Can you provide the JBoss log, there should be some error related to mod_cluster.

                       

                      Have you any web application deployed?  If it isn't the casse, JBoss may wait before registering to the proxy as there is no real need to.

                      • 23. Re: JBoss AS 7 Clustering and httpd virtualhost
                        hfluz

                        Yes, I have an enterprise app deployed with JPA, Hibernate, EJB, JSF and Primefaces. I can access the app directly through a node (189.90.790.58:8230/appname-web). I guess I'll try with a simple web app.

                         

                        About the jboss.log, I didn't find it inside the domain/log dir, I can find only host-controller.log and process-controller.log.

                         

                        And thanks a lot for your help and patience.

                        • 24. Re: JBoss AS 7 Clustering and httpd virtualhost
                          hfluz

                          I tried to deploy the cluster-demo app (recommended here) without success.

                           

                          I also copied the full log from terminal (it is attached to this post). This line caught my attention:

                           

                          [Server:server-one] 15:54:18,006 INFO  [org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (MSC service thread 1-6) Listening to proxy advertisements on 224.0.1.105:23364
                          
                          [Server:server-one] 15:54:27,840 INFO  [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) IO error sending command INFO to proxy ntds1r.mcast.net/224.0.1.105:23364: java.net.ConnectException: Network is unreachable
                          

                           

                          The same happens with server-two and server-three.

                          • 25. Re: JBoss AS 7 Clustering and httpd virtualhost
                            kazaag

                            The proxy ip:port is set to the multicast adress.

                             

                            In the proxy list you should put the ip:port of the virtual host.

                            • 26. Re: JBoss AS 7 Clustering and httpd virtualhost
                              hfluz

                              Great! You're right, I changed the value to 189.90.70.58:8888 and that error is gone. Now I guess I'm really close to get everything working ok.

                               

                              That's displayed in 189.90.70.58:8888/mod_cluster-manager

                               

                              mod_cluster_manager.png

                              Do you have idea why my nodes are as undefined and removed? I still cannot access 189.90.70.58/cluster-demo.

                               

                              Edit: Complementing with jboss log:

                               

                               

                              [Server:server-one] 17:27:37,976 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Old node still exist: {4}] sending command CONFIG to proxy u217064.ati.uel.br/189.90.70.58:8888, configuration will be reset
                              [Server:server-one] 17:27:47,982 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Old node still exist: {4}] sending command CONFIG to proxy u217064.ati.uel.br/189.90.70.58:8888, configuration will be reset
                              [Server:server-three] 17:27:48,165 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Can't read node: {4}] sending command STATUS to proxy u217064.ati.uel.br/189.90.70.58:8888, configuration will be reset
                              [Server:server-two] 17:27:57,958 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Can't read node: {4}] sending command STATUS to proxy u217064.ati.uel.br/189.90.70.58:8888, configuration will be reset
                              
                              • 27. Re: JBoss AS 7 Clustering and httpd virtualhost
                                hfluz

                                I managed to solve the issue above with the command below:

                                 

                                /profile=full-ha/subsystem=web/:write-attribute(name=instance-id,value=${jboss.node.name})

                                 

                                I got the solution from https://community.jboss.org/thread/196776

                                 

                                Now the nodes are found correctly, but I still cannot access 189.90.70.58/cluster-demo

                                 

                                The info below is displayed in 189.90.70.58:8888/mod_cluster-manager:

                                 

                                 

                                Contexts:
                                /cluster-demo, Status: ENABLED Request: 0 Disable 
                                Aliases:
                                default-host localhost example.com 
                                
                                • 28. Re: JBoss AS 7 Clustering and httpd virtualhost
                                  kazaag

                                  On mod_cluster point of view it is ok.

                                   

                                  The log didn't show any deployement error.  You should be able to acccess /cluter-demo.

                                  • 29. Re: JBoss AS 7 Clustering and httpd virtualhost
                                    hfluz

                                    Thanks François, you helped me a lot. I'll try to solve this last issue in the mod_cluster forum.