當在同一台機器上運行兩個JBOSS執行個體的時候,需要修改哪些設定檔 資訊來源:http://gocom.primeton.com/module ... cle.php?storyid=398當在同一台機器上運行兩個JBOSS執行個體的時候,需要修改哪些設定檔 注:同樣適用於在一台伺服器上運行兩個JBOSS 【適用範圍】 EOS5.0及以上版本 for JBoss 【問題描述和定位】 如果一台機器運行兩個EOS for JBoss執行個體時,因為都使用了相同的連接埠,當啟動了一個執行個體後,再啟動另外一個執行個體時,就會報連接埠已被佔用的異常。 【解決方案和步驟】 通過修改JBoss和EOS的連接埠配置可以解決連接埠佔用的問題。 1、修改jboss-3.2.5\server\default\conf\jboss-service.xml中的1098,1099,4444,4445,8083連接埠。連接埠配置在設定檔中位置如下: ... <mbean code="org.jboss.web.WebService" name="jboss:service=WebService"> <attribute name="Port">8083</attribute> ... <mbean code="org.jboss.naming.NamingService" name="jboss:service=Naming"> ... <attribute name="Port">1099</attribute> ... <attribute name="RmiPort">1098</attribute> ... <mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker" name="jboss:service=invoker,type=jrmp"> <attribute name="RMIObjectPort">4444</attribute> ... <mbean code="org.jboss.invocation.pooled.server.PooledInvoker" name="jboss:service=invoker,type=pooled"> ... <attribute name="ServerBindPort">4445</attribute> ... 2、jboss-3.2.5\server\default\conf\jboss-minimal.xml中的1099連接埠,注意要改成跟jboss-service.xml中的1099一樣的。連接埠配置在設定檔中位置如下: ... <mbean code="org.jboss.naming.NamingService" name="jboss:service=Naming"> ... <attribute name="Port">1099</attribute> </mbean> ... 3、jboss-3.2.5\server\default\deploy\jbossweb-tomcat50.sar\server.xml中8080,8081連接埠。連接埠配置在設定檔中位置如下: ... <Service name="jboss.web" className="org.jboss.web.tomcat.tc5.StandardService"> <!-- A HTTP/1.1 Connector on port 8080 --> <Connector port="8080" address="${jboss.bind.address}" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="GBK"/> ... <Connector URIEncoding="GBK" enableLookups="true" keystoreFile="keystore" port="8081" redirectPort="8443" scheme="https" secure="true" sslProtocol="TLS"/> ... 3、jboss-3.2.5\server\default\deploy\jms\uil2-service.xml中的8093連接埠。連接埠配置在設定檔中位置如下: ... <attribute name="ServerBindPort">8093</attribute> ... 4、eosserver\config\eosconfig.xml中的1099,30614連接埠,注意1099連接埠要改成跟jboss-service.xml中的1099連接埠一樣的。連接埠配置在設定檔中位置如下: ... <group name="DBConnect"> <configValue key="dbType">sqlserver2000</configValue> <configValue key="context-initial-factory">org.jnp.interfaces.NamingContextFactory</configValue> <configValue key="dbprovider">jnp://localhost:1099</configValue> ... <module name="cluster"> <group name="config"> <configValue key="nodeList">127.0.0.1</configValue> <configValue key="remoteCallerPort">30614</configValue> </group> </module> ... 【備忘】 1、在同一台機器上做JBoss的負載平衡時,修改設定檔不能參照此文檔。 2、當JBoss的1099連接埠改變時,eosconfig.xml裡配置的1099連接埠也要跟著改變。 3、如果通過EOS管理主控台(eosmgr)的“構件包資訊配置”給構件包配置資料來源,注意裡面的1099連接埠也要做相應的修改。 |