Unable to see Continua Agent from Continua CI Server

I’ve recently re-installed a Continua CI Agent on a new Windows Server 2012 R2 installation and I cannot get the Contina CI Server to see it.
I’m using default ports and manually added firewall rules to enable access from both directions.
I’ve enabled debug logging and attached the local Continua CI Agent log file. Appears that it can’t register with the server.
The Continua CI Server has not changed between installing Windows Server and the Continua CI Agent (it worked when agent was previously installed on same VM).

I am starting the Continua CI Agent with a custom domain user but I have verified that has ‘Log on as a service’ permissions. What am I missing?

I enabled debug logging and copied this from the file (I cannot attach the ‘.txt’ file as the forum complains that the format is not supported!)

Medium: 12:40:31.441 {T6} [Registration] Agent failed to register with the server six times. Time elapsed for last registration attempt was 1ms.
Error message: Exception: EndpointNotFoundException

Message: There was no endpoint listening at net.pipe://localhost/ContinuaCI/IAgentRegistrationService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Stack Trace: 
Server stack trace: 
   at System.ServiceModel.Channels.PipeConnectionInitiator.GetPipeName(Uri uri, IPipeTransportFactorySettings transportFactorySettings)
   at System.ServiceModel.Channels.NamedPipeConnectionPoolRegistry.NamedPipeConnectionPool.GetPoolKey(EndpointAddress address, Uri via)
   at System.ServiceModel.Channels.CommunicationPool2.TakeConnection(EndpointAddress address, Uri via, TimeSpan timeout, TKey&amp; key)<br>&nbsp; &nbsp;at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)<br>&nbsp; &nbsp;at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)<br>&nbsp; &nbsp;at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)<br>&nbsp; &nbsp;at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)<br>&nbsp; &nbsp;at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)<br><br>Exception rethrown at &#91;0&#93;:&nbsp;<br>&nbsp; &nbsp;at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)<br>&nbsp; &nbsp;at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)<br>&nbsp; &nbsp;at System.ServiceModel.ICommunicationObject.Open()<br>&nbsp; &nbsp;at Continua.Shared.WCF.Client.ServiceClient1.Initialise()
   at Continua.Shared.WCF.Client.ServiceClient`1.get_Proxy()
   at Continua.Modules.Builds.Agent.RegistrationController.Register()

Exception: PipeException

Message: The pipe endpoint ‘net.pipe://localhost/ContinuaCI/IAgentRegistrationService’ could not be found on your local machine. 

Stack Trace: 

Hi Simon,

Check the debug log for the Server. If there is an error similar to “There is already a listener on IP endpoint” then this usually means agent registration service listener was not fully disconnected when the service was last shutdown. The only solution we have for this at the moment is to reboot the server. 

Otherwise, please send the debug logs to support@finalbuilder.com.

Restarting both machines has made no difference. I’ve sent the logs for both machines to ‘support@finalbuilder.com’.

Hi Simon,

Thanks for sending the debug logs. I can see that the service listener is starting up ok.

 I understand that you have installed the agent on a separate machine to the server. However, the agent appears to be trying to connect to a service on the same machine (localhost).

Can you check that you have entered the correct machine name for serverHostName under endpoints in the agent configuration file (%ProgramFiles%VSoft Technologies\ContinuaCI Agent\Continua.Agent.Service.exe.config) ?


<endpoints port=“9002” serverhostname=“localhost” serverport=“9000”></endpoints port=“9002” serverhostname=“localhost” serverport=“9000”>

Yep, it was the ‘serverHostname’. I did not notice the input field when installing. I was assuming it was using zero config or other discovery mechanism to discover each other

For future reference the ‘PortQry’ tool is really useful for diagnosing these issues (see https://www.microsoft.com/en-us/download/details.aspx?id=17148)

After updating Continua CI to we found we that external agents could no longer contact it after being upgraded. Turns out the firewall on the Continua CI Server machine was blocking the ports (no idea how this changed).

1 Like