You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "icexin (via GitHub)" <gi...@apache.org> on 2024/06/12 08:43:00 UTC

[I] 连接处于CLOSE_WAIT状态导致健康检查失败 (brpc)

icexin opened a new issue, #2662:
URL: https://github.com/apache/brpc/issues/2662

   **Describe the bug (描述bug)**
   服务端的一次宕机后,客户端就一直因为检查检查失败导致rpc失败,报错 `[E112]Fail to select server from xxx`。在出问题的机器上可以看到连接处于CLOSE_WAIT状态。
   
   
   
   **Versions (各种版本)**
   OS: ubuntu 20.04
   Compiler: clang-8
   brpc: 1.8.0
   protobuf: 3.15.8
   
   **Additional context/screenshots (更多上下文/截图)**
   
   <img width="1712" alt="image" src="https://github.com/apache/brpc/assets/2713364/739e96bc-ff5a-452d-abdc-21ecf4069d99">
   <img width="658" alt="image" src="https://github.com/apache/brpc/assets/2713364/b35e8969-56c3-46ee-990e-3a5eb02f9489">
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] 连接处于CLOSE_WAIT状态导致健康检查失败 (brpc)

Posted by "MapleLove2014 (via GitHub)" <gi...@apache.org>.
MapleLove2014 commented on issue #2662:
URL: https://github.com/apache/brpc/issues/2662#issuecomment-2900122773

   我们这边使用brpc0.9版本作为thrift server,当client的请求体的thrift定义和server的定义不一致时,复现了这个必超时+CLOSE_WAIT的问题。
   比如client端请求体定义:
   struct Request{
       1: **required** i32 id;
   }
   但是server请求体的定义是:
   struct Request{
       1: **optional** i32 id;
   }
   
   这种情况下如果发起请求就会直接超时+CLOSE_WAIT,改成相同的定义之后,就没这个问题了。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org


Re: [I] 连接处于CLOSE_WAIT状态导致健康检查失败 (brpc)

Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on issue #2662:
URL: https://github.com/apache/brpc/issues/2662#issuecomment-2174803799

   另外,服务端没起来,健康检查也不会成功吧。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] 连接处于CLOSE_WAIT状态导致健康检查失败 (brpc)

Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on issue #2662:
URL: https://github.com/apache/brpc/issues/2662#issuecomment-2174800981

   看着像是是还有rpc没有结束。框架内部要等到连接上全部rpc结束了,才会close fd,然后进行健康检查。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] 连接处于CLOSE_WAIT状态导致健康检查失败 (brpc)

Posted by "cdjingit (via GitHub)" <gi...@apache.org>.
cdjingit closed issue #2662: 连接处于CLOSE_WAIT状态导致健康检查失败
URL: https://github.com/apache/brpc/issues/2662


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] 连接处于CLOSE_WAIT状态导致健康检查失败 (brpc)

Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on issue #2662:
URL: https://github.com/apache/brpc/issues/2662#issuecomment-2173629429

   有这个日志吗?
   https://github.com/apache/brpc/blob/2e183187bcbccc39c7da8dde2a98d02a7a031279/src/brpc/socket.cpp#L2564-L2567


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] 连接处于CLOSE_WAIT状态导致健康检查失败 (brpc)

Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on issue #2662:
URL: https://github.com/apache/brpc/issues/2662#issuecomment-2173630016

   CLOSE_WAIT状态持续很久吗?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] 连接处于CLOSE_WAIT状态导致健康检查失败 (brpc)

Posted by "icexin (via GitHub)" <gi...@apache.org>.
icexin commented on issue #2662:
URL: https://github.com/apache/brpc/issues/2662#issuecomment-2174727365

   对,在我们手动重启之前一直是CLOSE_WAIT状态


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] 连接处于CLOSE_WAIT状态导致健康检查失败 (brpc)

Posted by "GITWHB (via GitHub)" <gi...@apache.org>.
GITWHB commented on issue #2662:
URL: https://github.com/apache/brpc/issues/2662#issuecomment-2421232239

   问下 最后有解决吗?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] 连接处于CLOSE_WAIT状态导致健康检查失败 (brpc)

Posted by "icexin (via GitHub)" <gi...@apache.org>.
icexin commented on issue #2662:
URL: https://github.com/apache/brpc/issues/2662#issuecomment-2175883103

   这边是客户端处于close_wait状态,我们用的是同步rpc,应该rpc很快就处理完了。服务端后来起来后,客户端也因为这个状态一直健康检查失败


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org