解决两个JBOSS部署在同一台服务器时端口占用问题
当两个JBOSS部署在同一台服务器上时,需要修改下面的端口值
1, jboss-4.2.2.GA\server\default\deploy\ejb3.deployer\META-INF下打开jboss-service.xml文件
第12行修改3873的端口值
<mbean code="org.jboss.remoting.transport.Connector"
name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3"> <depends>jboss.aop:service=AspectDeployer</depends>
<attribute name="InvokerLocator">socket://${jboss.bind.address}:3873</attribute> <attribute name="Configuration">
<handlers>
<handler
2, jboss-4.2.2.GA\server\default\deploy\jboss-web.deployer下打开server.xml文件 修改80,8009,8443的
端口值
a. 第22行修改80端口;
b. 第25行修改8443端口;
<Connector port="80" address="${jboss.bind.address}"
maxThreads="250" maxHttpHeaderSize="8192"
emptySessionPath="true" protocol="HTTP/1.1"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" /> c. 第39行修改8009端口;
emptySessionPath="true" enableLookups="false" redirectPort="9445" />
<Engine name="jboss.web" defaultHost="localhost">
3, jboss-4.2.2.GA\server\default\conf下打开jboss-service.xml文件,修改8083,1098,1099,4444,4445,
4446的端口值
a. 第210行修改8083端口;
<mbean code="org.jboss.web.WebService"
name="jboss:service=WebService">
<!-- The Bind address and Port -->
<attribute name="BindAddress">${jboss.bind.address}</attribute>
<attribute name="Port">8083</attribute>
<!-- The address to use for the host portion of the RMI codebase URL -->
<attribute name="Host">${java.rmi.server.hostname}</attribute>
<!-- Should non-EJB .class files be downloadable -->
<attribute name="DownloadServerClasses">true</attribute>
b. 第257行修改1098端口
<!-- The port of the RMI naming service, 0 == anonymous -->
<attribute name="RmiPort">1098</attribute>
<!-- The RMI service bind address. Empty == all addresses
-->
c. 第251行修改1099的端口值
<attribute name="Port">1099</attribute>
d. 第426行修改4444端口值
<mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker"
name="jboss:service=invoker,type=jrmp">
<attribute name="RMIObjectPort">4444</attribute>
<attribute name="ServerAddress">${jboss.bind.address}</attribute>
e. 第450行修改4445的端口值
<mbean code="org.jboss.invocation.pooled.server.PooledInvoker"
name="jboss:service=invoker,type=pooled">
<attribute name="NumAcceptThreads">1</attribute>
<attribute name="MaxPoolSize">300</attribute>
<attribute name="ClientMaxPoolSize">300</attribute>
<attribute name="SocketTimeout">60000</attribute>
<attribute name="ServerBindAddress">${jboss.bind.address}</attribute>
<attribute name="ServerBindPort">4445</attribute>
<attribute name="ClientConnectAddress">${jboss.bind.address}</attribute>
<attribute name="ClientConnectPort">0</attribute>
<attribute name="ClientRetryCount">1</attribute>
<attribute name="EnableTcpNoDelay">false</attribute>
f. 第510行修改4446的端口值
<attribute name="socketTimeout" isParam="true">600000</attribute>
<attribute name="serverBindAddress">${jboss.bind.address}</attribute>
<attribute name="serverBindPort">4446</attribute>
4, jboss-4.2.2.GA\server\default\conf打开jboss-minimal.xml文件,修改1099的端口值,与第3步中的修
改一致
第76行修改1099的值
<attribute name="Port">1099</attribute>
5,jboss-4.2.2.GA\server\default\deploy\jms下打开uil2-service.xml,修改8093的端口值
第22行修改8093的端口值
<attribute name="ServerBindPort">8093</attribute>
第二篇:JBOSS端口修改说明
策划系统环境搭建单
一、
1. 首先创建jboss服务器,然后将qa.war包放到jboss-4.0.4/server/default/deploy/路径下
2. 配置连接,再路径 jboss-4.0.4\server\default\deploy\qa.war\WEB-INF\classes下找到erm.properties和jdbc.properties两个文件
3. 修改文件
hibernate.connection.username=数据库表空间名
hibernate.connection.password=数据库表空间密码
hibernate.connection.url=jdbc:oracle:thin:@IP地址:1521:数据库SID
二、
如果在一台机器上部署了多个jboss server,需要修改相关端口以避免端口冲突。目前确认需要修改的配置如下
一、vi $JBOSS_HOME/server/default/conf/jboss-service.xml
1、WebService端口
<mbean code="org.jboss.web.WebService"
name="jboss:service=WebService">
<attribute name="Port">8083</attribute>
2、JNDI端口:
<mbean code="org.jboss.naming.NamingService"
name="jboss:service=Naming"
xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
<attribute name="Port">1099</attribute>
<attribute name="Port">1098</attribute>
3、RMI端口:
<mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker"
name="jboss:service=invoker,type=jrmp">
<attribute name="RMIObjectPort">4444</attribute>
</mbean>
<mbean code="org.jboss.invocation.pooled.server.PooledInvoker"
name="jboss:service=invoker,type=pooled">
<attribute name="ServerBindPort">4445</attribute>
</mbean>
二、vi $JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/server.xml
1、HTTP端口:
<Connector port="8080" address="${jboss.bind.address}"/> <Connector port="8009" address="${jboss.bind.address}"/>
三、vi $JBOSS_HOME/server/default/deploy/jms/uil2-service.xml
1、JMS:
<mbean code="org.jboss.mq.il.uil2.UILServerILService"> <attribute name="ServerBindPort">8093</attribute>