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

[I] Error "Fail to wait EPOLLOUT of fd=...: Connection timed out" when channel timeout is -1 (brpc)

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

   **Describe the bug (描述bug)**
   
   According to `channel.h`, setting `timeout_ms` to `-1` will make the `Channel` block on requests.
   However, this fails and shows the following error over and over again (even if no more requests are being made): `W1106 15:03:26.337735 3784702 4294969859 /.../brpc/src/brpc/socket.cpp:1361] Fail to wait EPOLLOUT of fd=3: Connection timed out
   `.
   
   However, this does not happen if the IP provided for the channel to connect is "localhost," more precisely, "127.0.0.1". 
   
   **To Reproduce (复现方法)**
   
   For example,
   1. Compile the `echo_c++` example provided by brpc (but comment out all logging instructions for easier reading).
   2. Run it like so: `./echo_client --timeout_ms=-1 --server="128.0.0.1:50000"`.
   (I am aware that this IP is not for "localhost" but, again, this fails for IPs that are not "localhost").
   
   **Expected behavior (期望行为)**
   The request should be blocked until an answer is received.
   An example of correct behavior is following the example above but run it like so: `./echo_client --timeout_ms=-1 --server="127.0.0.1:50000"`.
   
   
   **Versions (各种版本)**
   OS: 5.4.0-187-generic
   Compiler: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
   brpc: 1.11.0
   protobuf: 3.21.6.0
   
   **Additional context/screenshots (更多上下文/截图)**
   Commented out portions of the `echo_c++` example:
   ![image](https://github.com/user-attachments/assets/aa58903c-428d-4539-9e83-35cf71e4c114)
   
   
   


-- 
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] Error "Fail to wait EPOLLOUT of fd=...: Connection timed out" when channel timeout is -1 (brpc)

Posted by "wwbmmm (via GitHub)" <gi...@apache.org>.
wwbmmm closed issue #2816: Error "Fail to wait EPOLLOUT of fd=...: Connection timed out" when channel timeout is -1
URL: https://github.com/apache/brpc/issues/2816


-- 
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] Error "Fail to wait EPOLLOUT of fd=...: Connection timed out" when channel timeout is -1 (brpc)

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

   You also need to set connect_timeout_ms to -1.


-- 
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] Error "Fail to wait EPOLLOUT of fd=...: Connection timed out" when channel timeout is -1 (brpc)

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

   Strangely enough, I was doing that on the project I was actually working on and had the exact same problem. However, it is true that in the example above, setting `options.connect_timeout_ms` to `-1` avoids this problem.
   Thanks for the help; I'll see if this was, in fact, a problem on my side.


-- 
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