Ocelot using Ocelot.Provider.Consul Service Discovery uses port 80 over https

11/21/2019

I am new to Ocelot and Consul service discovery. My problem is that Ocelot can get the service IP but when doing the actual rerouting it uses port 80 over https and I tried editing my service, ingress, and the ocelot.json to force 443 but with no luck. Please help. My app runs on azure, kubernetes and docker.

Please see the error below. Thanks in advance

Completed GET request to 'https://1.1.1.1/api/v1/namespaces/mynamespace/services/mywebapi-service' (OK).
dbug: Ocelot.DownstreamUrlCreator.Middleware.DownstreamUrlCreatorMiddleware[0]
      requestId: 0HLRED7HJNFUL:00000001, previousRequestId: no previous request id, message: Downstream url is https://1.2.1.16:80/myapi/api/1.0/messaging
dbug: Ocelot.Requester.Middleware.HttpRequesterMiddleware[0]
      requestId: 0HLRED7HJNFUL:00000001, previousRequestId: no previous request id, message: IHttpRequester returned an error, setting pipeline error
warn: Ocelot.Requester.Middleware.HttpRequesterMiddleware[0]
      requestId: 0HLRED7HJNFUL:00000001, previousRequestId: no previous request id, message: Error making http request, exception: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.IO.IOException: The handshake failed due to an unexpected packet format.
-- Alpheusms
consul
docker
kubernetes
ocelot

0 Answers