Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix launch port already in use #32892

Merged
merged 2 commits into from
May 14, 2021

Conversation

wangxicoding
Copy link
Contributor

@wangxicoding wangxicoding commented May 13, 2021

PR types

Bug fixes

PR changes

Others

Describe

Fix launch port already in use

产生原因

launch寻找空闲端口方式是先绑定,后释放。再提供给C++使用。Already in use可能有两个原因

  1. 绑定后释放,出现TIME_WAIT状态,导致后续绑定出现Already in use。
  2. 找到空闲端口到给C++使用存在一个时间差,可能被别的程序给占用。此问题暂无解

解决

  1. 解决TIME_WAIT导致的Already in use原因(本PR):
    可以通过设置SO_LINGER来规避。关闭链接,跳过TIME_WAIT,直接进入CLOSE。
  2. 端口被别的程序占用。代码上暂无解,可以临时规避:
    手工设定起始端口,export FLAGS_START_PORT=6001。

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@gongweibao gongweibao merged commit 6473e27 into PaddlePaddle:develop May 14, 2021
@wangxicoding wangxicoding deleted the fix_port_already_use branch June 21, 2021 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants