如果在一台机器上部署了多个jboss server,需要修改相关端口以避免端口冲突,方法如下:
注意:保证以下修改的端口不被占用
1. JBOSS \server\default\ conf\jboss-service.xml (缺省修改5个端口)修改成蓝色字体部分
WebService端口
<mbean code="org.jboss.web.WebService"
name="jboss:service=WebService">
<attribute name="Port">18083</attribute>
……
JNDI端口
<mbean code="org.jboss.naming.NamingService"
name="jboss:service=Naming"
xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
<!-- The call by value mode. true if all lookups are unmarshalled using
the caller's TCL, false if in VM lookups return the value by reference.
-->
<attribute name="CallByValue">false</attribute>
<!-- The listening port for the bootstrap JNP service. Set this to -1
to run the NamingService without the JNP invoker listening port.
-->
<attribute name="Port">11099</attribute>
<!-- The bootstrap JNP server bind address. This also sets the default
RMI service bind address. Empty == all addresses
-->
<attribute name="BindAddress">${jboss.bind.address}</attribute>
<!-- The port of the RMI naming service, 0 == anonymous -->
<attribute name="RmiPort">11098</attribute>
RMI/JRMP端口
<mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker"
name="jboss:service=invoker,type=jrmp">
<attribute name="RMIObjectPort">14444</attribute>
<attribute name="ServerAddress">${jboss.bind.address}</attribute>
……
<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">14445</attribute>
……
2 . JBOSS \server\default\deploy\jbossweb-tomcat55.sar\server.xml (缺省修改6处) 修改成蓝色字体部分
HTTP端口(注:“URIEncoding="UTF-8"”为中文命名附件的下载支持参数)
<Connector port="18080" address="${jboss.bind.address}"
maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
emptySessionPath="true"
enableLookups="false" redirectPort="18443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>
AJP端口
<Connector port="18009" address="${jboss.bind.address}"
emptySessionPath="true" enableLookups="false" redirectPort="18443"
protocol="AJP/1.3"/>
SSL端口
<Connector port="18443" address="${jboss.bind.address}"
maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
emptySessionPath="true"
scheme="https" secure="true" clientAuth="false"
keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore"
keystorePass="rmi+ssl" sslProtocol = "TLS" />
3 . JBOSS \server\default\deploy\jms\uil2-service.xml (缺省修改1处)
MQ端口
<mbean code="org.jboss.mq.il.uil2.UILServerILService"
name="jboss.mq:service=InvocationLayer,type=UIL2">
<!-- The server chain -->
<depends optional-attribute-name="Invoker">jboss.mq:service=Invoker</depends>
<!-- JNDI binding -->
<attribute name="ConnectionFactoryJNDIRef">ConnectionFactory</attribute>
<!-- JNDI binding for XA -->
<attribute name="XAConnectionFactoryJNDIRef">XAConnectionFactory</attribute>
<!-- The bind address -->
<attribute name="BindAddress">${jboss.bind.address}</attribute>
<!-- The bind port -->
<attribute name="ServerBindPort">18093</attribute>