Error Receiving Buffer:An existing connection was forcibly closed by the remote host

  • 14 October 2019
  • 5 replies
  • 239 views

Hi all,

 

I was trying to create a package using package and deploy tool and getting below error. My environment has a single standalone server. I have checked if ports 5555 and 5252 are being used by any other process and they are being used only by K2 Host service. Any help?

 

"Error Receiving Buffer:An existing connection was forcibly closed by the remote host"

 

Details: 

 

SourceCode.Hosting.Exceptions.APICommunicationException: Error Receiving Buffer:An existing connection was forcibly closed by the remote host ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at SourceCode.Hosting.Client.BaseAPI.SocketBaseAPIConnection.OnReceiveBuffer(Byte[]& recvBuff)
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnectionBroker.OnReceiveBuffer(Byte[]& recvBuff)
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.ReceiveData(ValueType& hd)
--- End of inner exception stack trace ---
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.ReceiveData(ValueType& hd)
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.RemoteCall(String TypeName, String MethodName, Object[] Parameters, Boolean[] NullList, MarshalMessageType CallType)
at SourceCode.Deployment.Management.ClientSession.OnRemoteGetItem(GetItemOptions options)
at SourceCode.ComponentModel.CachedQueryContext.GetItemInternal(GetItemOptions options)
at SourceCode.ComponentModel.CachedQueryContext.GetItem(GetItemOptions options)
at SourceCode.Deployment.Management.Session.OnGetItem(GetItemOptions options)
at SourceCode.Management.Controls.AddItemViewComplexTypeNodeRef.OnActivate()
at SourceCode.Management.Controls.ViewModelNode.Activate()
at SourceCode.Management.Controls.ViewModelNode.ViewModelNodeCollection.InsertItem(Int32 index, ViewModelNode item)
at SourceCode.Management.Controls.AddItemViewComplexTypeNode.OnExpand()
at SourceCode.Management.Controls.ViewModelNode.Expand()
at SourceCode.Management.Controls.AddItemViewCategoryNodeRef.OnExpand()
at SourceCode.Management.Controls.ViewModelNode.Expand()
at SourceCode.Management.Controls.AddItemViewRootNode.OnExpand()
at SourceCode.Management.Controls.ViewModelNode.Expand()
at SourceCode.Management.Controls.AddItemView.<GetChildren>d__15.MoveNext()

 

Thanks,

Pradeep


5 replies

Badge +9

Hi Pnelli


 


See the possible solution below:


 


1. if this problem started after the upgrade so something might have gone wrong with the configuration.
then do a reinstall of K2 and this should resolved the issue.


 


2. In order to clean the K2 production server, during a time were a minimum of user are connected, we advise to:


    Remove the service instance with system name.


    Redeploy the package and do an attention about to select "Use existing service instance" for the service instance 


 


3. Port 5555 is the correct and default expected port that you should use for Package and Deployment.  The following gives a list of ports and what they are used for:


https://help.k2.com/onlinehelp/k2blackpearl/icg/4.7/default.htm#Prepare/Firewall_Settings.htm


 


4. As well as some mention of default and specifics for various Package and deployment considerations:https://help.k2.com/onlinehelp/k2blackpearl/userguide/4.7/default.htm#PackageAndDeploy/Powershell_Automated_Deployment.html


 


Regards


Elvis


 


 

Hi pnelli;


 


Could you please try installing the latest fix-pack on your environment and see if the error still persists, and kindly let us know if it does.


 


Kind regards,


Dumisani 

 Hi All,

 

I found below error in the host logs.

 

"43557799","20*personal details removed*:07:25","Error","General","1","GeneralErrorMessage","SourceCode.Hosting.Server.Runtime.HostServerEngine.StopHostServer","1 Value cannot be null.
Parameter name: key
at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at SourceCode.Hosting.Server.Runtime.HostSessionManager.GetActiveSession(String sessionCookie)
at SourceCode.Hosting.Server.Runtime.HostSecurityManager.GetSessionPrimaryCredentials(String sessionCookie)
at SourceCode.Hosting.Server.Runtime.HostSessionManager.get_CurrentSessionOwner()
at SourceCode.Deployment.Runtime.SessionManager.CloseSession(String sessionName)
at SourceCode.Deployment.Runtime.SessionManager.CloseAllSessions()
at SourceCode.Deployment.Runtime.SessionManager.Dispose(Boolean disposing)
at SourceCode.Deployment.Runtime.DeploymentServerLocal.Dispose(Boolean disposing)
at SourceCode.Deployment.Runtime.DeploymentServer.Unload()
at SourceCode.Hosting.Server.Runtime.HostServerEngine.StopHostServer()","","","XXXXXXX:C:Program Files (x86)K2 blackpearlHost ServerBin","43557799","beba79c0f2bd4d88a1bf59e223f3c8c4",""

I cannot install it as it should be as my live environment.

Hi pnelli,


 


May I kindly ask have you tried restarting the K2 service, and performing an IISRESET, if that has been covered and the issue is still present it might be that your K2 web-facing applications are all missing some connection strings.


So you may want to check if your web.config is using the correct hostnames.


 


Also please have a look at the following KB articles which are central to the same issue you are facing, they were, however, published for K2 4.7 (black pearl) but the resolutions contained within them should apply to your environment.


 


https://help.k2.com/support-services/kbt148847
https://help.k2.com/support-services/kbt141796
https://help.k2.com/support-services/kbt137432


 


Kind regards,


Dumisani


 


 

Reply