现在的位置: 首页 > 综合 > 正文

jboss端口占用及修改收藏_

2014年03月18日 ⁄ 综合 ⁄ 共 2436字 ⁄ 字号 评论关闭

JBOSS默认的各种设置文件中通常定义了以下几个端口

1: The ports found in the default configuration Port Type Service 

。1099 TCP org.jboss.naming.NamingService 
。1098 TCP org.jboss.naming.NamingService 
。1162 UDP org.jboss.jmx.adaptor.snmp.trapd.TrapdService 
。4444 TCP org.jboss.invocation.jrmp.server.JRMPInvoker 
。4445 TCP org.jboss.invocation.pooled.server.PooledInvoker 
。8009 TCP org.jboss.web.tomcat.tc4.EmbeddedTomcatService 
。8009 TCP org.jboss.web.tomcat.tc4.EmbeddedTomcatService 
。8083 TCP org.jboss.web.WebService 
。8090 TCP org.jboss.web.OILServerILService 
。8092 TCP org.jboss.mq.il.oil2.OIL2ServerILService 
。8093 TCP org.jboss.mq.il.uil2.UILServerILService 
。0a TCP org.jboss.mq.il.rmi.RMIServerILService 
。0b UDP org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService 
a, This service binds to an anonymous TCP port and does not support configuration of the port or bind interface currently(3.2.2). 
b, This service binds to an anonymous UDP port and does not support configuration of the port or bind interface.(3.2.2). 

2: Additional ports found in the all configuration Port Type Service 
。1100 TCP org.jboss.ha.jndi.HANamingService 
。0a TCP org.jboss.ha.jndi.HANamingService 
。1102 UDP org.jboss.ha.jndi.HANamingService 
。3528 TCP org.jboss.invocation.iiop.IIOPInvoker 
。45566b TCP org.jboss.ha.framework.server.ClusterPartition 
a, Currently anonymous but can be set via the RmiPort attribute 
b, Plus two additional anonymous UDP ports, one can be set using the rcv_port, and the other cannot be seen。

大家注意每个端口后面的类名。在该端口被占用时,JBOSS会报出与这些类名相关的异常。

JBOSS在运行的时候,通常占用以下端口。这些端口可以在命令行模式下输入
netstat -a -o -n
来查看。例如:
C:/Documents and Settings/Administrator>netstat -a -o -n

Active Connections

Proto Local Address Foreign Address State PID
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 1004
UDP 192.168.100.210:138 *:* 4

C:/Documents and Settings/Administrator>

其中PID为3660的为JBOSS占用的端口,可以看出1098,1099,4444,4445,8080,8009,8083,8093是被占用的。

jboss和oracle在同一机器上时,通常oracle占用8080端口,这时只需要去修改/deploy/jbossweb-tomcat50.sar/server.xml中。当在同一台机器上运行两个JBOSS实例的时候,则需要修改在default/conf/jboss-service.xml中的1098,1099,4444,4445,8083,default/deploy/jbossweb-tomcat50.sar/server.xml中8080以及default/deploy/jms/uil2-service.xml中的8093端口。这样启动两个JBOSS的话就不会报任何端口占用异常。希望大家不要在同一JBOSS目录中启动两个啊,哈哈 

还有一种启动两个JBOSS的方法就是一个运行run.bat,一个就是用命令行方式run带参数启动server/all下的配置。具体俺没研究。

 

 

注:8009 不需要改动       <Connector port="8009" address="${jboss.bind.address}"
         emptySessionPath="true" enableLookups="false" redirectPort="8443"
         protocol="AJP/1.3"/>

抱歉!评论已关闭.