Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 404 response on any resource group containing an Application Gateway resource #39

Closed
nbrossman-work opened this issue Apr 28, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@nbrossman-work
Copy link

I've tried against multiple subscriptions and resource groups, they all seem to work except for resource groups containing Application Gateway resources. I get an HTTP 404 not found response, as seen below

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com//subscriptions/[removed]/resourceGroups/[removed]/providers/Microsoft.Network/applicationGateways/[removed]/frontendIPConfigurations/appGatewayFrontendIP?api-version=2016-09-01

Headers:
x-ms-client-request-id : [removed]
Accept-Language : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
NotFound

Headers:
Cache-Control : no-cache
Pragma : no-cache
Strict-Transport-Security : max-age=31536000; includeSubDomains
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-request-id : [removed]
x-ms-correlation-request-id : [removed]
x-ms-routing-request-id : [location]:20210428T131307Z:[removed]
X-Content-Type-Options : nosniff
Date : Wed, 28 Apr 2021 13:13:06 GMT

Body:
{
"Message": "No HTTP resource was found that matches the request URI 'https://[location].network.azure.com:30010/[removed]/132615493315838172/subscriptions/[removed]/resourceGroups/[removed]/providers/Microsoft.Network/applicationGateways/[removed]/frontendIPConfigurations/appGatewayFrontendIP?api-version=2016-09-01'."
}

Get-AzResource: PowerShell\Modules\AzViz\1.1.2\src\private\ConvertFrom-Network.ps1:90
Line |
90 | … toCateg = (Get-AzResource -ResourceId $to.ResourceId).Resour …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No HTTP resource was found that matches the request URI
| 'https://[location].network.azure.com:30010/[removed]/132615493315838172/subscriptions/[removed]/resourceGroups/[removed]/providers/Microsoft.Network/applicationGateways/[removed]/frontendIPConfigurations/appGatewayFrontendIP?api-version=2016-09-01'. StatusCode: 404 ReasonPhrase: Not Found OperationID : [removed]

Testing a little bit on my own, I get the same HTTP 404 response on the following uris
applicationGateways/[appgwname]/frontendIPConfigurations/appGatewayPublicIP?api-version=2016-09-01
applicationGateways/[appgwname]/backendAddressPools/[poolname1]?api-version=2016-09-01
applicationGateways/[appgwname]/backendAddressPools/[poolname2]?api-version=2016-09-01

@harrisoncattell
Copy link

I am also having the same issue, would love a fix!

@PrateekKumarSingh PrateekKumarSingh added the bug Something isn't working label May 14, 2021
@PrateekKumarSingh PrateekKumarSingh added this to the Release AzViz v1.2 milestone May 14, 2021
@jgriffiths014
Copy link

Looks like the same issue on Load Balancers:

No HTTP resource was found that matches the request URI 'https://northeurope.network.azure.com:30060/{removed}/132593330479865294/subscriptions/{removed}/resourceGroups/{removed}/pr
oviders/Microsoft.Network/loadBalancers/ilbcoplanuat01/inboundNatPools/LoadBalancerBEAddressNatPool?api-version=2016-09
-01'.
StatusCode: 404
ReasonPhrase: Not Found
OperationID :

@aidapsibr
Copy link

Same issue here with a gateway.

▶ Starting to generate Azure visualization... 179ms
▶ Exporting network associations for resource group: *
▶ Network watcher found: 'NetworkWatcher_*'
▶ Obtaining network topology using Network Watcher

Get-AzResource: Documents\PowerShell\Modules\AzViz\1.1.2\src\private\ConvertFrom-Network.ps1:90
Line |
90 | … toCateg = (Get-AzResource -ResourceId $to.ResourceId).Resour …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No HTTP resource was found that matches the request URI

@PrateekKumarSingh
Copy link
Owner

PrateekKumarSingh commented Jun 27, 2021

I was able to reproduce the issue when Get-AzResource cmdlet in the function ConvertFrom-Network attempts to get network associations of the resources in current resource group, or the current context.

REASON: Often network associations as not limited to current Resource group and point to different resource groups and even subscriptions in many cases, and when Get-AzResource -ResourceId xxxxxxx cmdlet attempts to get the resource object of any such association, it fails because either it is outside current context or permission issues.

'Export-AzViz' cmdlet as of today only intends to target all resources within the target resource groups and there is no need to visualize dependencies or network associations outside the resource group. So, to fix this: Only target Resource IDs which has target resource group in the string, and skip all external associations, see the below lines of code to understand what has been implemented👇

https://github.com/PrateekKumarSingh/AzViz/blob/master/AzViz/src/private/ConvertFrom-Network.ps1#L85-L88

At some later stage as and when this module evolves, I want to add a feature\enhancement to visualize any external dependencies as well, so creating another issue #58 and closing this one.

@akshaybhadoria1106
Copy link

Can any one tell what could be the reason for this error.

dot.exe : Warning: Two clusters named clusterWebPortal - the second will be ignored
At C:\Users\akshay.bhadoria\Documents\WindowsPowerShell\Modules\AzViz\1.2.1\src\private\ConvertTo-DOTLangauge.ps1:334 char:25

  •                     & $GraphViz.FullName $dot_file
    
  •                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (Warning: Two cl...will be ignored:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants