Ocelot: UnableToCompleteRequestError #1852
-
I added logging to the API Gateway which uses Ocelot. This .Net Core 2.2 API is running on a linux server. It appears to route requests just fine. However, it never hits my middleware and instead is logging this exception from Ocelot.
Thoughts? Ideas? on what could be causing this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Can you share code hints of what and where you have put middleware? Also Oclelot, looks like something wrong with socket |
Beta Was this translation helpful? Give feedback.
-
Hi Clint ! Please attach more details: configuration JSON, and C# code of your module, startup config also.
Oh, this is quite old and legacy .NET framework! Finally, please upgrade your downstream .NET app from 2.2 to 6+ version. .NET 8 ideally. |
Beta Was this translation helpful? Give feedback.
Hi Clint !
Welcome to Ocelot world!
Please attach more details: configuration JSON, and C# code of your module, startup config also.
System.Net.Sockets.SocketException: Operation canceled
Seems your connection was aborted, canceled or closed by Websocket peer.
Oh, this is quite old and legacy .NET framework!
You have to update your downstream service running .NET Core 2.2.
Pay attention that Ocelot and downstream service can have different .NET versions which lead to malfunctioning of WebSocket and even HttpClient!
So, I would say this error could be .NET version (System.Net clients) incompatibility problem.
So, Ocelot or downstream s…