簡體   English   中英

請求仍然失敗 WSO2 API Manager 3.2.0 高可用性端點

[英]Request still failing with WSO2 API Manager 3.2.0 high availability endpoints

我們已經配置了 API 端點的高可用性,如此處所述https://apim.docs.wso2.com/en/3.2.0/learn/design-api/endpoints/high-availability-for-endpoints/#configuring-負載平衡端點

配置如下

EndpointType: Load Balanced
Endpoint Suspension State:
ErrorCode = Connection Failed and Connection Closed
Initial Duration = 1800000
Max Duration = 1800000
Factor = 1

EndPoint Timeout State:
Retries Before Suspension = 2
Retry Delay = 15000

使用上述設置,一些請求仍然被路由到掛起的端點並且失敗,盡管端點已經掛起 state。

失敗響應

{
  "fault": {
    "code": 303000,
    "type": "Status report",
    "message": "Runtime Error",
    "description": "Failover endpoint : NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint - no ready child endpoints"
  }
}

{
  "fault": {
    "code": 101503,
    "type": "Status report",
    "message": "Runtime Error",
    "description": "Error connecting to the back end"
  }
}

錯誤信息如下

TID: [-1] [] [2023-01-09 12:25:48,776]  WARN {org.apache.synapse.transport.passthru.ConnectCallback} - Connection refused or failed for : /100.66.213.31:7010
TID: [-1234] [] [2023-01-09 12:25:48,777]  WARN {org.apache.synapse.endpoints.EndpointContext} - Endpoint : NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0 with address http://100.66.213.31:7010/mcm-provider is marked as TIMEOUT and will be retried : 1 more time/s after : Mon Jan 09 12:26:03 UTC 2023 until its marked SUSPENDED for failure
TID: [-1234] [] [2023-01-09 12:25:48,777]  WARN {org.apache.synapse.endpoints.LoadbalanceEndpoint} - Endpoint [NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint] Detect a Failure in a child endpoint : Endpoint [NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0]
TID: [-1234] [] [2023-01-09 12:25:48,778]  INFO {org.apache.synapse.mediators.builtin.LogMediator} - {api:admin--NewMCMInboundChannel-RESTAPIService:vv2} STATUS = Executing default 'fault' sequence, ERROR_CODE = 101503, ERROR_MESSAGE = Error connecting to the back end
TID: [-1] [] [2023-01-09 12:27:26,156]  WARN {org.apache.synapse.transport.passthru.ConnectCallback} - Connection refused or failed for : /100.66.213.31:7010
TID: [-1234] [] [2023-01-09 12:27:26,158]  WARN {org.apache.synapse.endpoints.EndpointContext} - Endpoint : NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0 with address http://100.66.213.31:7010/mcm-provider is marked as TIMEOUT and will be retried : 0 more time/s after : Mon Jan 09 12:27:41 UTC 2023 until its marked SUSPENDED for failure
TID: [-1234] [] [2023-01-09 12:27:26,158]  WARN {org.apache.synapse.endpoints.LoadbalanceEndpoint} - Endpoint [NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint] Detect a Failure in a child endpoint : Endpoint [NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0]
TID: [-1234] [] [2023-01-09 12:27:26,158]  INFO {org.apache.synapse.mediators.builtin.LogMediator} - {api:admin--NewMCMInboundChannel-RESTAPIService:vv2} STATUS = Executing default 'fault' sequence, ERROR_CODE = 101503, ERROR_MESSAGE = Error connecting to the back end
TID: [-1] [] [2023-01-09 12:31:36,455]  WARN {org.apache.synapse.transport.passthru.ConnectCallback} - Connection refused or failed for : /100.66.213.31:7010
TID: [-1234] [] [2023-01-09 12:31:36,459]  INFO {org.apache.synapse.endpoints.EndpointContext} - Endpoint : NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0 with address http://100.66.213.31:7010/mcm-provider has been marked for SUSPENSION, but no further retries remain. Thus it will be SUSPENDED.
TID: [-1234] [] [2023-01-09 12:31:36,459]  WARN {org.apache.synapse.endpoints.EndpointContext} - Suspending endpoint : NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0 with address http://100.66.213.31:7010/mcm-provider - current suspend duration is : 1800000ms - Next retry after : Mon Jan 09 13:01:36 UTC 2023
TID: [-1234] [] [2023-01-09 12:31:36,460]  WARN {org.apache.synapse.endpoints.LoadbalanceEndpoint} - Endpoint [NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint] Detect a Failure in a child endpoint : Endpoint [NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0]
TID: [-1234] [] [2023-01-09 12:31:36,460]  INFO {org.apache.synapse.mediators.builtin.LogMediator} - {api:admin--NewMCMInboundChannel-RESTAPIService:vv2} STATUS = Executing default 'fault' sequence, ERROR_CODE = 101503, ERROR_MESSAGE = Error connecting to the back end

讓我使用您的錯誤日志描述場景。

假設您有端點 0 和端點 1。

端點 1 按預期工作,端點 0 是錯誤的端點。 您已經為端點 2 配置了上述超時和暫停配置。

  1. Endpoint_0 收到請求,但已超時。 由於您已將 2 配置為重試限制,因此它將再嘗試兩次並暫停請求,直到端點暫停持續時間。 由於已超時,服務器將暫時掛起此端點 15000 毫秒(重試延遲)。 在此之前,endpoint_1 為流量提供服務。
TID: [-1] [] [2023-01-09 12:25:48,776]  WARN {org.apache.synapse.transport.passthru.ConnectCallback} - Connection refused or failed for : /100.66.213.31:7010
TID: [-1234] [] [2023-01-09 12:25:48,777]  WARN {org.apache.synapse.endpoints.EndpointContext} - Endpoint : NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0 with address http://100.66.213.31:7010/mcm-provider is marked as TIMEOUT and will be retried : 1 more time/s after : Mon Jan 09 12:26:03 UTC 2023 until its marked SUSPENDED for failure
TID: [-1234] [] [2023-01-09 12:25:48,777]  WARN {org.apache.synapse.endpoints.LoadbalanceEndpoint} - Endpoint [NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint] Detect a Failure in a child endpoint : Endpoint [NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0]
TID: [-1234] [] [2023-01-09 12:25:48,778]  INFO {org.apache.synapse.mediators.builtin.LogMediator} - {api:admin--NewMCMInboundChannel-RESTAPIService:vv2} STATUS = Executing default 'fault' sequence, ERROR_CODE = 101503, ERROR_MESSAGE = Error connecting to the back end
  1. 15000 毫秒后,endpoint_0 將服務於另一個請求。 這也超時,將被標記為暫停另外 15000 毫秒。
TID: [-1] [] [2023-01-09 12:27:26,156]  WARN {org.apache.synapse.transport.passthru.ConnectCallback} - Connection refused or failed for : /100.66.213.31:7010
TID: [-1234] [] [2023-01-09 12:27:26,158]  WARN {org.apache.synapse.endpoints.EndpointContext} - Endpoint : NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0 with address http://100.66.213.31:7010/mcm-provider is marked as TIMEOUT and will be retried : 0 more time/s after : Mon Jan 09 12:27:41 UTC 2023 until its marked SUSPENDED for failure
TID: [-1234] [] [2023-01-09 12:27:26,158]  WARN {org.apache.synapse.endpoints.LoadbalanceEndpoint} - Endpoint [NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint] Detect a Failure in a child endpoint : Endpoint [NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0]
TID: [-1234] [] [2023-01-09 12:27:26,158]  INFO {org.apache.synapse.mediators.builtin.LogMediator} - {api:admin--NewMCMInboundChannel-RESTAPIService:vv2} STATUS = Executing default 'fault' sequence, ERROR_CODE = 101503, ERROR_MESSAGE = Error connecting to the back end
  1. 對 endpoint_0 的第三個連續請求已超時,並且沒有任何重試。 端點將被標記為暫停,直到暫停持續時間。
TID: [-1] [] [2023-01-09 12:31:36,455]  WARN {org.apache.synapse.transport.passthru.ConnectCallback} - Connection refused or failed for : /100.66.213.31:7010
TID: [-1234] [] [2023-01-09 12:31:36,459]  INFO {org.apache.synapse.endpoints.EndpointContext} - Endpoint : NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0 with address http://100.66.213.31:7010/mcm-provider has been marked for SUSPENSION, but no further retries remain. Thus it will be SUSPENDED.
TID: [-1234] [] [2023-01-09 12:31:36,459]  WARN {org.apache.synapse.endpoints.EndpointContext} - Suspending endpoint : NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0 with address http://100.66.213.31:7010/mcm-provider - current suspend duration is : 1800000ms - Next retry after : Mon Jan 09 13:01:36 UTC 2023
TID: [-1234] [] [2023-01-09 12:31:36,460]  WARN {org.apache.synapse.endpoints.LoadbalanceEndpoint} - Endpoint [NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint] Detect a Failure in a child endpoint : Endpoint [NewMCMInboundChannel-RESTAPIService--vv2_APIproductionEndpoint_0]
TID: [-1234] [] [2023-01-09 12:31:36,460]  INFO {org.apache.synapse.mediators.builtin.LogMediator} - {api:admin--NewMCMInboundChannel-RESTAPIService:vv2} STATUS = Executing default 'fault' sequence, ERROR_CODE = 101503, ERROR_MESSAGE = Error connecting to the back end

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM