在同一台机器上启动两个及两个以上的jboss建立集群环境,需要修改一下文件及端口号
首先,使用启动jboss的all服务,然后使用netstat -a -o -n >>d:\port.txt命令将jboss使用的端口收集到port.txt文件中,然后根据jboss的端口号一个个的查询配置文件,修改其配置。
需要更改的文件有
-------1098端口---------------
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-minimal.xml' :
%JBOSS_HOME%\server\all\conf\jboss-minimal.xml(82): <attribute name="RmiPort">1098</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-service.xml' :
%JBOSS_HOME%\server\all\conf\jboss-service.xml(257): <attribute name="RmiPort">1098</attribute>
-------1099端口---------------
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-minimal.xml' :
%JBOSS_HOME%\server\all\conf\jboss-minimal.xml(76): <attribute name="Port">1099</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-service.xml' :
%JBOSS_HOME%\server\all\conf\jboss-service.xml(251): <attribute name="Port">1099</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\deploy\cache-invalidation-service.xml' :
%JBOSS_HOME%\server\all\deploy\cache-invalidation-service.xml(27): <attribute name="ProviderUrl">MyOtherNode:1099</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\deploy\jmx-console.war\cluster\bootstrap.html' :
%JBOSS_HOME%\server\all\deploy\jmx-console.war\cluster\bootstrap.html(58): <td>Port:</td><td><input type="text" name="port" value="1099" size="40"></td>
-------1100端口---------------
----------------------------------------
%JBOSS_HOME%\server\all\deploy\cluster-service.xml' :
%JBOSS_HOME%\server\all\deploy\cluster-service.xml(157): <attribute name="Port">1100</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\deploy\jms\hajndi-jms-ds.xml' :
%JBOSS_HOME%\server\all\deploy\jms\hajndi-jms-ds.xml(26): java.naming.provider.url=${jboss.bind.address:localhost}:1100
-------1101端口------------------
----------------------------------------
%JBOSS_HOME%\server\all\deploy\cluster-service.xml' :
%JBOSS_HOME%\server\all\deploy\cluster-service.xml(159): <attribute name="RmiPort">1101</attribute>
--------3528端口-----------------
----------------------------------------
%JBOSS_HOME%\server\all\conf\jacorb.properties' :
%JBOSS_HOME%\server\all\conf\jacorb.properties(41): ORBInitRef.NameService=corbaloc::localhost:3528/JBoss/Naming/root
%JBOSS_HOME%\server\all\conf\jacorb.properties(327): OAPort=3528
----------------------------------------
%JBOSS_HOME%\server\all\conf\jacorb.properties' :
%JBOSS_HOME%\server\all\conf\jacorb.properties(41): ORBInitRef.NameService=corbaloc::localhost:3528/JBoss/Naming/root
%JBOSS_HOME%\server\all\conf\jacorb.properties(327): OAPort=3528
--------4444端口-----------------
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-service.xml' :
%JBOSS_HOME%\server\all\conf\jboss-service.xml(426): <attribute name="RMIObjectPort">4444</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-service.xml' :
%JBOSS_HOME%\server\all\conf\jboss-service.xml(426): <attribute name="RMIObjectPort">4444</attribute>
--------4445端口------------------
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-service.xml' :
%JBOSS_HOME%\server\all\conf\jboss-service.xml(450): <attribute name="ServerBindPort">4445</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-service.xml' :
%JBOSS_HOME%\server\all\conf\jboss-service.xml(450): <attribute name="ServerBindPort">4445</attribute>
---------4446端口-------------------
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-service.xml' :
%JBOSS_HOME%\server\all\conf\jboss-service.xml(491): <!-- <attribute name="InvokerLocator"><![CDATA[socket://${jboss.bind.address}:4446/?datatype=invocation]]></attribute> -->
%JBOSS_HOME%\server\all\conf\jboss-service.xml(510): <attribute name="serverBindPort">4446</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-service.xml' :
%JBOSS_HOME%\server\all\conf\jboss-service.xml(491): <!-- <attribute name="InvokerLocator"><![CDATA[socket://${jboss.bind.address}:4446/?datatype=invocation]]></attribute> -->
%JBOSS_HOME%\server\all\conf\jboss-service.xml(510): <attribute name="serverBindPort">4446</attribute>
--------4447端口----------------
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-service.xml' :
%JBOSS_HOME%\server\all\conf\jboss-service.xml(503): <!-- <attribute name="loaderport" isParam="true">4447</attribute> -->
----------------------------------------
%JBOSS_HOME%\server\all\deploy\cluster-service.xml' :
%JBOSS_HOME%\server\all\deploy\cluster-service.xml(205): <attribute name="RMIObjectPort">4447</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-service.xml' :
%JBOSS_HOME%\server\all\conf\jboss-service.xml(503): <!-- <attribute name="loaderport" isParam="true">4447</attribute> -->
----------------------------------------
%JBOSS_HOME%\server\all\deploy\cluster-service.xml' :
%JBOSS_HOME%\server\all\deploy\cluster-service.xml(205): <attribute name="RMIObjectPort">4447</attribute>
----------4448端口-------------
----------------------------------------
%JBOSS_HOME%\server\all\deploy\cluster-service.xml' :
%JBOSS_HOME%\server\all\deploy\cluster-service.xml(221): <attribute name="ServerBindPort">4448</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\deploy\cluster-service.xml' :
%JBOSS_HOME%\server\all\deploy\cluster-service.xml(221): <attribute name="ServerBindPort">4448</attribute>
----------8009端口--------------
----------------------------------------
%JBOSS_HOME%\server\all\deploy\jboss-web.deployer\server.xml' :
%JBOSS_HOME%\server\all\deploy\jboss-web.deployer\server.xml(38): <!-- Define an AJP 1.3 Connector on port 8009 -->
%JBOSS_HOME%\server\all\deploy\jboss-web.deployer\server.xml(39): <Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3"
----------------------------------------
%JBOSS_HOME%\server\all\deploy\jboss-web.deployer\server.xml' :
%JBOSS_HOME%\server\all\deploy\jboss-web.deployer\server.xml(38): <!-- Define an AJP 1.3 Connector on port 8009 -->
%JBOSS_HOME%\server\all\deploy\jboss-web.deployer\server.xml(39): <Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3"
-------------8080端口---------------
----------------------------------------
%JBOSS_HOME%\server\all\deploy\httpha-invoker.sar\META-INF\jboss-service.xml' :
%JBOSS_HOME%\server\all\deploy\httpha-invoker.sar\META-INF\jboss-service.xml(11): <!-- Use a URL of the form http://<hostname>:8080/invoker/EJBInvokerServlet
%JBOSS_HOME%\server\all\deploy\httpha-invoker.sar\META-INF\jboss-service.xml(16): <attribute name="InvokerURLSuffix">:8080/invoker/EJBInvokerServlet</attribute>
%JBOSS_HOME%\server\all\deploy\httpha-invoker.sar\META-INF\jboss-service.xml(22): <!-- Use a URL of the form http://<hostname>:8080/invoker/EJBInvokerHAServlet
%JBOSS_HOME%\server\all\deploy\httpha-invoker.sar\META-INF\jboss-service.xml(27): <attribute name="InvokerURLSuffix">:8080/invoker/EJBInvokerHAServlet</attribute>
%JBOSS_HOME%\server\all\deploy\httpha-invoker.sar\META-INF\jboss-service.xml(38): <attribute name="InvokerURLSuffix">:8080/invoker/JMXInvokerServlet</attribute>
%JBOSS_HOME%\server\all\deploy\httpha-invoker.sar\META-INF\jboss-service.xml(59): <attribute name="InvokerURLSuffix">:8080/invoker/readonly/JMXInvokerServlet</attribute>
%JBOSS_HOME%\server\all\deploy\httpha-invoker.sar\META-INF\jboss-service.xml(80): <attribute name="InvokerURLSuffix">:8080/invoker/JMXInvokerHAServlet</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\deploy\jboss-web.deployer\server.xml' :
%JBOSS_HOME%\server\all\deploy\jboss-web.deployer\server.xml(20): Define a non-SSL HTTP/1.1 Connector on port 8080
%JBOSS_HOME%\server\all\deploy\jboss-web.deployer\server.xml(22): <Connector port="8080" address="${jboss.bind.address}"
----------------------------------------
%JBOSS_HOME%\server\all\deploy\jbossws.sar\jbossws.beans\META-INF\jboss-beans.xml' :
%JBOSS_HOME%\server\all\deploy\jbossws.sar\jbossws.beans\META-INF\jboss-beans.xml(25): <property name="webServicePort">8080</property>
----------------------------------------
%JBOSS_HOME%\server\all\deploy\jmx-console.war\cluster\clusterView.jsp' :
%JBOSS_HOME%\server\all\deploy\jmx-console.war\cluster\clusterView.jsp(33): String hostURL = "http://"+host+":8080/jmx-console//HtmlAdaptor?action=displayMBeans";
----------------------------------------
%JBOSS_HOME%\server\all\deploy\juddi-service.sar\juddi.war\WEB-INF\juddi.properties' :
%JBOSS_HOME%\server\all\deploy\juddi-service.sar\juddi.war\WEB-INF\juddi.properties(42): juddi.proxy.adminURL = http://localhost:8080/juddi/admin
%JBOSS_HOME%\server\all\deploy\juddi-service.sar\juddi.war\WEB-INF\juddi.properties(43): juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
%JBOSS_HOME%\server\all\deploy\juddi-service.sar\juddi.war\WEB-INF\juddi.properties(44): juddi.proxy.publishURL = http://localhost:8080/juddi/publish
----------------------------------------
%JBOSS_HOME%\server\all\deploy\management\console-mgr.sar\web-console.war\WEB-INF\classes\Classloaders.bsh' :
%JBOSS_HOME%\server\all\deploy\management\console-mgr.sar\web-console.war\WEB-INF\classes\Classloaders.bsh(71): "http://localhost:8080/web-console/arrow.gif", // Icon URL
----------------------------------------
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\attributes.mib' :
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\attributes.mib(63): requestCount8080 OBJECT-TYPE
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\attributes.mib(68): "Number of requests served on port 8080"
----------------------------------------
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\attributes.xml' :
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\attributes.xml(26): <mbean name="jboss.web:name=http-0.0.0.0-8080,type=GlobalRequestProcessor">
----------8083端口-------------------
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-service.xml' :
%JBOSS_HOME%\server\all\conf\jboss-service.xml(210): <attribute name="Port">8083</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\conf\jboss-service.xml' :
%JBOSS_HOME%\server\all\conf\jboss-service.xml(210): <attribute name="Port">8083</attribute>
----------8093端口-------------------
----------------------------------------
%JBOSS_HOME%\server\all\deploy-hasingleton\jms\uil2-service.xml' :
%JBOSS_HOME%\server\all\deploy-hasingleton\jms\uil2-service.xml(22): <attribute name="ServerBindPort">8093</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\deploy-hasingleton\jms\uil2-service.xml' :
%JBOSS_HOME%\server\all\deploy-hasingleton\jms\uil2-service.xml(22): <attribute name="ServerBindPort">8093</attribute>
---------3528端口------------
----------------------------------------
%JBOSS_HOME%\server\all\conf\jacorb.properties' :
%JBOSS_HOME%\server\all\conf\jacorb.properties(41): ORBInitRef.NameService=corbaloc::localhost:3528/JBoss/Naming/root
%JBOSS_HOME%\server\all\conf\jacorb.properties(327): OAPort=3528
---------3873端口-------------
----------------------------------------
%JBOSS_HOME%\server\all\deploy\ejb3.deployer\META-INF\jboss-service.xml' :
%JBOSS_HOME%\server\all\deploy\ejb3.deployer\META-INF\jboss-service.xml(12): <attribute name="InvokerLocator">socket://${jboss.bind.address}:3873</attribute>
%JBOSS_HOME%\server\all\deploy\ejb3.deployer\META-INF\jboss-service.xml(32): <attribute name="serverBindPort">3873</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\deploy\ejb3.deployer\META-INF\jboss-service.xml' :
%JBOSS_HOME%\server\all\deploy\ejb3.deployer\META-INF\jboss-service.xml(12): <attribute name="InvokerLocator">socket://${jboss.bind.address}:3873</attribute>
%JBOSS_HOME%\server\all\deploy\ejb3.deployer\META-INF\jboss-service.xml(32): <attribute name="serverBindPort">3873</attribute>
----------------------------------------
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\META-INF\jboss-service.xml' :
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\META-INF\jboss-service.xml(80): name="jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor">
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\META-INF\jboss-service.xml(95): <mbean name="jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor">
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\META-INF\jboss-service.xml(130): jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor
--------1161端口------------
----------------------------------------
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\META-INF\jboss-service.xml' :
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\META-INF\jboss-service.xml(88): <attribute name="Port">1161</attribute>
-----------1162端口------------
----------------------------------------
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\managers.xml' :
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\managers.xml(31): <port>1162</port>
----------------------------------------
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\META-INF\jboss-service.xml' :
%JBOSS_HOME%\server\all\deploy\snmp-adaptor.sar\META-INF\jboss-service.xml(75): <attribute name="Port">1162</attribute>