Unable to deploy to Azure app service in ASE

We are migrating from an existing ASE and created a new ASE and app service, created new service prinicipal, configured new azure account but when we are trying to deploy code to the new app service it fails with the below error.

22:24:09Error
Microsoft.Web.Deployment.DeploymentAgentUnavailableException: Could not complete the request to remote agent URL ‘https://$Appservicename:password@appservice.scm.ase.appserviceenvironment.net/msdeploy.axd?site=appservicename’. —> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. —> 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.

Any additional configuration needs to be done ? or am i missing anything?

Hi @pari.shanmugam,

Thanks for reaching out! Sorry to hear you’re having issues.

It seems as though there’s a network block stopping the connection. Are you able to check firewalls or any other security feature within the ASE that could interfere with communication?

A good test would perhaps be to try deploying to the app service outside of Octopus from the same machine that you’re experiencing the issue on - to confirm whether the issue is Octopus specific or not. Hopefully, we can troubleshoot further from there!

Please let me know if you have any further issues or questions or if this helps get you unblocked!

Kind Regards,
Adam

We have ports 80, 443 open on the octopus server and also checked at the firewall level. We have another ASE to which we can deploy by changing the azure account.

@pari.shanmugam,

Thanks for getting back to me and checking those settings.
Are you able to upload the raw task log for one of these failed deployments please so that I may look into this further for you?

Kind Regards,
Adam

OctopusDeploy-failedlogs.txt (10.1 KB)

Hi @pari.shanmugam,

Thank you so much for providing the logs - I wonder, are you able to check for me that you can deploy to that ASE outside of Octopus from the same machine? So that we can determine where the issue itself lies.

If you’re able to do that and let me know the result we can progress more on finding a solution.

Further to this, can you please double check your settings on the ASE are identical to the working one on the Azure side? Just to keep things consistent with what works already.

If you have further questions or issues please come back and let us know.

Kind Regards,
Adam

I can deploy from visual studio to the app service from the same machine that I am doing Octopus deployments. Only difference between the ASE’s that I can think of, is the current new ASE uses the microsoft ase domain but the old ase uses different domain name with its certificate.

Hi @pari.shanmugam,

When I had a look at your logs, I noticed that you appear to be running Octopus server version 3.3.24.

Since version 3.3.24 was released, there have been some changes in Azure that we have had to incorporate into Octopus to continue to support these features.

As this is the case, I recommend you update your version of Octopus Server.
You can compare your version to other versions using our release compare tool. Please note any potentially breaking changes listed when making a comparison - this will help you decide if the change will affect you.

Also, it may be worth looking at our Installation Requirements to give you an idea of other infrastructure that Octopus Server may require for more recent versions.

Please let me know how you decide to proceed, and if you require further advice or have any questions, please be in touch!

Kind Regards,
Adam

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.