# 1.0.0.472 - Agents cannot connect to Server

**URL:** https://www.finalbuilder.com/forums/t/1-0-0-472-agents-cannot-connect-to-server/4845
**Category:** Discussion
**Created:** [May 31, 2012, 8:25am UTC](https://www.finalbuilder.com/forums/t/1-0-0-472-agents-cannot-connect-to-server/4845 "2012-05-31T08:25:49Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ollis](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/o/f1d935/32.png) [@ollis](https://www.finalbuilder.com/forums/u/ollis)
#### Post date: [May 31, 2012, 8:25am UTC](https://www.finalbuilder.com/forums/t/1-0-0-472-agents-cannot-connect-to-server/4845/1 "2012-05-31T08:25:49Z")

</div>

Hi,   
  
There appears to be some issues in the latest beta in Agent connections. The agent diagnostics shows the following stack trace when the agent attempts to register to the server:  
  
[Registration] Could not register agent with Continua server, will try again in 1 minute.  
Reason: System.ServiceModel.CommunicationException: The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.  
  
Server stack trace:   
&nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)  
&nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)  
&nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)  
  
Exception rethrown at [0]:   
&nbsp;&nbsp; at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)  
&nbsp;&nbsp; at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)  
&nbsp;&nbsp; at Continua.Modules.Builds.Common.Services.Contracts.IAgentRegistrationService.Register(String hostname, Int32 port, String version)  
&nbsp;&nbsp; at Continua.Modules.Builds.Agent.RegistrationController.Register()  
[Registration] Could not register agent with Continua server, will try again in 1 minute.  
Reason: System.ServiceModel.FaultException: The server was unable to process the request due to an internal error.&nbsp; For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.  
  
Server stack trace:   
&nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)  
&nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)  
&nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)  
&nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)  
&nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)  
  
Exception rethrown at [0]:   
&nbsp;&nbsp; at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)  
&nbsp;&nbsp; at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)  
&nbsp;&nbsp; at Continua.Modules.Builds.Common.Services.Contracts.IAgentRegistrationService.Register(String hostname, Int32 port, String version)  
&nbsp;&nbsp; at Continua.Modules.Builds.Agent.RegistrationController.Register()

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [May 31, 2012, 9:42am UTC](https://www.finalbuilder.com/forums/t/1-0-0-472-agents-cannot-connect-to-server/4845/2 "2012-05-31T09:42:46Z")

</div>

Did you update the agents recently? I think recent builds changed the agent service interfaces to add agent version reporting (the agents view now shows when agents are too old etc).

---

<div class="post-metadata">

### Author: ![ollis](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/o/f1d935/32.png) [@ollis](https://www.finalbuilder.com/forums/u/ollis)
#### Post date: [May 31, 2012, 11:36am UTC](https://www.finalbuilder.com/forums/t/1-0-0-472-agents-cannot-connect-to-server/4845/3 "2012-05-31T11:36:13Z")

</div>

> Posted By Vincent Parrett on 31 May 2012 02:42 AM  
> Did you update the agents recently? I think recent builds changed the agent service interfaces to add agent version reporting (the agents view now shows when agents are too old etc).

  
I updated the agents to build 461, and they worked ok. After updating the Server and Agents to 472 this came up.  
  
Might this be somehow related to my failed attempt to create the agent property, as the server stack trace mentions something concerning that property being null?  
  
[Unhandled Service Exception] Exception: PropertyValueException  
Message: not-null property references a null or transient value Continua.Modules.Builds.Agents.AgentProperty.Value  
Stack Trace:&nbsp;&nbsp;&nbsp; at NHibernate.Engine.Nullability.CheckNullability(Object[] values, IEntityPersister persister, Boolean isUpdate)  
&nbsp;&nbsp; at NHibernate.Event.Default.AbstractSaveEventListener.PerformSaveOrReplicate(Object entity, EntityKey key, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)  
&nbsp;&nbsp; at NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)  
&nbsp;&nbsp; at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)  
&nbsp;&nbsp; at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event)  
&nbsp;&nbsp; at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event)  
&nbsp;&nbsp; at NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event)  
&nbsp;&nbsp; at NHibernate.Impl.SessionImpl.SaveOrUpdate(String entityName, Object obj)  
&nbsp;&nbsp; at NHibernate.Engine.Cascade.CascadeToOne(Object parent, Object child, IType type, CascadeStyle style, Object anything, Boolean isCascadeDeleteEnabled)  
&nbsp;&nbsp; at NHibernate.Engine.Cascade.CascadeCollectionElements(Object parent, Object child, CollectionType collectionType, CascadeStyle style, IType elemType, Object anything, Boolean isCascadeDeleteEnabled)  
&nbsp;&nbsp; at NHibernate.Engine.Cascade.CascadeCollection(Object parent, Object child, CascadeStyle style, Object anything, CollectionType type)  
&nbsp;&nbsp; at NHibernate.Engine.Cascade.CascadeOn(IEntityPersister persister, Object parent, Object anything)  
&nbsp;&nbsp; at NHibernate.Event.Default.AbstractFlushingEventListener.CascadeOnFlush(IEventSource session, IEntityPersister persister, Object key, Object anything)  
&nbsp;&nbsp; at NHibernate.Event.Default.AbstractFlushingEventListener.PrepareEntityFlushes(IEventSource session)  
&nbsp;&nbsp; at NHibernate.Event.Default.AbstractFlushingEventListener.FlushEverythingToExecutions(FlushEvent event)  
&nbsp;&nbsp; at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)  
&nbsp;&nbsp; at NHibernate.Impl.SessionImpl.Flush()  
&nbsp;&nbsp; at NHibernate.Transaction.AdoTransaction.Commit()  
&nbsp;&nbsp; at Continua.Data.Hibernate.NHibernateDatabase.CommitTransaction()  
&nbsp;&nbsp; at Continua.Modules.Builds.Agents.AgentManager.UpdatePropertiesForAgent(RegisteredAgent agent)  
&nbsp;&nbsp; at Continua.Modules.Builds.Agents.AgentManager.Register(String address, String hostname, Int32 port, String version)  
&nbsp;&nbsp; at Continua.Modules.Builds.Services.AgentRegistrationService.Register(String hostname, Int32 port, String version)  
&nbsp;&nbsp; at SyncInvokeRegister(Object , Object[] , Object[] )  
&nbsp;&nbsp; at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)  
&nbsp;&nbsp; at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)  
&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)  
&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)  
&nbsp;&nbsp; at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

---

<div class="post-metadata">

### Author: ![ollis](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/o/f1d935/32.png) [@ollis](https://www.finalbuilder.com/forums/u/ollis)
#### Post date: [May 31, 2012, 11:44am UTC](https://www.finalbuilder.com/forums/t/1-0-0-472-agents-cannot-connect-to-server/4845/4 "2012-05-31T11:44:51Z")

</div>

Checking the Diagnostics more thoroughly I noted that in addition to the one in previous message the Server also logs this:  
  
[Unhandled Service Exception] Exception: CommunicationException  
Message: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was ‘00:00:10’.  
Stack Trace:&nbsp;&nbsp;&nbsp; at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)  
&nbsp;&nbsp; at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)  
&nbsp;&nbsp; at System.ServiceModel.Channels.SessionConnectionReader.Receive(TimeSpan timeout)  
&nbsp;&nbsp; at System.ServiceModel.Channels.SynchronizedMessageSource.Receive(TimeSpan timeout)  
&nbsp;&nbsp; at System.ServiceModel.Channels.FramingDuplexSessionChannel.Receive(TimeSpan timeout)  
&nbsp;&nbsp; at System.ServiceModel.Channels.FramingDuplexSessionChannel.TryReceive(TimeSpan timeout, Message& message)  
&nbsp;&nbsp; at System.ServiceModel.Channels.InputChannelWrapper.TryReceive(TimeSpan timeout, Message& message)  
&nbsp;&nbsp; at System.ServiceModel.Channels.ServerReliableChannelBinder`1.DuplexServerReliableChannelBinder`1.OnTryReceive(TDuplexChannel channel, TimeSpan timeout, RequestContext& requestContext)  
&nbsp;&nbsp; at System.ServiceModel.Channels.ReliableChannelBinder`1.TryReceive(TimeSpan timeout, RequestContext& requestContext, MaskingMode maskingMode)  
&nbsp;&nbsp; at System.ServiceModel.Security.SecuritySessionServerSettings.ServerSecuritySessionChannel.TryReceiveRequest(TimeSpan timeout, RequestContext& requestContext)  
&nbsp;&nbsp; at System.ServiceModel.Security.SecuritySessionServerSettings.ServerSecuritySessionChannel.TryReceive(TimeSpan timeout, Message& message)  
&nbsp;&nbsp; at System.ServiceModel.Security.SecuritySessionServerSettings.ServerSecurityDuplexSessionChannel.WaitForInputSessionClose(TimeSpan timeout, Boolean& wasAborted)  
&nbsp;&nbsp; at System.ServiceModel.Security.SecuritySessionServerSettings.ServerSecurityDuplexSessionChannel.OnClose(TimeSpan timeout)  
&nbsp;&nbsp; at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)  
&nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannel.OnClose(TimeSpan timeout)  
&nbsp;&nbsp; at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)  
&nbsp;&nbsp; at System.ServiceModel.Dispatcher.MessageRpc.CloseChannel()  
  
Exception: SocketException  
Message: An existing connection was forcibly closed by the remote host  
Stack Trace:&nbsp;&nbsp;&nbsp; at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)  
  
Both the server and the agents are at the most recent build.

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [June 1, 2012, 6:54am UTC](https://www.finalbuilder.com/forums/t/1-0-0-472-agents-cannot-connect-to-server/4845/5 "2012-06-01T06:54:10Z")

</div>

Hi Olli,   
  
 We’ve just checked in a fix to prevent that error with agent properties, it’ll be in the next build which we’ll hopefully get out today. That should resolve the issue you’re seeing with agents.   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![ollis](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/o/f1d935/32.png) [@ollis](https://www.finalbuilder.com/forums/u/ollis)
#### Post date: [June 1, 2012, 4:17am UTC](https://www.finalbuilder.com/forums/t/1-0-0-472-agents-cannot-connect-to-server/4845/6 "2012-06-01T04:17:15Z")

</div>

I can confirm that the most recent beta resolved these issues for us.
