1

我们最近遇到了一个问题,我们的 MS 测试控制器控制器服务无法与 Jenkins 服务一起启动。每次我们尝试启动控制器服务时,我们都会在事件日志中出现以下错误

Service cannot be started. System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL http://+:80/AgentInstallerService/ because TCP port 80 is being used by another application. ---> System.Net.HttpListenerException: The process cannot access the file because it is being used by another process
   at System.Net.HttpListener.AddAllPrefixes()
   at System.Net.HttpListener.Start()
   at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
   at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
   at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
   at System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpe...

Has anyone run into this before?
4

1 回答 1

1

我们看到了同样的错误,它是由 Visual Studio 尝试使用端口 80 启动 TestController/Agent 引起的,而 Jenkins 也在该端口上运行。我们的解决方案是更新 Jenkins 以在端口 8080 上运行。这是通过更新我们的 Jenkins 配置来完成的,如下所示:

D:\Program Files (x86)\Jenkins\jenkins.xml (可能位于其他地方)

-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8080

如果任何其他(非 Jenkins)服务已经在端口 80 上运行,这可能也会发生。

于 2013-06-05T17:36:54.090 回答