none
Connection error while deploying Azure Resource Group template with virtualNetworkConnections RRS feed

  • Question

  • I have a web API release pipeline that is deployment the resources (using Azure Resource Group Deployment task) and deploying our API.

    Our intention is to have a zero-downtime deployment, so we are testing it with JMeter running during the release process. What we've found is that during the resources deployment we are getting exceptions during some seconds. Checking the Application insights exceptions details we've found that the root cause is connection lost to our on-premise resources. Exception details are like:

    "Unable to connect to the remote server The requested address is not valid in its context [theIp]:80"

    To connect to the on-premise servers we use a virtualNetworkConnections,  like this:

    {
              "type": "Microsoft.Web/sites/slots/virtualNetworkConnections",
              "name": "[concat(variables('StagingSlotName'), '/', parameters('VNetName'))]",
              "apiVersion": "2016-08-01",
              "location": "[resourceGroup().location]",
              "properties": {
                "vnetResourceId": "[resourceId(parameters('VNetResourceGroup'), 'Microsoft.Network/virtualNetworks/',  parameters('VNetName'))]"
              },
              "dependsOn": [
                "[resourceId('Microsoft.Web/sites', variables('WebAppName'))]",
                "[resourceId('Microsoft.Web/sites/slots', variables('WebAppName'), parameters('StagingSlotName'))]"
              ]
            }

    The only option that we can think about now is that this definition is causing the VPN to be restarted somehow during the deployment.

    So, the question is: Is this a known bug that MS is going to solve? Is this a by-design functionality? Is there any thing that we are doing wrongly, so there is a way to avoid this?

    If we can't make it work as it is we would need to create two release pipelines, one deploying the resources, to be executed only when needed, and the other release pipeline deploying the code. But I really think deploying both things together is the right way to do it...

    Thank you for your help!


    Note: This is a copy of StackOverflow question https://stackoverflow.com/questions/53389498/connection-error-while-deploying-azure-resource-group-template-with-virtualnetwo. 




    • Edited by LuisRC Thursday, November 22, 2018 9:23 AM
    Thursday, November 22, 2018 9:20 AM

All replies

  • If there are any changes to the existing connection object, then it is likely the VPN is re-established. If you would like to work around this issue, your best bet is to continue with a support request. if you do not have a support plan, please Email me at AzCommunity@microsoft.com with your subscriptionID and a link to this post, and I will enable a one-time free support request for your subscription to troubleshoot this further. 

    Tuesday, December 4, 2018 11:37 PM
    Moderator
  • Hi Travis,

    Thank you very much for your answer.

    I've requested a support ticket through my company account. If you find it interesting to link this message and the ticket, my ticket number is 118120425002411  

    Again, thank you! I hope we will be able to fix the issue.


    Luis

    Wednesday, December 5, 2018 1:33 PM