本文不同于前面写的JBOSS集群的文档,在之前的文档中,Jboss的服务器是通过Standalone-ha.xml以standalone.sh方式运行的伪群集。
在本文中,JBOSS的服务器端各个节点是基于主辅配置的,关于应用的部署,仅需要在主节点进行。

说明:
Total:
OS Version:RHEL 6.5
IPtables and SELinux:Stop and disable
—— —— —— —— —— ——
Web Server
software:httpd + mod_cluster
Ip 192.168.56.151

Jboss Node1/2
software:Java JDK 1.7 + wildfly 8.1.0 Final
Ip
192.168.56.131
102.168.56.132

———————————————————————————————————————————
零:
操作系统的状态:
1.Iptables和SELinux,必须关闭

[root@webserver conf]# service iptables status
iptables: Firewall is not running.
[root@webserver conf]# sestatus 
SELinux status:                 disabled
[root@webserver conf]#

2./etc/hosts

[root@webserver conf]# cat /etc/hosts
# Localhost
127.0.0.1       localhost

# Public
192.168.56.151  webserver
192.168.56.131  jboss1
192.168.56.132  jboss2
[root@webserver conf]# 

在没有配置DNS的网络环境中,/etc/hosts文件是很重要的。
在JBOSS集群环境中,hosts文件中需要添加的记录包括:
本地回环地址(localhost)
web服务器公网地址
JBOSS群集各个节点服务器公网地址

3.操作系统版本

[root@webserver conf]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 (Santiago)
[root@webserver conf]# 

一、Web Server

[root@webserver conf]# yum list | grep --color httpd
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
httpd.x86_64                           2.2.15-29.el6_4                      @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5
httpd-tools.x86_64                     2.2.15-29.el6_4                      @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5
httpd-devel.i686                       2.2.15-29.el6_4                      ISO 
httpd-devel.x86_64                     2.2.15-29.el6_4                      ISO 
httpd-manual.noarch                    2.2.15-29.el6_4                      ISO 
[root@webserver conf]# 

如上所示,对于RHEL 6.5的系统安装来说,HTTPD服务默认会被安装,但是是处于默认配置的状态,开机也不会启动。
如果没有安装,可以以RHEL6.5的光盘介质为YUM源,使用“yum install -y httpd”完成HTTP Server的安装。

关于mod_cluster:
官方的下载地址为:http://downloads.jboss.org/mod_cluster//1.2.6.Final/linux-x86_64/mod_cluster-1.2.6.Final-linux2-x64-so.tar.gz

[root@webserver conf]# ll /software/
total 130760
-rw-r--r-- 1 root root 133255203 Aug 21 06:10 jboss-as-7.1.1.Final.zip
-rwxrwxr-x 1  600  600     52149 Oct  1  2013 mod_advertise.so
-rw-r--r-- 1 root root    172415 Aug 21 06:09 mod_cluster-1.2.6.Final-linux2-x64-so.tar.gz
-rwxrwxr-x 1  600  600    219119 Oct  1  2013 mod_manager.so
-rwxrwxr-x 1  600  600    140967 Oct  1  2013 mod_proxy_cluster.so
-rwxrwxr-x 1  600  600     42429 Oct  1  2013 mod_slotmem.so
[root@webserver conf]# ll /software/*.so
-rwxrwxr-x 1 600 600  52149 Oct  1  2013 /software/mod_advertise.so
-rwxrwxr-x 1 600 600 219119 Oct  1  2013 /software/mod_manager.so
-rwxrwxr-x 1 600 600 140967 Oct  1  2013 /software/mod_proxy_cluster.so
-rwxrwxr-x 1 600 600  42429 Oct  1  2013 /software/mod_slotmem.so
[root@webserver conf]# 

如上所示,下载后上传服务器,并解压。
解压指令:tar -xzvf mod_cluster-1.2.6.Final-linux2-x64-so.tar.gz
解压后会生成四个“*.so”文件。
这四个文件需要Copy到Http Server的modules文件夹内,即:/etc/httpd/modules

[root@webserver conf]# ls -ltr /software/*.so
-rwxrwxr-x 1 600 600 219119 Oct  1  2013 /software/mod_manager.so
-rwxrwxr-x 1 600 600  52149 Oct  1  2013 /software/mod_advertise.so
-rwxrwxr-x 1 600 600  42429 Oct  1  2013 /software/mod_slotmem.so
-rwxrwxr-x 1 600 600 140967 Oct  1  2013 /software/mod_proxy_cluster.so
[root@webserver conf]# ls -ltr /etc/httpd/modules/ | tail -n 4
-rwxr-xr-x  1 root root  42429 Aug 21 06:11 mod_slotmem.so
-rwxr-xr-x  1 root root 140967 Aug 21 06:11 mod_proxy_cluster.so
-rwxr-xr-x  1 root root 219119 Aug 21 06:11 mod_manager.so
-rwxr-xr-x  1 root root  52149 Aug 21 06:11 mod_advertise.so
[root@webserver conf]#

Copy指令:cp /software/*.so /etc/httpd/modules

然后,需要修改HTTP Server的配置文件,声明上面的四个“*.so”,以便HTTPD启用。
Http Server配置文件:/etc/httpd/conf/httpd.conf
指令:

LoadModule slotmem_module modules/mod_slotmem.so
LoadModule manager_module modules/mod_manager.so
LoadModule proxy_cluster_module modules/mod_proxy_cluster.so
LoadModule advertise_module modules/mod_advertise.so

为了让mod_cluster正常的运行,并且可以查看到mod_cluster的实时状态,需要修改HTTP Server的配置文件,创建一个虚拟主机(Virtual Host)

//虚拟主机的监听IP、端口
Listen 192.168.56.151:6666

//声明虚拟主机

    
        Order deny,allow
        Allow from all
    

    //为了访问mod_cluster的管理页面,需要配置mod_cluster-manager
       #这里的命名可以随意
        SetHandler mod_cluster-manager   #这里的定义必须是:mod_cluster-manager
        Order deny,allow
        Allow from all
    
          KeepAliveTimeout 60
          MaxKeepAliveRequests 0
          
          //声明负载均衡器“jbosscluster”
          ManagerBalancerName jbosscluster
          AdvertiseFrequency 5
          ServerAdvertise On
          EnableMCPMReceive On
          AllowDisplay On

          //设置代理转发,将所有的请求都转发到负载均衡器“jbosscluster”,负载均衡器必须预声明。(保证存在)
          ProxyPass / balancer://jbosscluster/

关于Httpd.conf需要注意的其他部分内容
1.ServerName

[root@webserver conf]# cat /etc/httpd/conf/httpd.conf | grep -v "^#" | grep --color ServerName
ServerName webserver:80
[root@webserver conf]# cat /etc/hosts | grep --color webserver
192.168.56.151  webserver
[root@webserver conf]#

若没有配置“ServerName”,虽然可以成功的启动HTTPD,但是会有一些警告:

[root@webserver conf]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.56.151 for ServerName
                                                           [  OK  ]
[root@webserver conf]# 

正常启动的状态如下:

[root@webserver conf]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@webserver conf]# 

mod_cluster配置正确的话,在HTTPD的启动日志中是有所表现的:
日志:/etc/httpd/logs/error_log

[Sat Aug 23 08:08:08 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Aug 23 08:08:08 2014] [notice] Digest: generating secret for digest authentication ...
[Sat Aug 23 08:08:08 2014] [notice] Digest: done
[Sat Aug 23 08:08:08 2014] [notice] Advertise initialized for process 45982
[Sat Aug 23 08:08:08 2014] [notice] Apache/2.2.15 (Unix) DAV/2 mod_cluster/1.2.6.Final configured -- resuming normal operations

——————————————————————————————————————
最后,Web Server服务器上,/etc/httpd/conf/httpd.conf文件的配置如下:
(此处的配置均为追加

[root@webserver conf]# tail -n 26 /etc/httpd/conf/httpd.conf 
# Mod_cluster
LoadModule slotmem_module modules/mod_slotmem.so
LoadModule manager_module modules/mod_manager.so
LoadModule proxy_cluster_module modules/mod_proxy_cluster.so
LoadModule advertise_module modules/mod_advertise.so

Listen 192.168.56.151:6666

    
        Order deny,allow
        Allow from all
    
    
        SetHandler mod_cluster-manager
        Order deny,allow
        Allow from all
    
          KeepAliveTimeout 60
          MaxKeepAliveRequests 0
          AdvertiseFrequency 5
          ManagerBalancerName jbosscluster
          ServerAdvertise On
          EnableMCPMReceive On
          AllowDisplay On
          ProxyPass / balancer://jbosscluster/

[root@webserver conf]# 

二、Jboss服务器端
通用部分。
该部分为在各个节点上都一致的配置,包括:
JDK 1.7和WildFly 8.1.1 Final的安装

JDK 1.7
Java的安装需要预配置好YUM,通过YUM指令安装。
指令:yum install -y java-1.7.0-openjdk.x86_64

[root@jboss1 ~]# yum list | grep java | grep open
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
java-1.7.0-openjdk.x86_64              1:1.7.0.45-2.4.3.3.el6               @ISO
java-1.6.0-openjdk.x86_64              1:1.6.0.0-1.66.1.13.0.el6            ISO 
java-1.6.0-openjdk-devel.x86_64        1:1.6.0.0-1.66.1.13.0.el6            ISO 
java-1.6.0-openjdk-javadoc.x86_64      1:1.6.0.0-1.66.1.13.0.el6            ISO 
java-1.7.0-openjdk-devel.x86_64        1:1.7.0.45-2.4.3.3.el6               ISO 
java-1.7.0-openjdk-javadoc.noarch      1:1.7.0.45-2.4.3.3.el6               ISO 
[root@jboss1 ~]# rpm -qa | grep java | grep 1.7
java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
[root@jboss1 ~]# 
[root@jboss1 ~]# java -version
java version "1.7.0_45"
OpenJDK Runtime Environment (rhel-2.4.3.3.el6-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
[root@jboss1 ~]# 

Wildfly 8.1.0 Final
安装介质的下载地址:http://download.jboss.org/wildfly/8.1.0.Final/wildfly-8.1.0.Final.zip

[root@jboss1 software]# pwd
/software
[root@jboss1 software]# ll
total 257056
drwxr-xr-x 10 root root      4096 Mar 10  2012 jboss-as-7.1.1.Final
-rw-r--r--  1 root root 133255203 Aug 21 06:11 jboss-as-7.1.1.Final.zip
-rw-r--r--  1 root root    172415 Aug 21 06:11 mod_cluster-1.2.6.Final-linux2-x64-so.tar.gz
drwxr-xr-x 10 root root      4096 May 30 21:54 wildfly-8.1.0.Final
-rw-r--r--  1 root root 129777493 Aug 23 08:29 wildfly-8.1.0.Final.zip
[root@jboss1 software]# du -sh *
159M    jboss-as-7.1.1.Final
128M    jboss-as-7.1.1.Final.zip
172K    mod_cluster-1.2.6.Final-linux2-x64-so.tar.gz
135M    wildfly-8.1.0.Final
124M    wildfly-8.1.0.Final.zip
[root@jboss1 software]# 

如上所示,下载完成后,上传服务器,并解压。
解压指令:unzip wildfly-8.1.0.Final.zip

创建Wildfly软件目录,并将解压后的介质Copy进去:

[root@jboss1 software]# mkdir /wildfly
[root@jboss1 software]#
[root@jboss1 software]# ll /wildfly/
total 0
[root@jboss1 software]# cp -r wildfly-8.1.0.Final/* /wildfly/
[root@jboss1 software]#
[root@jboss1 software]# ll /wildfly/
total 412
drwxr-xr-x 3 root root   4096 Aug 23 08:31 appclient
drwxr-xr-x 5 root root   4096 Aug 23 08:31 bin
-rw-r--r-- 1 root root   2451 Aug 23 08:31 copyright.txt
drwxr-xr-x 4 root root   4096 Aug 23 08:31 docs
drwxr-xr-x 5 root root   4096 Aug 23 08:31 domain
-rw-r--r-- 1 root root 354682 Aug 23 08:31 jboss-modules.jar
-rw-r--r-- 1 root root  26530 Aug 23 08:31 LICENSE.txt
drwxr-xr-x 3 root root   4096 Aug 23 08:31 modules
-rw-r--r-- 1 root root   2356 Aug 23 08:31 README.txt
drwxr-xr-x 6 root root   4096 Aug 23 08:31 standalone
drwxr-xr-x 2 root root   4096 Aug 23 08:31 welcome-content
[root@jboss1 software]# 

至此,通用部分完成。
接下来的配置根据不同的节点而不同。

节点部分。
由于这里使用的是群集的方式组织两台JBOSS服务器,所以主要的配置都会在目录“/wildfly/domain/configuration”中完成。
主要操作的是其中的两个文件:
domain.xml
host.xml

这两个文件在各个节点中的分布如下:
主节点:domain.xml、host.xml
辅助节点:host.xml
(在本环境中,主节点为节点一,辅助节点为节点二。)

节点一
1.添加管理用户
admin
jboss2

[root@jboss1 wildfly]# pwd
/wildfly
[root@jboss1 wildfly]# bin/add-user.sh 

What type of user do you wish to add? 
 a) Management User (mgmt-users.properties) 
 b) Application User (application-users.properties)
(a): 

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : admin
The username 'admin' is easy to guess
Are you sure you want to add user 'admin' yes/no? yes
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - The password should not be one of the following restricted values {root, admin, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
 - The password should be different from the username
Password : 
JBAS015269: Password must have at least 8 characters!
Are you sure you want to use the password entered yes/no? yes
Re-enter Password : 
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]: 
About to add user 'admin' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'admin' to file '/wildfly/standalone/configuration/mgmt-users.properties'
Added user 'admin' to file '/wildfly/domain/configuration/mgmt-users.properties'
Added user 'admin' with groups  to file '/wildfly/standalone/configuration/mgmt-groups.properties'
Added user 'admin' with groups  to file '/wildfly/domain/configuration/mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process? 
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition 
[root@jboss1 wildfly]# 
[root@jboss1 wildfly]# bin/add-user.sh 

What type of user do you wish to add? 
 a) Management User (mgmt-users.properties) 
 b) Application User (application-users.properties)
(a): 

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : jboss2
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - The password should not be one of the following restricted values {root, admin, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
 - The password should be different from the username
Password : 
JBAS015269: Password must have at least 8 characters!
Are you sure you want to use the password entered yes/no? yes
Re-enter Password : 
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]: 
About to add user 'jboss2' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'jboss2' to file '/wildfly/standalone/configuration/mgmt-users.properties'
Added user 'jboss2' to file '/wildfly/domain/configuration/mgmt-users.properties'
Added user 'jboss2' with groups  to file '/wildfly/standalone/configuration/mgmt-groups.properties'
Added user 'jboss2' with groups  to file '/wildfly/domain/configuration/mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process? 
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition 
[root@jboss1 wildfly]# 
[root@jboss1 wildfly]# 
[root@jboss1 wildfly]# cat /wildfly/domain/configuration/mgmt-groups.properties
#
# Properties declaration of users groups for the realm 'ManagementRealm'.
#
# This is used for domain management, users groups membership information is used to assign the user
# specific management roles.
#
# Users can be added to this properties file at any time, updates after the server has started
# will be automatically detected.
#
# The format of this file is as follows: -
#
# A utility script is provided which can be executed from the bin folder to add the users: -
# - Linux
#  bin/add-user.sh
#
# - Windows
#  bin\add-user.bat
#
# The following illustrates how an admin user could be defined.
#
admin=
jboss2=
[root@jboss1 wildfly]# 

2.对domain.xml文件的修改
a. ServerGroups
修改前:

    
        
            
                
            
            
        
        
            
                
            
            
        
    

修改后:

    
        
          
            
          
          
        
    

b. modcluster (位于“”中)
修改前:

            
                
                    
                        
                    
                
            

修改后:

            
                
                    
                        
                    
                
            

3.对文件host.xml的修改
a. Host Name
修改前:


修改后:


b. Interfaces
修改前:

    
        
            
        
        
           
        
        
            
            
        
    

修改后:

    
        
            
        
        
           
        
        
            
            
        
    

c. Servers
修改前:

    
        
            
        
        
            
            
        
        
            
            
        
    

修改后:

    
     
     
     
          
     
    

至此,节点一配置完成。

节点二。
1.对domain.xml文件的修改
a. remove domain.xml

[root@jboss2 configuration]# pwd
/wildfly/domain/configuration
[root@jboss2 configuration]# ls | grep domain.xml
domain.xml
[root@jboss2 configuration]# mv domain.xml domain.xml.orig
[root@jboss2 configuration]# ls | grep domain.xml
domain.xml.orig
[root@jboss2 configuration]#

2.对host.xml文件的修改
a. Host name
修改前:


修改后:


b. Server Identities
修改前:

    
        
            
                
                    
                    
                
                
                    
                
            

修改后:

    
        
            
                
                   
                
                
                    
                    
                
                
                    
                
            

c. Domain Controller
修改前:

    
       
       
       
    

修改后:

    
      
    

d. Interfaces
修改前:

    
        
            
        
        
           
        
        
            
            
        
    

修改后:

    
        
            
        
        
           
        
        
            
            
        
    

e. Servers
修改前:

    
        
            
        
        
            
            
        
        
            
            
        
    

修改后:

    
     
     
     
         
                              
    

三、启动JBOSS
指令:/wildfly/bin/domain.sh
节点一:

[root@jboss1 ~]# /wildfly/bin/domain.sh 
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /wildfly

  JAVA: java

  JAVA_OPTS: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

=========================================================================

09:13:25,368 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
09:13:25,753 INFO  [org.jboss.as.process.Host Controller.status] (main) JBAS012017: Starting process 'Host Controller'
[Host Controller] 09:13:27,275 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
[Host Controller] 09:13:27,741 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
[Host Controller] 09:13:27,875 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015899: WildFly 8.1.0.Final "Kenny" starting
[Host Controller] 09:13:29,227 INFO  [org.jboss.as] (Controller Boot Thread) JBAS010902: Creating http management service using network interface (management) port (9990) securePort (-1)
[Host Controller] 09:13:29,223 INFO  [org.xnio] (MSC service thread 1-1) XNIO version 3.2.2.Final
[Host Controller] 09:13:29,253 INFO  [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.2.2.Final
[Host Controller] 09:13:29,392 INFO  [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 4.0.3.Final
[Host Controller] 09:13:29,433 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on 192.168.56.131:9999
[Host Controller] 09:13:32,395 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010922: Starting server server1
09:13:32,450 INFO  [org.jboss.as.process.Server:server1.status] (ProcessController-threads - 3) JBAS012017: Starting process 'Server:server1'
[Server:server1] 09:13:34,495 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
[Server:server1] 09:13:35,401 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
[Server:server1] 09:13:35,586 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015899: WildFly 8.1.0.Final "Kenny" starting
[Server:server1] 09:13:35,879 INFO  [org.xnio] (MSC service thread 1-2) XNIO version 3.2.2.Final
[Server:server1] 09:13:35,886 INFO  [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.2.2.Final
[Server:server1] 09:13:35,949 INFO  [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 4.0.3.Final
[Host Controller] 09:13:37,816 INFO  [org.jboss.as.domain.controller.mgmt] (Remoting "jboss1:MANAGEMENT" task-4) JBAS010920: Server [Server:server1] connected using connection [Channel ID 6b026d74 (inbound) of Remoting connection 308151e7 to /192.168.56.131:34461]
[Host Controller] 09:13:37,904 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010922: Starting server server2
09:13:37,953 INFO  [org.jboss.as.process.Server:server2.status] (ProcessController-threads - 3) JBAS012017: Starting process 'Server:server2'
[Host Controller] 09:13:38,080 INFO  [org.jboss.as.host.controller] (server-registration-threads - 1) JBAS010919: Registering server server1
[Server:server2] 09:13:41,721 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
[Server:server2] 09:13:42,828 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
[Server:server2] 09:13:44,427 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015899: WildFly 8.1.0.Final "Kenny" starting
[Server:server2] 09:13:44,833 INFO  [org.xnio] (MSC service thread 1-1) XNIO version 3.2.2.Final
[Server:server2] 09:13:44,876 INFO  [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.2.2.Final
[Server:server1] 09:13:45,049 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 30) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
[Server:server1] 09:13:45,050 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 31) JBAS013171: Activating Security Subsystem
[Server:server1] 09:13:45,098 INFO  [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 42) JBAS010260: Activating JGroups subsystem.
[Server:server1] 09:13:45,116 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 36) JBAS011800: Activating Naming Subsystem
[Server:server1] 09:13:45,154 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 46) JBAS010280: Activating Infinispan subsystem.
[Server:server1] 09:13:45,177 INFO  [org.jboss.as.security] (MSC service thread 1-1) JBAS013170: Current PicketBox version=4.0.21.Beta1
[Server:server1] 09:13:45,199 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 28) JBAS015537: Activating WebServices Extension
[Server:server1] 09:13:45,216 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 47) WFLYIO001: Worker 'default' has auto-configured to 2 core threads with 16 task threads based on your 1 available processors
[Server:server1] 09:13:45,243 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 39) JBAS012615: Activated the following JSF Implementations: [main]
[Server:server1] 09:13:45,248 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 50) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
[Server:server2] 09:13:45,350 INFO  [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 4.0.3.Final
[Server:server1] 09:13:45,673 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 29) JBAS017502: Undertow 1.0.15.Final starting
[Server:server1] 09:13:45,832 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017502: Undertow 1.0.15.Final starting
[Server:server1] 09:13:45,989 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.5.Final)
[Server:server1] 09:13:46,012 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 29) JBAS017527: Creating file handler for path /wildfly/welcome-content
[Server:server1] 09:13:46,823 INFO  [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service
[Server:server1] 09:13:46,824 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) JBAS010417: Started Driver service with driver-name = h2
[Server:server1] 09:13:46,826 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]
[Server:server1] 09:13:47,154 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017525: Started server default-server.
[Server:server1] 09:13:47,301 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017519: Undertow AJP listener ajp listening on /192.168.56.131:8009
[Server:server1] 09:13:47,330 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017531: Host default-host starting
[Server:server1] 09:13:47,574 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017519: Undertow HTTP listener default listening on /192.168.56.131:8080
[Server:server1] 09:13:47,644 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 52) MODCLUSTER000001: Initializing mod_cluster version 1.3.0.Final
[Server:server1] 09:13:47,800 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 52) MODCLUSTER000032: Listening to proxy advertisements on /224.0.1.105:23364
[Server:server1] 09:13:50,917 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
[Host Controller] 09:13:51,287 INFO  [org.jboss.as.domain.controller.mgmt] (Remoting "jboss1:MANAGEMENT" task-8) JBAS010920: Server [Server:server2] connected using connection [Channel ID 282e7c65 (inbound) of Remoting connection 56564a1f to /192.168.56.131:35850]
[Host Controller] 09:13:51,543 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://192.168.56.131:9990/management
[Host Controller] 09:13:51,543 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://192.168.56.131:9990
[Host Controller] 09:13:51,544 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.1.0.Final "Kenny" (Host Controller) started in 25549ms - Started 44 of 46 services (13 services are lazy, passive or on-demand)
[Host Controller] 09:13:51,670 INFO  [org.jboss.as.host.controller] (server-registration-threads - 1) JBAS010919: Registering server server2
[Server:server1] 09:13:52,746 INFO  [org.jboss.ws.common.management] (MSC service thread 1-1) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.4.Final
[Server:server1] 09:13:52,905 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.1.0.Final "Kenny" started in 19679ms - Started 187 of 316 services (161 services are lazy, passive or on-demand)
[Server:server2] 09:13:54,100 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 30) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
[Server:server2] 09:13:54,106 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 31) JBAS013171: Activating Security Subsystem
[Server:server2] 09:13:54,180 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013170: Current PicketBox version=4.0.21.Beta1
[Server:server2] 09:13:54,187 INFO  [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 42) JBAS010260: Activating JGroups subsystem.
[Server:server2] 09:13:54,205 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 47) WFLYIO001: Worker 'default' has auto-configured to 2 core threads with 16 task threads based on your 1 available processors
[Server:server2] 09:13:54,197 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 50) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
[Server:server2] 09:13:54,230 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 28) JBAS015537: Activating WebServices Extension
[Server:server2] 09:13:54,226 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017502: Undertow 1.0.15.Final starting
[Server:server2] 09:13:54,225 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 36) JBAS011800: Activating Naming Subsystem
[Server:server2] 09:13:54,223 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 46) JBAS010280: Activating Infinispan subsystem.
[Server:server2] 09:13:54,228 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 29) JBAS017502: Undertow 1.0.15.Final starting
[Server:server2] 09:13:54,269 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 39) JBAS012615: Activated the following JSF Implementations: [main]
[Server:server2] 09:13:54,401 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 29) JBAS017527: Creating file handler for path /wildfly/welcome-content
[Server:server2] 09:13:54,573 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.5.Final)
[Server:server2] 09:13:54,677 INFO  [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service
[Server:server2] 09:13:54,698 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]
[Server:server2] 09:13:54,816 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010417: Started Driver service with driver-name = h2
[Server:server2] 09:13:55,273 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017525: Started server default-server.
[Server:server2] 09:13:55,518 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017519: Undertow HTTP listener default listening on /192.168.56.131:8090
[Server:server2] 09:13:55,539 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017519: Undertow AJP listener ajp listening on /192.168.56.131:8019
[Server:server2] 09:13:55,576 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017531: Host default-host starting
[Server:server2] 09:13:55,610 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 52) MODCLUSTER000001: Initializing mod_cluster version 1.3.0.Final
[Server:server2] 09:13:55,735 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 52) MODCLUSTER000032: Listening to proxy advertisements on /224.0.1.105:23364
[Server:server2] 09:13:56,506 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
[Server:server2] 09:13:57,926 INFO  [org.jboss.ws.common.management] (MSC service thread 1-1) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.4.Final
[Server:server2] 09:13:57,999 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.1.0.Final "Kenny" started in 19199ms - Started 187 of 316 services (161 services are lazy, passive or on-demand)



[Host Controller] 09:14:18,202 INFO  [org.jboss.as.domain] (Host Controller Service Threads - 26) JBAS010918: Registered remote slave host "jboss2", WildFly 8.1.0.Final "Kenny"

节点二:

[root@jboss2 ~]# /wildfly/bin/domain.sh 
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /wildfly

  JAVA: java

  JAVA_OPTS: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

=========================================================================

09:14:14,304 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
09:14:14,474 INFO  [org.jboss.as.process.Host Controller.status] (main) JBAS012017: Starting process 'Host Controller'
[Host Controller] 09:14:15,150 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
[Host Controller] 09:14:15,315 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
[Host Controller] 09:14:15,400 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015899: WildFly 8.1.0.Final "Kenny" starting
[Host Controller] 09:14:16,165 INFO  [org.xnio] (MSC service thread 1-1) XNIO version 3.2.2.Final
[Host Controller] 09:14:16,175 INFO  [org.jboss.as] (Controller Boot Thread) JBAS010902: Creating http management service using network interface (management) port (9990) securePort (-1)
[Host Controller] 09:14:16,187 INFO  [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.2.2.Final
[Host Controller] 09:14:16,240 INFO  [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 4.0.3.Final
[Host Controller] 09:14:16,272 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on 192.168.56.132:9999
[Host Controller] 09:14:18,206 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) JBAS016582: Connected to master host controller at remote://192.168.56.131:9999
[Host Controller] 09:14:18,372 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010922: Starting server server1
09:14:18,469 INFO  [org.jboss.as.process.Server:server1.status] (ProcessController-threads - 3) JBAS012017: Starting process 'Server:server1'
[Server:server1] 09:14:19,166 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
[Server:server1] 09:14:19,539 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
[Server:server1] 09:14:19,628 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015899: WildFly 8.1.0.Final "Kenny" starting
[Server:server1] 09:14:19,827 INFO  [org.xnio] (MSC service thread 1-1) XNIO version 3.2.2.Final
[Server:server1] 09:14:19,843 INFO  [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.2.2.Final
[Server:server1] 09:14:19,887 INFO  [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 4.0.3.Final
[Host Controller] 09:14:20,964 INFO  [org.jboss.as.domain.controller.mgmt] (Remoting "jboss2:MANAGEMENT" task-11) JBAS010920: Server [Server:server1] connected using connection [Channel ID 0afbbe58 (inbound) of Remoting connection 35b51c18 to /192.168.56.132:50701]
[Host Controller] 09:14:21,028 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010922: Starting server server2
09:14:21,074 INFO  [org.jboss.as.process.Server:server2.status] (ProcessController-threads - 3) JBAS012017: Starting process 'Server:server2'
[Host Controller] 09:14:21,166 INFO  [org.jboss.as.host.controller] (server-registration-threads - 1) JBAS010919: Registering server server1
[Server:server2] 09:14:23,678 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
[Server:server1] 09:14:24,134 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 36) JBAS011800: Activating Naming Subsystem
[Server:server1] 09:14:24,182 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 46) JBAS010280: Activating Infinispan subsystem.
[Server:server1] 09:14:24,105 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 30) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
[Server:server1] 09:14:24,110 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 31) JBAS013171: Activating Security Subsystem
[Server:server1] 09:14:24,210 INFO  [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 42) JBAS010260: Activating JGroups subsystem.
[Server:server1] 09:14:24,230 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 28) JBAS015537: Activating WebServices Extension
[Server:server1] 09:14:24,225 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 39) JBAS012615: Activated the following JSF Implementations: [main]
[Server:server1] 09:14:24,277 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 47) WFLYIO001: Worker 'default' has auto-configured to 2 core threads with 16 task threads based on your 1 available processors
[Server:server1] 09:14:24,278 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 50) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
[Server:server1] 09:14:24,399 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service
[Server:server1] 09:14:24,493 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 29) JBAS017502: Undertow 1.0.15.Final starting
[Server:server1] 09:14:24,579 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013170: Current PicketBox version=4.0.21.Beta1
[Server:server1] 09:14:24,617 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017502: Undertow 1.0.15.Final starting
[Server:server1] 09:14:24,691 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.5.Final)
[Server:server1] 09:14:24,695 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]
[Server:server1] 09:14:24,699 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 29) JBAS017527: Creating file handler for path /wildfly/welcome-content
[Server:server1] 09:14:24,804 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010417: Started Driver service with driver-name = h2
[Server:server2] 09:14:25,363 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
[Server:server1] 09:14:25,380 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017525: Started server default-server.
[Server:server1] 09:14:25,630 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017519: Undertow HTTP listener default listening on /192.168.56.132:8080
[Server:server1] 09:14:25,666 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017531: Host default-host starting
[Server:server1] 09:14:25,700 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017519: Undertow AJP listener ajp listening on /192.168.56.132:8009
[Server:server1] 09:14:25,829 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 52) MODCLUSTER000001: Initializing mod_cluster version 1.3.0.Final
[Server:server1] 09:14:25,992 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 52) MODCLUSTER000032: Listening to proxy advertisements on /224.0.1.105:23364
[Server:server2] 09:14:26,317 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015899: WildFly 8.1.0.Final "Kenny" starting
[Server:server2] 09:14:27,234 INFO  [org.xnio] (MSC service thread 1-1) XNIO version 3.2.2.Final
[Server:server2] 09:14:27,373 INFO  [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.2.2.Final
[Server:server2] 09:14:27,482 INFO  [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 4.0.3.Final
[Server:server1] 09:14:30,114 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
[Host Controller] 09:14:32,260 INFO  [org.jboss.as.domain.controller.mgmt] (Remoting "jboss2:MANAGEMENT" task-15) JBAS010920: Server [Server:server2] connected using connection [Channel ID 2795e6fd (inbound) of Remoting connection 37060d80 to /192.168.56.132:34234]
[Host Controller] 09:14:32,450 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://192.168.56.132:9990/management
[Host Controller] 09:14:32,450 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015954: Admin console is not enabled
[Host Controller] 09:14:32,451 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.1.0.Final "Kenny" (Host Controller) started in 17908ms - Started 43 of 45 services (14 services are lazy, passive or on-demand)
[Server:server1] 09:14:32,532 INFO  [org.jboss.ws.common.management] (MSC service thread 1-1) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.4.Final
[Host Controller] 09:14:32,616 INFO  [org.jboss.as.host.controller] (server-registration-threads - 1) JBAS010919: Registering server server2
[Server:server1] 09:14:32,718 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.1.0.Final "Kenny" started in 14075ms - Started 188 of 317 services (162 services are lazy, passive or on-demand)
[Server:server2] 09:14:36,951 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 30) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
[Server:server2] 09:14:36,952 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 31) JBAS013171: Activating Security Subsystem
[Server:server2] 09:14:37,006 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 47) WFLYIO001: Worker 'default' has auto-configured to 2 core threads with 16 task threads based on your 1 available processors
[Server:server2] 09:14:36,989 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 50) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
[Server:server2] 09:14:37,007 INFO  [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 42) JBAS010260: Activating JGroups subsystem.
[Server:server2] 09:14:37,007 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013170: Current PicketBox version=4.0.21.Beta1
[Server:server2] 09:14:37,019 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 28) JBAS015537: Activating WebServices Extension
[Server:server2] 09:14:37,036 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 46) JBAS010280: Activating Infinispan subsystem.
[Server:server2] 09:14:37,027 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 36) JBAS011800: Activating Naming Subsystem
[Server:server2] 09:14:37,023 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017502: Undertow 1.0.15.Final starting
[Server:server2] 09:14:37,034 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 29) JBAS017502: Undertow 1.0.15.Final starting
[Server:server2] 09:14:37,560 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 39) JBAS012615: Activated the following JSF Implementations: [main]
[Server:server2] 09:14:37,787 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 29) JBAS017527: Creating file handler for path /wildfly/welcome-content
[Server:server2] 09:14:37,820 INFO  [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service
[Server:server2] 09:14:37,854 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-1) JBAS015400: Bound mail session [java:jboss/mail/Default]
[Server:server2] 09:14:37,984 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.5.Final)
[Server:server2] 09:14:38,476 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010417: Started Driver service with driver-name = h2
[Server:server2] 09:14:38,655 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017525: Started server default-server.
[Server:server2] 09:14:38,674 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017531: Host default-host starting
[Server:server2] 09:14:38,869 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017519: Undertow AJP listener ajp listening on /192.168.56.132:8019
[Server:server2] 09:14:38,955 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017519: Undertow HTTP listener default listening on /192.168.56.132:8090
[Server:server2] 09:14:39,017 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 52) MODCLUSTER000001: Initializing mod_cluster version 1.3.0.Final
[Server:server2] 09:14:39,114 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 52) MODCLUSTER000032: Listening to proxy advertisements on /224.0.1.105:23364
[Server:server2] 09:14:39,926 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
[Server:server2] 09:14:41,352 INFO  [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.4.Final
[Server:server2] 09:14:41,460 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.1.0.Final "Kenny" started in 20108ms - Started 188 of 317 services (162 services are lazy, passive or on-demand)

四、浏览器访问
mod_cluster运行状态:http://192.168.56.131:9990/console/App.html#topology
mod_cluster_init_status
wildfly应用:
http://192.168.56.131:8080/
http://192.168.56.132:8080/
wildfly_8080
wildfly后台:
http://192.168.56.131:9990/
http://192.168.56.132:9990/
wildfly_management_1
wildfly_management_2
wildfly_management_3

五、部署应用

1.通过JBOSS管理后台部署应用
首先,需要有*.war的应用包,如下:
Deployment_Helloworld_1

浏览器访问:http://192.168.56.131:9990
Deployment_Helloworld_1

Deployment_Helloworld_2

Deployment_Helloworld_3

Deployment_Helloworld_4

Deployment_Helloworld_5

Deployment_Helloworld_6

Deployment_Helloworld_7

Deployment_Helloworld_8

Deployment_Helloworld_9

Deployment_Helloworld_10

六、查看应用
Helloworld_view_1

Helloworld_view_2_Node1

Helloworld_view_3_Node2

Helloworld_view_4_WebServer

部署应用时,日志文件中生成的记录:

[Host Controller] 19:03:09,573 INFO  [org.jboss.as.repository] (XNIO-1 task-10) JBAS014900: Content added at location /wildfly/domain/data/content/32/efcb0f0c28e641fbb16cfcaa1d96619f48c78b/content
[Server:server2] 19:04:53,220 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "Helloworld.war" (runtime-name: "Helloworld.war")
[Server:server1] 19:04:53,222 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "Helloworld.war" (runtime-name: "Helloworld.war")
[Server:server1] 19:04:55,967 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017534: Registered web context: /Helloworld
[Server:server2] 19:04:56,288 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017534: Registered web context: /Helloworld
[Server:server1] 19:04:56,379 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 55) JBAS018559: Deployed "Helloworld.war" (runtime-name : "Helloworld.war")
[Server:server2] 19:04:56,382 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 55) JBAS018559: Deployed "Helloworld.war" (runtime-name : "Helloworld.war")
[Server:server1] 19:09:18,817 INFO  [stdout] (default task-6) Hello JBoss.

至此,JBoss集群的配置完成。
—— —— ——
(To be Continue.)

说点什么

avatar

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

  Subscribe  
提醒