Skip to main content


 

Symptoms


Dear sirs,

Today I am getting this error on the Production environment :
"Unable to connect to k2array on port . The requested address is not valid in its context."
at SourceCode.Workflow.Client.SocketClient.InternalConnect(String server, String port, Int32 timeout, Int32 ipversion)
at SourceCode.Workflow.Client.SocketClient.Connect(StringDictionary Data)
at SourceCode.Workflow.Client.InternalConnection.Connect(StringDictionary Data)
at SourceCode.Workflow.Client.Connection.Open(String Server)
at IPC_WCF.K2Service.Connect(String userName)
at IPC_WCF.K2Service.GetTasks(String userName)


This is when I am calling GetTask method which is calling Connect Method in the K2Service (WCF).

Following is the Code of Connect Method :
private Connection Connect(string userName)
{
var conn = new Connection()
string connectionString ="Integrated=TrueIsPrimaryLogin=TrueAuthenticate=TrueEncryptedPassword=FalseHost=" +
ConfigurationManager.AppSettings.Get("K2Server") + "Port="
+ ConfigurationManager.AppSettings.Get("ManagementServerPort") + "windowsdomain="
+ ConfigurationManager.AppSettings.Get("Domain") + "securitylabelname=K2userid="
+ ConfigurationManager.AppSettings.Get("UserName") + "password="
+ ConfigurationManager.AppSettings.Get("Password")

conn.Open(
ConfigurationManager.AppSettings.Get("K2Server"), connectionString)


conn.ImpersonateUser("K2:" + userName)
return conn
}


------------------------
Following are values of Configuration Keys in web.config :









When I try to run the code from my development machine and connecting Production Server , I am getting following error :
"Send failed with error: An established connection was aborted by the software in your host machine."

 

Diagnoses


in a session we found in the code that port 5555 is used for SourceCode.Workflow.Client connections while 5252 should be used.

as a reference please see:
https://help.k2.com/onlinehelp/k2blackpearl/DevRef/4.7/default.htm#ConnectionStringSamples.htm
 

Resolution

The customer closed the ticket after having a session were we found in the code that port 5555 is used for SourceCode.Workflow.Client connections while 5252 should be used.

as a reference please see:
https://help.k2.com/onlinehelp/k2blackpearl/DevRef/4.7/default.htm#ConnectionStringSamples.htm

Bashar Adas




 
Be the first to reply!

Reply