在发送post请求到 negotiate时,ocelot里提示
requestId: 0HM4FAJCPR76R:00000001, previousRequestId: no previous request id, message: Error Code: UnableToCompleteRequestError Message: Error making http request, exception: System.Net.Http.HttpRequestException: Resource temporarily unavailable ---> System.Net.Sockets.SocketException: Resource temporarily unavailable
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
at System.Threading.Tasks.ValueTask1.get_Result() at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Threading.Tasks.ValueTask
1.get_Result()
at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask1 creationTask) at System.Threading.Tasks.ValueTask
1.get_Result()
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
at Ocelot.Requester.HttpClientHttpRequester.GetResponse(DownstreamContext context) errors found in ResponderMiddleware. Setting error response for request path:/kf/negotiate, request method: POST
整个项目的流程是这样的:
请求->nginx->ocelot->api+signalr
网上g了,stackoverflow也翻了,各种试了,看看有没有大神遇到过同样的问题
先直接connect到api, 在测试ocelot+api, 在测试nginx+ocelot+api, 总归是某个地方的设置有问题.
去掉ocelot是通的
@锋博: 你的这个核心错误是 Resource temporarily unavailable
503 哎, 确定配置没问题哦
@czd890: 嗯,别的资源访问正常
stackoverflow 上的这篇试过么?
https://stackoverflow.com/questions/63472028/ocelot-not-passing-websockets-to-microservice
谢谢回复,我的中间件启用顺序是正确的
确实是ocelot的版本不支持
你好,请问你最后解决这个问题了嘛?
确实是ocelot的版本不支持
– 锋博 3年前