WikiTransformationProject / wikitraccs-releases

Releases, issues and discussions for WikiTraccs from the Wiki Transformation Project
https://www.wikitransformationproject.com
10 stars 1 forks source link

[Bug] System.Net.WebException: An Error occured while sending the request #97

Closed PretoPlasma closed 11 months ago

PretoPlasma commented 1 year ago

Is there an existing issue for this?

Current Behavior

During the migration process the tool throws different exceptions:

System.Net.WebException: An error occurred while sending the request.
 ---> System.Net.Http.HttpRequestException: An error occurred while sending the request.
 ---> System.IO.IOException: The response ended prematurely.
   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at System.Net.HttpWebRequest.SendRequest(Boolean async)
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
   at Microsoft.SharePoint.Client.SPWebRequestExecutor.ExecuteAsync()
   at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServerAsync(ChunkStringBuilder sb)
   at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryAsync()
   at Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQueryAsync()
   at Microsoft.SharePoint.Client.ClientContext.ExecuteQueryAsync()
   at Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryImplementation(ClientRuntimeContext clientContext, Int32 retryCount, String userAgent) in /_/src/lib/PnP.Framework/Extensions/ClientContextExtensions.cs:line 182
   at Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryImplementation(ClientRuntimeContext clientContext, Int32 retryCount, String userAgent) in /_/src/lib/PnP.Framework/Extensions/ClientContextExtensions.cs:line 305
   at Microsoft.SharePoint.Client.ClientObjectExtensions.EnsurePropertiesImplementation[T](T clientObject, Expression`1[] propertySelector) in /_/src/lib/PnP.Framework/Extensions/ClientObjectExtensions.cs:line 193
   at Microsoft.SharePoint.Client.ClientObjectExtensions.EnsureProperties[T](T clientObject, Expression`1[] propertySelector) in /_/src/lib/PnP.Framework/Extensions/ClientObjectExtensions.cs:line 137
   at PnP.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.ApplyRemoteTemplate(Web web, ProvisioningTemplate template, ProvisioningTemplateApplyingInformation provisioningInfo, Boolean calledFromHierarchy, TokenParser tokenParser) in /_/src/lib/PnP.Framework/Provisioning/ObjectHandlers/SiteToTemplateConversion.cs:line 470
   at Microsoft.SharePoint.Client.WebExtensions.ApplyProvisioningTemplate(Web web, ProvisioningTemplate template, ProvisioningTemplateApplyingInformation applyingInformation) in /_/src/lib/PnP.Framework/Extensions/WebExtensions.cs:line 1182
   at WikiTraccs.Shared.Stores.SPO.SpoStoreBase.<>c__DisplayClass17_1.BlcIIGOv49()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at WikiTraccs.Shared.Stores.SPO.SpoStoreBase.ApplyProvisioningTemplateAsync(ConfluenceDataContext cfContext, PnPContext pnpContext, ProvisioningTemplate provisioningTemplate, CancellationToken cancellationToken)
   at WikiTraccs.Console.Stores.SPO.SpoContentStore.StoreInSpoAsync(TransformationContext trafoCtx, ProvisioningRequest provisioningRequest, CancellationToken cancellationToken)
   at WikiTraccs.Console.Registries.ConfluenceContentRegistry.StoreInSpoAsync(TransformationContext trafoCtx, ProvisioningRequest provisioningRequest, CancellationToken cancellationToken)
ExecuteQuery threw following exception: System.Net.WebException: An error occurred while sending the request.
 ---> System.Net.Http.HttpRequestException: An error occurred while sending the request.
 ---> System.IO.IOException:  Received an unexpected EOF or 0 bytes from the transport stream.
   at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](TIOAdapter adapter)
   at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](TIOAdapter adapter, Memory`1 buffer)
   at System.Net.Http.HttpConnection.InitialFillAsync(Boolean async)
   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at System.Net.HttpWebRequest.SendRequest(Boolean async)
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
   at Microsoft.SharePoint.Client.SPWebRequestExecutor.ExecuteAsync()
   at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServerAsync(ChunkStringBuilder sb)
   at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryAsync()
   at Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQueryAsync()
   at Microsoft.SharePoint.Client.ClientContext.ExecuteQueryAsync()
   at Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryImplementation(ClientRuntimeContext clientContext, Int32 retryCount, String userAgent) in /_/src/lib/PnP.Framework/Extensions/ClientContextExtensions.cs:line 182
TraceCorrelationId: 2a57eca0-f0ba-7000-a343-2132c41d7215
Url: https://edeka.sharepoint.com/sites/PisTest
. 0ms  | WikiTraccs.Console.Program

The first exception was anounced with:

Got an error while provisioning pages and attachments: An error occurred while sending the request. (this is try 1 of 4)

As a result, the migration process stucks in the middle without any further progress....

Expected Behavior

It is expected, that the wikitraccs console either completes the migration process or outputs helpful information about what needs to be checked to avoid / fix the exceptions.

WikiTraccs Version

v1.7.4

Confluence Version

Confluence 7 (up to 7.17)

Confluence Data Center?

Relevant log output or page storage format

No response

Anything else?

No response

heinrich-ulbricht commented 1 year ago

@PretoPlasma This error indicates a connection reset during provisioning. This usually is caused by a networking issue. WikiTraccs will try again in this case.

  1. Is it happening for all pages, or just some?
  2. If you retry the migration, does it work or are always the same pages affected?
  3. Did you confirm that contents did not migrate, or are you concerned about errors you see in the log (which is fine)?
  4. Is the affected page being created in a later try? (If yes, all should be fine.)
  5. I saw such errors when WikiTraccs was running on AWS. Are you running WikiTraccs on an AWS service?

I can also take a look if you send me the common log files to support @ wikitransformationproject.com - this has more context.

PretoPlasma commented 1 year ago

@heinrich-ulbricht Thanks for your quick reply.

It has happened for just some pages. The content of some pages was not migrated. So the affected pages where not created. We do not run on AWS service.

In the meantime we downloaded the V1.9.0 and the last run was successful which is fine. So we can set this under investigation.

I am unsure if this is related to but we investigated also that the authentication was not run as usual. Usually we were asked to input credentials. However we now investigated that there were no pop up to input anything. As a workaround we changed to cookies.txt to keep the migration running. Are you aware of anything related to that?

heinrich-ulbricht commented 1 year ago

@PretoPlasma Ok good, regarding the connection issue.

Note that using the progress log files that WikiTraccs creates you can see if pages are still missing and then run the migration once again, to add missing page. I know you are automating the migration and this makes things more complicated. The alternative would be to get to the root of those connection issues.

The authentication not being run seems odd. In this case the common log files will be helpful to diagnose this further. Ever since Google changed their endpoints for downloading the Chrome driver I get more reports about endpoints being blocked. Weird. The log would have more on that and I would have to look into that. Feel free to send them to support @ wikitransformationproject.com.

Good idea with the cookies.txt.

If the logs indicate that a missing Chrome web driver is the issue, then the docs on how to cope with that will help as well, but cookies.txt always should be the ultimate fix.

PretoPlasma commented 1 year ago

@heinrich-ulbricht: Thanks for your offer helping by looking into some log files. However I was not able to send Mails to support@wikitransformationprojekt.com. Can you pls confirm that anything is ok with receiving mails on your side?

heinrich-ulbricht commented 1 year ago

@PretoPlasma It's project, not projekt. :)

PretoPlasma commented 1 year ago

@heinrich-ulbricht That makes sense. :-D thanks for that hint. A link to our logfiles should arrive soon. :-)

PretoPlasma commented 1 year ago

@heinrich-ulbricht did you receive my mail?

heinrich-ulbricht commented 1 year ago

@PretoPlasma No, nothing. Could you try contact @ wikitransformationproject.com instead? And I'll double check.

heinrich-ulbricht commented 1 year ago

@PretoPlasma I can confirm that there was a configuration issue on the "support@" email address. "contact@" would've worked. Sorry, and good that you checked back here.

PretoPlasma commented 1 year ago

@heinrich-ulbricht Thanks for that. I started another transfer. Please do not hesitate to let me know if you received it.

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 20 days with no activity. Remove stale label or comment, or this will be closed in 10 days.

github-actions[bot] commented 11 months ago

This issue was closed because it has been stalled for 10 days with no activity.