Skip to content

Commit 5062081

Browse files
committed
vnet troubleshooting
1 parent 46e6eeb commit 5062081

File tree

2 files changed

+63
-5
lines changed

2 files changed

+63
-5
lines changed

articles/app-service/configure-gateway-required-vnet-integration.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Gateway-required virtual network integration is built on top of point-to-site VP
4949

5050
## Access on-premises resources
5151

52-
Apps can access on-premises resources by integrating with virtual networks that have site-to-site connections. If you use gateway-required virtual network integration, update your on-premises VPN gateway routes with your point-to-site address blocks. When the site-to-site VPN is first set up, the scripts used to configure it should set up routes properly. If you add the point-to-site addresses after you create your site-to-site VPN, you need to update the routes manually. Details on how to do that vary per gateway and aren't described here.
52+
Apps can access on-premises resources by integrating with virtual networks that have site-to-site connections. If you use gateway-required virtual network integration, update your on-premises VPN gateway routes with your point-to-site address blocks. When the site-to-site VPN is first set up, the scripts used to configure it should set up routes properly. If you add the point-to-site addresses after you create your site-to-site VPN, you need to update the routes manually. Details on how to do that varies per gateway and aren't described here.
5353

5454
BGP routes from on-premises won't be propagated automatically into App Service. You need to manually propagate them on the point-to-site configuration using the steps in this document [Advertise custom routes for P2S VPN clients](../vpn-gateway/vpn-gateway-p2s-advertise-custom-routes.md).
5555

@@ -101,4 +101,49 @@ Three charges are related to the use of the gateway-required virtual network int
101101

102102
## Troubleshooting
103103

104-
See [virtual network integration troubleshooting guide](/troubleshoot/azure/app-service/troubleshoot-vnet-integration-apps) for more information on this topic.
104+
Many things can prevent your app from reaching a specific host and port. Most of the time it's one of these things:
105+
106+
* **A firewall is in the way.** If you have a firewall in the way, you hit the TCP timeout. The TCP timeout is 21 seconds in this case. Use the **tcpping** tool to test connectivity. TCP timeouts can be caused by many things beyond firewalls, but start there.
107+
* **DNS isn't accessible.** The DNS timeout is 3 seconds per DNS server. If you have two DNS servers, the timeout is 6 seconds. Use nameresolver to see if DNS is working. You can't use nslookup, because that doesn't use the DNS your virtual network is configured with. If inaccessible, you could have a firewall or NSG blocking access to DNS or it could be down.
108+
109+
If those items don't answer your problems, look first for things like:
110+
111+
* Is the point-to-site address range in the RFC 1918 ranges (10.0.0.0-10.255.255.255 / 172.16.0.0-172.31.255.255 / 192.168.0.0-192.168.255.255)?
112+
* Does the gateway show as being up in the portal? If your gateway is down, then bring it back up.
113+
* Do certificates show as being in sync, or do you suspect that the network configuration was changed? If your certificates are out of sync or you suspect that a change was made to your virtual network configuration that wasn't synced with your ASPs, select **Sync Network**.
114+
* If you're going across a VPN, is the on-premises gateway configured to route traffic back up to Azure? If you can reach endpoints in your virtual network but not on-premises, check your routes.
115+
* Are you trying to use a coexistence gateway that supports both point to site and ExpressRoute? Coexistence gateways aren't supported with virtual network integration.
116+
117+
Debugging networking issues is a challenge because you can't see what's blocking access to a specific host:port combination. Some causes include:
118+
119+
* You have a firewall up on your host that prevents access to the application port from your point-to-site IP range. Crossing subnets often requires public access.
120+
* Your target host is down.
121+
* Your application is down.
122+
* You had the wrong IP or hostname.
123+
* Your application is listening on a different port than what you expected. You can match your process ID with the listening port by using "netstat -aon" on the endpoint host.
124+
* Your network security groups are configured in such a manner that they prevent access to your application host and port from your point-to-site IP range.
125+
126+
You don't know what address your app actually uses. It could be any address in the point-to-site address range, so you need to allow access from the entire address range.
127+
128+
More debug steps include:
129+
130+
* Connect to a VM in your virtual network and attempt to reach your resource host:port from there. To test for TCP access, use the PowerShell command **Test-NetConnection**. The syntax is:
131+
132+
```powershell
133+
Test-NetConnection hostname [optional: -Port]
134+
```
135+
136+
* Bring up an application on a VM and test access to that host and port from the console from your app by using **tcpping**.
137+
138+
### On-premises resources
139+
140+
If your app can't reach a resource on-premises, check if you can reach the resource from your virtual network. Use the **Test-NetConnection** PowerShell command to check for TCP access. If your VM can't reach your on-premises resource, your VPN or ExpressRoute connection might not be configured properly.
141+
142+
If your virtual network-hosted VM can reach your on-premises system but your app can't, the cause is likely one of the following reasons:
143+
144+
* Your routes aren't configured with your subnet or point-to-site address ranges in your on-premises gateway.
145+
* Your network security groups are blocking access for your point-to-site IP range.
146+
* Your on-premises firewalls are blocking traffic from your point-to-site IP range.
147+
* You're trying to reach a non-RFC 1918 address by using the regional virtual network integration feature.
148+
149+
For more information, see [virtual network integration troubleshooting guide](/troubleshoot/azure/app-service/troubleshoot-vnet-integration-apps).

articles/app-service/overview-vnet-integration.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Apps in App Service are hosted on worker roles. Virtual network integration work
5959

6060
When virtual network integration is enabled, your app makes outbound calls through your virtual network. The outbound addresses that are listed in the app properties portal are the addresses still used by your app. However, if your outbound call is to a virtual machine or private endpoint in the integration virtual network or peered virtual network, the outbound address will be an address from the integration subnet. The private IP assigned to an instance is exposed via the environment variable, WEBSITE_PRIVATE_IP.
6161

62-
When all traffic routing is enabled, all outbound traffic is sent into your virtual network. If all traffic routing isn't enabled, only private traffic (RFC1918) and service endpoints configured on the integration subnet will be sent into the virtual network, and outbound traffic to the internet will be routed directly from the app.
62+
When all traffic routing is enabled, all outbound traffic is sent into your virtual network. If all traffic routing isn't enabled, only private traffic (RFC1918) and service endpoints configured on the integration subnet will be sent into the virtual network. Outbound traffic to the internet will be routed directly from the app.
6363

6464
The feature supports two virtual interfaces per worker. Two virtual interfaces per worker mean two virtual network integrations per App Service plan. The apps in the same App Service plan can only use one of the virtual network integrations to a specific subnet. If you need an app to connect to more virtual networks or more subnets in the same virtual network, you need to create another App Service plan. The virtual interfaces used aren't resources customers have direct access to.
6565

@@ -143,7 +143,7 @@ App settings using Key Vault references will attempt to get secrets over the pub
143143

144144
You can use route tables to route outbound traffic from your app without restriction. Common destinations can include firewall devices or gateways. You can also use a [network security group](../virtual-network/network-security-groups-overview.md) (NSG) to block outbound traffic to resources in your virtual network or the internet. An NSG that's applied to your integration subnet is in effect regardless of any route tables applied to your integration subnet.
145145

146-
Route tables and network security groups only apply to traffic routed through the virtual network integration. See [application routing](#application-routing) and [configuration routing](#configuration-routing) for details. Routes won't apply to replies from inbound app requests and inbound rules in an NSG don't apply to your app because virtual network integration affects only outbound traffic from your app. To control inbound traffic to your app, use the [access restrictions](./overview-access-restrictions.md) feature or [private endpoints](./networking/private-endpoint.md).
146+
Route tables and network security groups only apply to traffic routed through the virtual network integration. See [application routing](#application-routing) and [configuration routing](#configuration-routing) for details. Routes won't apply to replies from inbound app requests and inbound rules in an NSG don't apply to your app. Virtual network integration affects only outbound traffic from your app. To control inbound traffic to your app, use the [access restrictions](./overview-access-restrictions.md) feature or [private endpoints](./networking/private-endpoint.md).
147147

148148
When configuring network security groups or route tables that applies to outbound traffic, you must make sure you consider your application dependencies. Application dependencies include endpoints that your app needs during runtime. Besides APIs and services the app is calling, these endpoints could also be derived endpoints like certificate revocation list (CRL) check endpoints and identity/authentication endpoint, for example Azure Active Directory. If you're using [continuous deployment in App Service](./deploy-continuous-deployment.md), you might also need to allow endpoints depending on type and language. Specifically for [Linux continuous deployment](https://github.com/microsoft/Oryx/blob/main/doc/hosts/appservice.md#network-dependencies), you'll need to allow `oryx-cdn.microsoft.io:443`.
149149

@@ -210,8 +210,21 @@ The virtual network integration feature has no extra charge for use beyond the A
210210

211211
## Troubleshooting
212212

213+
The feature is easy to set up, but that doesn't mean your experience will be problem free. If you encounter problems accessing your desired endpoint, there are various steps you can take depending on what you are observing. For more information, see [virtual network integration troubleshooting guide](/troubleshoot/azure/app-service/troubleshoot-vnet-integration-apps).
214+
213215
> [!NOTE]
214216
> * Virtual network integration isn't supported for Docker Compose scenarios in App Service.
215217
> * Access restrictions does not apply to traffic coming through a private endpoint.
216218
217-
See [virtual network integration troubleshooting guide](/troubleshoot/azure/app-service/troubleshoot-vnet-integration-apps) for more information on this topic.
219+
### Deleting the App Service plan or app before disconnecting the network integration
220+
221+
If you deleted the app or the App Service plan without disconnecting the virtual network integration first, you won't be able to do any update/delete operations on the virtual network or subnet that was used for the integration with the deleted resource. A subnet delegation 'Microsoft.Web/serverFarms' will remain assigned to your subnet and will prevent the update/delete operations.
222+
223+
In order to do update/delete the subnet or virtual network again, you need to re-create the virtual network integration, and then disconnect it:
224+
1. Re-create the App Service plan and app (it's mandatory to use the exact same web app name as before).
225+
1. Navigate to **Networking** on the app in Azure portal and configure the virtual network integration.
226+
1. After the virtual network integration is configured, select the 'Disconnect' button.
227+
1. Delete the App Service plan or app.
228+
1. Update/Delete the subnet or virtual network.
229+
230+
If you still encounter issues with the virtual network integration after following these steps, contact Microsoft Support.

0 commit comments

Comments
 (0)