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

[Bugfix] Fix some cases of The client socket has timed out after 600s while trying to connect to #10492

Closed
wants to merge 1 commit into from

Conversation

guoyuhong
Copy link
Contributor

@guoyuhong guoyuhong commented Nov 20, 2024

vLLM works fine in most of my environments. However, there are always some envs that have following error:
The client socket has timed out after 600s while trying to connect to
image

In this case, I need to set the environment variable export VLLM_HOST_IP="127.0.0.1". However, for a new user, he/she may not realize what happens.
After digging into this problem, I found that this is caused by the automatically set environment variable HOST_IP.

In many cases, we use vLLM in a container. The container may use the Bridge Mode for the network, which means the container has different IP from the host machine. And sometimes, the container is started with the environment variable HOST_IP set to the host machine's IP. In current logic of get_ip() function and env.VLLM_HOST_IP, if HOST_IP is set but VLLM_HOST_IP is not set, get_ip() will return HOST_IP without trying to get a real IP.

The solution is to try the best to find the local IP first. The env HOST_IP is used only when we cannot find the local IP from code and VLLM_HOST_IP is not set.

May FIX #5779 #6650 #7136

Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

Signed-off-by: Yuhong Guo <yuhong.gyh@antgroup.com>
@guoyuhong
Copy link
Contributor Author

This PR is ready for review.

@guoyuhong
Copy link
Contributor Author

@DarkLight1337 could you take a look at this PR?

@youkaichao
Copy link
Member

the container is started with the environment variable HOST_IP set to the host machine's IP

any reference for this? is it common?

@guoyuhong
Copy link
Contributor Author

@youkaichao
Copy link
Member

HOST_IP is kept mainly for historical reasons. I think it is time to remove it.

@youkaichao
Copy link
Member

@guoyuhong please check #10644

Copy link

mergify bot commented Nov 26, 2024

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @guoyuhong.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Nov 26, 2024
@guoyuhong
Copy link
Contributor Author

Close this PR since #10644 is merged.

@guoyuhong guoyuhong closed this Nov 26, 2024
@guoyuhong guoyuhong deleted the fix_wrong_host branch December 2, 2024 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: 使用vllm+ray分布式推理报错
2 participants