Symptoms
After using the "Process Instance Version Migration" utility after running through the InfoPath wizards to catch the new farm name, deployed a new version and migrated this instance to a new version. Also redirected to the same Activity to "restart" it. Getting the following error.
The following error prevented the Workflow InfoPath Task to open:
Unable to connect to SERVER] on port PORT NUMBER]. No connection could be made because the target machine actively refused it. 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(ConnectionSetup Setup) at SourceCode.Workflow.RuntimeServices.Functions.K2SPImpersonation.RunWithElevatedIdentity(K2TokenSecurityMethod method) at SourceCode.Workflow.RuntimeServices.OpenInfoPathTask.OpenConnection() at SourceCode.Workflow.RuntimeServices.OpenInfoPathTask.Page_Load(Object sender, EventArgs e) UInt64 InternalConnect(System.String, System.String, Int32, Int32)
Diagnoses
The server noted had been decommissioned while changing from a stand alone to a farm set up so it makes sense that connections couldn't be formed with it. The problem was that the task should not have been trying to connect to that server.
Resolution
Use a HOSTS file entry on the SP machine(s) for the OLD k2 server name pointing to the IP of the NEW k2 server(s)