在全新安装CruiseControl时,每次启动CruiseControl时,都会抛出以下两个异常:
ontrollerAgent- Exception starting httpAdaptor
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
ontrollerAgent- Exception starting connectorServer
java.io.IOException: Cannot bind to URL [jrmp]: javax.naming.NameAlreadyBoundException: jrmp [Root exception is java.rmi.AlreadyBoundException: jrmp]
at javax.management.remote.rmi.RMIConnectorServer.newIOException(Unknown Source)
在这些之前和之后似乎(显然)出现了问题。因此,我无法查看CruiseControl的Web仪表板。关于这里出了什么问题的任何想法?
完整堆栈跟踪:
[cc]Feb-25 16:33:49 ontrollerAgent- Starting HttpAdaptor with CC-Stylesheets
[cc]Feb-25 16:33:49 ontrollerAgent- starting httpAdaptor
[cc]Feb-25 16:33:49 ontrollerAgent- Exception starting httpAdaptor
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at mx4j.tools.adaptor.PlainAdaptorServerSocketFactory.createServerSocket (PlainAdaptorServerSocketFactory.java:24)
at mx4j.tools.adaptor.http.HttpAdaptor.createServerSocket(HttpAdaptor.java:672)
at mx4j.tools.adaptor.http.HttpAdaptor.start(HttpAdaptor.java:478)
at net.sourceforge.cruisecontrol.jmx.CruiseControlControllerAgent.start(CruiseControlControllerAgent.java:172)
[truncated]
[cc]Feb-25 16:33:49 ontrollerAgent- starting rmiRegistry
[cc]Feb-25 16:33:49 ontrollerAgent- Port 1099 is already in use, so no new rmiRe
gistry is started
[cc]Feb-25 16:33:49 ontrollerAgent- starting connectorServer
[cc]Feb-25 16:33:50 ontrollerAgent- Exception starting connectorServer
java.io.IOException: Cannot bind to URL [jrmp]: javax.naming.NameAlreadyBoundException: jrmp [Root exception is java.rmi.AlreadyBoundException: jrmp]
at javax.management.remote.rmi.RMIConnectorServer.newIOException(Unknown Source)
at javax.management.remote.rmi.RMIConnectorServer.start(Unknown Source)
at net.sourceforge.cruisecontrol.jmx.CruiseControlControllerAgent.start(CruiseControlControllerAgent.java:190)
at net.sourceforge.cruisecontrol.Main.startJmxAgent(Main.java:137)
at net.sourceforge.cruisecontrol.Main.start(Main.java:115)
at net.sourceforge.cruisecontrol.launch.Launcher.run(Launcher.java:259)
at net.sourceforge.cruisecontrol.launch.Launcher.main(Launcher.java:117)
Caused by: javax.naming.NameAlreadyBoundException: jrmp [Root exception is java.
rmi.AlreadyBoundException: jrmp]
at com.sun.jndi.rmi.registry.RegistryContext.bind(Unknown Source)
at com.sun.jndi.rmi.registry.RegistryContext.bind(Unknown Source)
at javax.naming.InitialContext.bind(Unknown Source)
at javax.management.remote.rmi.RMIConnectorServer.bind(Unknown Source)
... 6 more
Caused by: java.rmi.AlreadyBoundException: jrmp
at sun.rmi.registry.RegistryImpl.bind(Unknown Source)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
[truncated]
2010-02-25 16:33:50.710::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
2010-02-25 16:33:50.850::INFO: jetty-6.1.11
2010-02-25 16:33:51.161:/dashboard:INFO: Initializing Spring root WebApplicationContext
答案 0 :(得分:1)
在CC启动时,您是否仍在运行任何Java程序?
如this thread所示:
我注意到当我重新启动cruisecontrol时,我需要杀死任何剩余的java程序或发生端口类错误。 解决方案是:
- 停止巡航控制
- 杀死所有剩余的cvs和java程序。
- 等待30秒。
- 启动巡航控制。
OP bguiz在评论中添加了他自己的食谱:
- 停止CruiseControl
- 杀死所有剩余的cvs和java程序。
- 重新启动计算机,
- sc删除CruiseControl,
- wrapper -i wrapper.conf。
- 启动CruiseControl
答案 1 :(得分:0)
您的计算机上运行的另一个应用服务器看起来与您的巡航控制服务器使用相同的端口。 您是否在新服务器上部署Cruise Control?它是什么服务器?
尝试停止计算机上的所有服务器并尝试再次启动巡航控制。
答案 2 :(得分:0)
如果您使用Windows服务包装器启动CruiseControl,则默认情况下RMI端口设置为1099。您可以通过编辑CruiseControl安装目录中的wrapper.conf文件来更改此端口。您可能希望在命令提示符下运行“netstat”以列出系统当前使用的所有端口。然后选择一个与任何其他服务器或进程不冲突的。 杀死所有其他进程并不总是一种选择。