不同的JBOSS版本(5.1和7.1.1)相同的端口

时间:2015-03-09 15:17:36

标签: port jboss7.x jboss5.x

我有一个问题我有两个文件WAR和EAR文件。 EAR文件将使用JBOSS 5.1和WAR文件与JBOSS 7一起部署。但它没有。我收到以下错误消息:

ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) Error initializing endpoint: java.net.BindException: Address already in use: JVM_Bind /0.0.0.0:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:983) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:190) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Connector.init(Connector.java:983) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]

 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.web.connector.http: org.jboss.msc.service.StartException in service jboss.web.connector .http: JBAS018007: Error starting web connector

at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:271)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]

Caused by: LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind /0.0.0.0:8080
    at org.apache.catalina.connector.Connector.init(Connector.java:985)
    at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267)
    ... 5 more
你能帮帮我吗?我可以在任何xml文件中更改端口吗?

Greetz Marko

1 个答案:

答案 0 :(得分:0)

如果您想更改JBoss 5端口:

编辑server / default / conf / bindingservice.beans / META-INF / bindings-jboss-beans.xml并将<parameter>${jboss.service.binding.set:ports-default}</parameter>更改为<parameter>${jboss.service.binding.set:ports-01}</parameter>

这将为端口号添加100的偏移量。例如,8080将变为8180。

对于jboss 7,编辑standalone.xml,查找

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

并为要添加的偏移量更改0 ..例如,

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:100}">

将8080变为8180