我是靠谱客的博主 悲凉小天鹅,最近开发中收集的这篇文章主要介绍linux read erro 115,TCP Connect error 115 Operation in Progress What is the Cause?,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

Based on your information: You are trying to do a connect() to 54.x.x.x

The socket is non-blocking

Connection timeout is 60 sec

First, if you look into your /usr/include/asm-generic/errno.h you'll see the following: #define EINPROGRESS 115 /* Operation now in progress */

It means an existing operation on the socket is in progress. Since, you said you are doing a connect() call, lets do a man connect: EINPROGRESS The socket is nonblocking and the connection cannot be completed immediately. It is possible to select(2) or poll(2) for completion by selecting the socket for writing. After select(2) indicates writability, use getsockopt(2) to read the SO_ERROR option at level SOL_SOCKET to determine whether connect() completed successfully (SO_ERROR is zero) or unsuccessfully (SO_ERROR is one of the usual error codes listed here, explaining the reason for the failure).

So, the best guess would be that the TCP 3-way handshake (your connect() call to 54.x.x.x IP address) is taking longer than expected to complete. Since the connect() operation is already in progress, any subsequent operation on the socket is resulting into EINPROGRESS error code. As suggested in the man page, try to use select() or poll() to check if your socket is ready to use (to perform read() or write() calls).

You can pin-point what is preventing your TCP handshake to complete by capturing and analyzing the traffic to/from your own machine and 54.x.x.x. The best tool to help you with this is called WireShark. Good luck.

44c9ce2ab563ec925d9d69fc67845fa7.png

最后

以上就是悲凉小天鹅为你收集整理的linux read erro 115,TCP Connect error 115 Operation in Progress What is the Cause?的全部内容,希望文章能够帮你解决linux read erro 115,TCP Connect error 115 Operation in Progress What is the Cause?所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(40)

评论列表共有 0 条评论

立即
投稿
返回
顶部