Open thepolyglotter opened 3 years ago
@thepolyglotter: We are facing a similar issue. Have you checked the logs on the self-hosted gateway?
If we try to connect a debugger , we see the following error on the gateway side:
[Info] XXXXXXXXXXXXXX, isRequestSuccess: False, totalTime: 0, category: GatewayLogs, callerIpAddress: XXXXXXXX, timeGenerated: XXXXXXXX, region: XXXXXXX, correlationId: XXXXXXXXXXXXXXXXX, method: GET, url: https://XXXXXXXXXXXX/debug-0123456789abcdef?key=XXXXXXXXXXXXXXXXXXXX, responseCode: 404, responseSize: 130, cache: none, clientProtocol: HTTP/1.0, clientTlsVersion: 1.2, lastError: { "source": "configuration", "reason": "OperationNotFound", "message": "Unable to match incoming request to an operation.", "section": "backend" }, correlationId: XXXXXXXXXXXXXXXX
Does anyone know what network connectivity is needed between the client (VS Code) and the server (self-hosted gateway)? Maybe a web-socket connection is required and this is blocked by a firewall sitting between VS Code and the gateway. I haven't checked this in detail in our infrastructure.
APIM Setup:
Problem statement:
When trying to debug policy from VS Code for APIs on self-hosted gateway, the bugging operation fails with 404 error which test of same API from VS code works fine.
Steps to reproduce problem:
Right-click on API Management instance and choose "Select Gateway Host Name"
A text field is activated at the top of VS Code with 2 choices in dropdown. Choose "Input a hostname (for self-hosted gateway)"
Enter the hostname "gc-api-dev-apimgwt.apps.xxxxxxxx.xxxxxxx.com" and press enter
Test operation on selected API --> Correct hostname is used.
Hit "Send Request" and response is 200 OK.
Right click on an operation of selected API and choose "Start Policy Debugging". Debugging tries to initialize and then stops. Nothing happens
Debug Console shows 404 error:
Version: 1.56.2 (user setup) Commit: 054a9295330880ed74ceaedda236253b4f39a335 Date: 2021-05-12T17:13:13.157Z Electron: 12.0.4 Chrome: 89.0.4389.114 Node.js: 14.16.0 V8: 8.9.255.24-electron.0 OS: Windows_NT x64 10.0.19042