PolyDeploy icon indicating copy to clipboard operation
PolyDeploy copied to clipboard

An error occurred while sending the request.

Open pankajmittal2006 opened this issue 4 years ago • 8 comments

I am getting the below error while deploying the extensions to DNN stage site: 2021-07-22T13:57:23.9783440Z System.Net.Http.HttpRequestException | An error occurred while sending the request. 2021-07-22T13:57:24.0224123Z at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2021-07-22T13:57:24.0224748Z at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2021-07-22T13:57:24.0225261Z at DeployClient.API.<CreateSessionAsync>d__2.MoveNext() in C:\DNNDev\CantarusCore\PolyDeploy\DeployClient\API.cs:line 37 2021-07-22T13:57:24.0225747Z --- End of stack trace from previous location where exception was thrown --- 2021-07-22T13:57:24.0226092Z at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2021-07-22T13:57:24.0226474Z at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2021-07-22T13:57:24.0227324Z at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) 2021-07-22T13:57:24.0227771Z at DeployClient.Program.<Main>d__2.MoveNext() in C:\DNNDev\CantarusCore\PolyDeploy\DeployClient\Program.cs:line 97 2021-07-22T13:57:24.0228313Z System.Net.WebException | The underlying connection was closed: An unexpected error occurred on a send. 2021-07-22T13:57:24.0282127Z at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) 2021-07-22T13:57:24.0282575Z at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar) 2021-07-22T13:57:24.0298227Z System.IO.IOException | Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. 2021-07-22T13:57:24.0395630Z at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) 2021-07-22T13:57:24.0396041Z at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) 2021-07-22T13:57:24.0396428Z at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) 2021-07-22T13:57:24.0396787Z System.Net.Sockets.SocketException | An existing connection was forcibly closed by the remote host 2021-07-22T13:57:24.0405894Z at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult) 2021-07-22T13:57:24.0406333Z at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) 2021-07-22T13:57:24.0655104Z ##[error]The process 'F:\Build\Agent2_work_tool\DeployClient.exe\0.9.3\x64\DeployClient.exe' failed with exit code 1 2021-07-22T13:57:24.0667359Z ##[error]Deploy failed 2021-07-22T13:57:24.0709072Z ##[section]Finishing: Deploy with Cantarus PolyDeploy

Kindly advice.

pankajmittal2006 avatar Jul 22 '21 14:07 pankajmittal2006

Depending on how long your site takes to restart after installing packages, it can fail to respond and give this error. There are planned improvements to the retry functionality that haven't made it into this repo yet. /cc @jmbockhorst

bdukes avatar Jul 22 '21 14:07 bdukes

@bdukes , I think this error comes before installing packages on the site. Kindly advice.

pankajmittal2006 avatar Jul 22 '21 14:07 pankajmittal2006

It's possible that there's a firewall or other appliance in front of the web server that is interfering with the connection. Or perhaps your DNN site requires a higher version of TLS than your deployment server supports by default?

bdukes avatar Jul 22 '21 14:07 bdukes

@bdukes , It is working in our Dev site and not working in Stage site. We have a planned production next week and don't know whether it will work in Production or not. Same Firewall rules applicable for all the environment as far as i know. Kindly advice.

pankajmittal2006 avatar Jul 22 '21 14:07 pankajmittal2006

I won't be able to troubleshoot the specifics of your environment, but please feel free to share any insights you find.

Remember that this is an open source project, so if you need to run the deploy client locally or use a modified version with extra logging, that's completely available to you.

Hope it helps!

bdukes avatar Jul 22 '21 14:07 bdukes

This definitely sounds environmental. I'd suggest returning to the previous advice offered by @bdukes .

WillStrohl avatar Aug 03 '21 01:08 WillStrohl

I'm finally running into this issue on a specific site, but we're not sure why. Something is indeed blocking it, though.

WillStrohl avatar Apr 04 '24 16:04 WillStrohl

Consider using the latest version of the new deploy client and see if you get any further insights into the error.

bdukes avatar Apr 04 '24 16:04 bdukes