CruiseControl 不作为 Windows 服务运行

CruiseControl 不作为 Windows 服务运行

我在 Windows 上使用 CruiseControl 时遇到了问题。安装后,我可以让 CruiseControl 自行运行,没有任何问题。

但是,当我运行巡航控制的 Windows 服务(Web 仪表板所需)时,我发现 CruiseControl 和 wrapper.exe(服务)似乎无法共享端口 - 从以下抛出的异常可以看出:

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)

我之前也问过类似的问题:https://stackoverflow.com/questions/2332192/cruisecontrol-cannot-get-web-interface-to-work

然而,直到现在我才确定冲突发生在 Windows 服务 (Wrapper.exe) 和 CruiseControl 之间,这意味着该问题的解决方案并没有真正解决我的问题。我仍然无法显示我的 Web 仪表板,尽管实际的 CruiseControl 应用程序似乎运行良好。我收到此错误:

While trying to retrieve the URL: http://127.0.0.1:8080/cruisecontrol    
The following error was encountered:    
    * Connection to 127.0.0.1 Failed     
The system returned:    
    (111) Connection refused    
The remote host or network may be down. Please try the request again. 

知道如何让 CruiseControl 作为 Windows 服务运行吗?


完整堆栈跟踪

[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

相关内容