One of my requirement is hosting on premise Gateway into Azure API Management. I did following steps.
- I created Azure API Management Instance & Added on premise API using OpenApi Specification.
- created Azure Self Hosted Gateway (name - SelfGateway) into my APIM instance.
- The local docker instance is also working fine for me. its giving results using Postman Tool.
- I successfully ran following command & post execute below command show self hosted gateway showing => 1 instance(s), last heartbeat at 10:09:45 PM.
docker run -d -p 80:8080 -p 443:8081 --name SelfGateway --env-file env.conf mcr.microsoft.com/azure-api-management/gateway:v2
- When i am trying to access API using Postman from Azure APIM its throwing following error under docker Logs
[Info] 2022-12-9T11:59:30.017, isRequestSuccess: False, totalTime: 3, category: GatewayLogs, callerIpAddress: 172.17.0.1, timeGenerated: 12/09/2022 11:59:30, region: Pune, correlationId: de1661e8-f882-4fe5-9922-4a979ffea595, method: GET, url: http://localhost/WeatherForecast, responseCode: 500, responseSize: 191, cache: none, backendTime: 2, apiId: webapicore, operationId: GetWeatherForecast, clientProtocol: HTTP/1.1, apiRevision: 1, backendMethod: GET, backendUrl: http://localhost/WeatherForecast, lastError: {
"elapsed": 2,
"source": "request-forwarder",
"path": "forward-request\forward-request",
"reason": "BackendConnectionFailure",
"message": "LogError connecting to 127.0.0.1:80",
"section": "backend",
"transportErrorCode": 111
}, errors: [
{
"elapsed": 2,
"source": "request-forwarder",
"path": "forward-request\forward-request",
"reason": "BackendConnectionFailure",
"message": "LogError connecting to 127.0.0.1:80",
"section": "backend",
"transportErrorCode": 111
}
], correlationId: de1661e8-f882-4fe5-9922-4a979ffea595
[Info] 2022-12-9T11:59:53.359 [QuotaCounterSyncSkipped], source: QuotaByKeyCounterService
[Info] 2022-12-9T11:59:53.359 [QuotaCounterApplyGlobalStateSkipped], message: No quota-counters changes retrieved from global state, source: QuotaByKeyCounterService
[Info] 2022-12-9T12:00:09.078 [DnsResolutionStarted], message: localhost, source: RoundRobinNameResolver
[Info] 2022-12-9T12:00:09.080 [DnsResolutionCompleted], message: localhost: [127.0.0.1], source: RoundRobinNameResolver
I am blocked unable to proceed further, please help @JananiRamesh-MSFT @MayankBargali-MSFT