nkdAgility/azure-devops-migration-tools

[Bug]: WorkItemMigration Fails with IOException

SathishkumarG3 opened this issue · 1 comments

Version

  • I confirm that I am using the latest version

Source Version

Azure DevOps Service

Target Version

Azure DevOps Service

Relevant configuration

{
  "ChangeSetMappingFile": null,
  "Source": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "xxxxxxxxxxxxx",
    "Project": "Americas",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AuthenticationMode": "AccessToken",
    "PersonalAccessToken": "xxxxxxxxxxxxx",
    "PersonalAccessTokenVariableName": "",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    },
    "CollectionName": "xxxxxxxxxxxxx/"
  },
  "Target": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "xxxxxxxxxxxxx",
    "Project": "neXus App",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AllowCrossProjectLinking": true,
    "AuthenticationMode": "AccessToken",
    "PersonalAccessToken": "xxxxxxxxxxxxx",
    "PersonalAccessTokenVariableName": "",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    },
    "CollectionName": "xxxxxxxxxxxxx"
  },
  "FieldMaps": [],
  "GitRepoMapping": {},
  "LogLevel": "Information",
  "CommonEnrichersConfig": [],
  "Processors": [
    {
      "$type": "WorkItemMigrationConfig",
      "Enabled": true,
      "UpdateCreatedDate": true,
      "UpdateCreatedBy": true,
      "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps', 'Shared Parameter', 'Feedback Request') AND [System.AreaPath] UNDER 'Americas\\neXus' AND [System.Id] NOT IN (4601) ORDER BY [System.ChangedDate] DESC",
      "FixHtmlAttachmentLinks": true,
      "WorkItemCreateRetryLimit": 5,
      "FilterWorkItemsThatAlreadyExistInTarget": false,
      "PauseAfterEachWorkItem": false,
      "AttachRevisionHistory": false,
      "GenerateMigrationComment": false,
      "WorkItemIDs": null,
      "MaxGracefulFailures": 0,
      "SkipRevisionWithInvalidIterationPath": false,
      "SkipRevisionWithInvalidAreaPath": false,
      "SkipOnError": true
    }
  ],
  "Version": "15.1",
  "workaroundForQuerySOAPBugEnabled": false,
  "WorkItemTypeDefinition": {
    "sourceWorkItemTypeName": "targetWorkItemTypeName"
  },
  "Endpoints": {
    "InMemoryWorkItemEndpoints": [
      {
        "Name": "Source",
        "EndpointEnrichers": null
      },
      {
        "Name": "Target",
        "EndpointEnrichers": null
      }
    ]
  }
}

Relevant log output

Please provide how to skip the received errors and how to skip a particular work item

What happened?

Issue Description:

The WorkItemMigration process encountered a critical error during execution. The migration failed due to an IOException caused by the remote host forcibly closing the connection. The detailed stack trace indicates an issue with reading data from the transport connection.

Error Details:

Error Message:


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.ReadByte()
   at System.Xml.EncodingStreamWrapper.ReadBOMEncoding(Boolean notOutOfBand)
   at System.Xml.EncodingStreamWrapper..ctor(Stream stream, Encoding encoding)
   at System.Xml.XmlUTF8TextReader.SetInput(Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
   at Microsoft.TeamFoundation.Client.Channels.TfsSoapMessageEncoder.ReadMessage(Stream stream)
   at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.ReadMessage(HttpWebResponse webResponse, WebException webException, Stream responseStream, Boolean& closeResponse)
   at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.ReadResponse(HttpWebResponse webResponse, WebException webException)
   at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequest()
   at Microsoft.TeamFoundation.Client.Channels.TfsHttpRequestChannel.Request(TfsMessage message, TimeSpan timeout)
   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.Proxy.WorkItemServer.GetWorkItem(String requestId, Int32 workItemId, Int32 revisionId, Int32 minimumRevisionId, Nullable`1 asOfDate, Boolean useMaster, IWorkItemRowSets& workItem, MetadataTableHaveEntry[] metadataHave, String& dbStamp, IMetadataRowSets& 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

Error Code: System.IO.IOException

File: TfsWorkItemConvertor.cs (Line 96)

Method: GetLinkItems

Stack Trace: See attached error log.

Steps to Reproduce:

Run the WorkItemMigration process.
Observe the error message indicating an existing connection was forcibly closed by the remote host.
Expected Behavior:

The WorkItemMigration process should complete without errors and migrate the work items successfully.

Actual Behavior:

The migration fails with an IOException, and the process halts.

Additional Information:

Ensure that the connection to the remote host is stable.
Verify that there are no network interruptions or firewall issues.
Attachments:

Error log file
Any relevant screenshots or additional context
Priority: High

Environment:

Version: 15.1.7-Preview.5

Debug in Visual Studio

  • Visual Studio Debug

This does not look like a bug with out tool, but instead an error with TFS.

Is this ADO or local TFS? Which version?