nkdAgility / azure-devops-migration-tools

Azure DevOps Migration Tools allow you to migrate Teams, Backlogs, Tasks, Test Cases, and Plans & Suits from one Project to another in Azure DevOps / TFS both within the same Organisation, and between Organisations.
https://nkdagility.com/learn/azure-devops-migration-tools/
MIT License
493 stars 328 forks source link

An existing connection was forcibly closed by the remote host #2247

Closed SathishkumarG3 closed 1 month ago

SathishkumarG3 commented 1 month ago

Version

Source Version

Azure DevOps Service

Target Version

Azure DevOps Service

Relevant configuration

Steps to Reproduce:

1, Initiate the WorkItemMigration process using Azure DevOps Migration Tools.
2, The migration runs for approximately 9 minutes.
3, Encounter the IOException error indicating the connection was forcibly closed by the remote host.

Environment:
1, Azure DevOps Migration Tools Version: 15.1.7-Preview.5
2, Operating System: [Windows 10]

Relevant log output

Error Log:

[10:59:59 INF] [15.1.7-Preview.5] 403/11057 3.64%
[11:00:29 INF] [15.1.7-Preview.5] 469/11057 4.24%
[11:00:59 INF] [15.1.7-Preview.5] 540/11057 4.88%
[11:01:29 INF] [15.1.7-Preview.5] 609/11057 5.51%
[11:01:59 INF] [15.1.7-Preview.5] 680/11057 6.15%
[11:02:30 INF] [15.1.7-Preview.5] 746/11057 6.75%
[11:03:00 INF] [15.1.7-Preview.5] 822/11057 7.43%
[11:03:30 INF] [15.1.7-Preview.5] 893/11057 8.08%
[11:04:00 INF] [15.1.7-Preview.5] 964/11057 8.72%
[11:04:43 INF] [15.1.7-Preview.5] DONE in 00:09:27.6122922
Error logged to Elmah.io
[11:04:45 FTL] [15.1.7-Preview.5] Error while running WorkItemMigration
System.IO.IOException: Unable to read data from the transport connection: 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.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.GZipWrapperStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
   at System.Xml.EncodingStreamWrapper.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.Xml.XmlBufferReader.TryEnsureBytes(Int32 count)
   at System.Xml.XmlBufferReader.GetBuffer(Int32 count, Int32& offset, Int32& offsetMax)
   at System.Xml.XmlUTF8TextReader.ReadText(Boolean hasLeadingByteOf0xEF)
   at System.Xml.XmlUTF8TextReader.Read()
   at Microsoft.TeamFoundation.WorkItemTracking.Proxy.RowSetColumn.System.Xml.Serialization.IXmlSerializable.ReadXml(XmlReader reader)
   at Microsoft.TeamFoundation.WorkItemTracking.Proxy.RowSet.System.Xml.Serialization.IXmlSerializable.ReadXml(XmlReader reader)
   at Microsoft.TeamFoundation.WorkItemTracking.Proxy.RowSetCollection.System.Xml.Serialization.IXmlSerializable.ReadXml(XmlReader reader)
   at Microsoft.TeamFoundation.WorkItemTracking.Proxy.ClientService.GetWorkItemClientOperation.ReadOutput(IServiceProvider serviceProvider, XmlReader reader, Object[] outputs)
   at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.HandleReply(TfsClientOperation operation, TfsMessage message, Object[]& outputs)
   at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.Invoke(TfsClientOperation operation, Object[] parameters, TimeSpan timeout, Object[]& outputs)
   at Microsoft.TeamFoundation.WorkItemTracking.Proxy.ClientService.GetWorkItem(Int32 workItemId, Int32 revisionId, Int32 minimumRevisionId, Nullable`1 asOfDate, Boolean useMaster, RowSetCollection& workItem, MetadataTableHaveEntry[] metadataHave, String& dbStamp, RowSetCollection& metadata)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.LoadWorkItem(Int32 id, Int32 rev, Nullable`1 asof, IWorkItemRowSets& witem)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.EnsureCollections()
   at Microsoft.TeamFoundation.WorkItemTracking.Client.LinkCollection.Populate()
   at Microsoft.TeamFoundation.WorkItemTracking.Client.LinkCollection.get_Count()
   at Microsoft.TeamFoundation.WorkItemTracking.Common.Enumerator`1.MoveNext()
   at MigrationTools.Endpoints.TfsWorkItemConvertor.GetLinkItems(LinkCollection tfsLinks) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\Endpoints\TfsWorkItemConvertor.cs:line 96
   at MigrationTools.Endpoints.TfsWorkItemConvertor.MapWorkItemtoWorkItemData(WorkItemData context_wid, WorkItem context_wi, Dictionary`2 fieldsOfRevision) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\Endpoints\TfsWorkItemConvertor.cs:line 38
   at MigrationTools.TfsExtensions.RefreshWorkItem(WorkItemData context, Dictionary`2 fieldsOfRevision) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\TfsExtensions.cs:line 51
   at MigrationTools.TfsExtensions.AsWorkItemData(WorkItem context, Dictionary`2 fieldsOfRevision) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\TfsExtensions.cs:line 28
   at MigrationTools.TfsExtensions.ToWorkItemDataList(IList`1 collection) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\TfsExtensions.cs:line 169
   at MigrationTools._EngineV1.Clients.TfsWorkItemQuery.GetWorkItems() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemQuery.cs:line 27
   at MigrationTools._EngineV1.Clients.TfsWorkItemMigrationClient.GetWorkItems(String WIQLQuery) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemMigrationClient.cs:line 202
   at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 190
   at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools\_EngineV1\Processors\MigrationProcessorBase.cs:line 49
[11:04:45 ERR] [15.1.7-Preview.5] WorkItemMigration The Processor MigrationEngine entered the failed state...stopping run
[11:04:45 INF] [15.1.7-Preview.5] Command ExecuteMigrationCommand completed in 00:09:37.4974497


### What happened?

Description:
We downloaded the MigrationTools-15.1.7-Preview.5 version file and modified the source and target details in the configuration JSON file. Then we ran the tool using `devopsmigration execute -c configuration.json` to migrate the source and target.

While using the Azure DevOps Migration Tools version 15.1.7-Preview.5 to migrate work items, I encountered an error that halted the migration process. The error message is as follows:

I encountered an error while running WorkItemMigration using Azure DevOps Migration Tools. The migration process was interrupted with an IOException stating that an existing connection was forcibly closed by the remote host.

Request for Help:

1. Could you provide guidance on how to resolve this issue?
2. Are there any recommended settings or configurations to prevent this connection error?

### Debug in Visual Studio

- [X] Visual Studio Debug