vllm - 💡(How to fix) Fix [Usage]: 'LLMEngine' object has no attribute 'collective_rpc' [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#36856Fetched 2026-04-08 00:34:12
View on GitHub
Comments
2
Participants
2
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
commented ×2labeled ×1

Error Message

--------error------- [ERROR:swift] Method execution failed: collective_rpc Traceback (most recent call last): [ERROR:swift] Method execution failed: collective_rpc Traceback (most recent call last): Exception raised from throwTimeoutError at /pytorch/torch/csrc/distributed/c10d/socket.cpp:1025 (most recent call first):

RAW_BUFFERClick to expand / collapse

Your current environment

I try to run the demo for GKD training. while I met a question:

-----vllm server------------- export PYTHONPATH='/mnt/bn/miniconda3/envs/opd/lib/python3.10/site-packages' CUDA_VISIBLE_DEVICES=0 swift rollout --model '/Qwen/Qwen3-8B' --torch_dtype bfloat16 --vllm_tensor_parallel_size 1 --vllm_gpu_memory_utilization 0.9 --max_model_len 8192 --vllm_enable_prefix_caching true --host 127.0.0.1 --port 8000

-----gkd ------------- NPROC_PER_NODE=1 PYTORCH_CUDA_ALLOC_CONF='expandable_segments:True' CUDA_VISIBLE_DEVICES=1 export PYTHONPATH='/mnt/bn/miniconda3/envs/opd/lib/python3.10/site-packages' swift rlhf --rlhf_type gkd --model 'Qwen/Qwen3-0___6B' --teacher_model 'Qwen/Qwen3-8B' --tuner_type full --dataset 'openr1/train-00000-of-00001.parquet' --seq_kd false --lmbda 1 --beta 1 --torch_dtype float16 --num_train_epochs 1 --per_device_train_batch_size 1 --learning_rate 1e-5 --gradient_accumulation_steps 1 --save_steps 1000 --save_total_limit 2 --logging_steps 1 --max_length 16000 --max_completion_length 8192 --output_dir output --warmup_ratio 0.05 --save_only_model true --dataloader_num_workers 64 --dataset_num_proc 4 --deepspeed zero2 --teacher_deepspeed zero3 --attn_impl flash_attn --use_vllm true --vllm_mode server --vllm_server_host 127.0.0.1 --vllm_server_port 8000

--------error------- -- server --- INFO: 127.0.0.1:38352 - "GET /health/ HTTP/1.1" 200 OK INFO: 127.0.0.1:38354 - "POST /close_communicator/ HTTP/1.1" 200 OK [INFO:swift] method: collective_rpc [ERROR:swift] Method execution failed: collective_rpc Traceback (most recent call last): File "/mnt/bn/miniconda3/envs/opd/lib/python3.10/site-packages/swift/pipelines/infer/rollout.py", line 311, in llm_worker result = method(*args, **kwargs) TypeError: 'NoneType' object is not callable

INFO: 127.0.0.1:38354 - "GET /get_world_size/ HTTP/1.1" 200 OK [INFO:swift] method: collective_rpc INFO: 127.0.0.1:38354 - "POST /init_communicator/ HTTP/1.1" 200 OK [ERROR:swift] Method execution failed: collective_rpc Traceback (most recent call last): File "/mnt/bn/miniconda3/envs/opd/lib/python3.10/site-packages/swift/pipelines/infer/rollout.py", line 311, in llm_worker result = method(*args, **kwargs) TypeError: 'NoneType' object is not callable


[INFO:swift] Start connecting to vLLM server [E312 12:01:27.478438881 socket.cpp:1023] [c10d] The client socket has timed out after 300000ms while trying to connect to (127.0.0.1, 51216). [W312 12:01:27.575470533 TCPStore.cpp:330] [c10d] TCP client failed to connect/validate to host 127.0.0.1:51216 - retrying (try=0, timeout=300000ms, delay=32232ms): The client socket has timed out after 300000ms while trying to connect to (127.0.0.1, 51216). Exception raised from throwTimeoutError at /pytorch/torch/csrc/distributed/c10d/socket.cpp:1025 (most recent call first):

How would you like to use vllm

I want to run inference of a [specific model](put link here). I don't know how to integrate it with vllm.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

Fix Plan

The issue seems to be related to the connection between the client and the vLLM server. To fix this, we need to ensure that the server is properly configured and the client is able to connect to it.

Here are the steps to fix the issue:

  • Check the server configuration:
    • Make sure the vllm_server_host and vllm_server_port are correctly set in the client configuration.
    • Verify that the server is running and listening on the specified port.
  • Update the client configuration:
    • Set vllm_mode to server and specify the correct vllm_server_host and vllm_server_port.
    • Ensure that the CUDA_VISIBLE_DEVICES environment variable is set correctly.

Example code snippet:

import os

# Set environment variables
os.environ['CUDA_VISIBLE_DEVICES'] = '1'
os.environ['PYTHONPATH'] = '/mnt/bn/miniconda3/envs/opd/lib/python3.10/site-packages'

# Set client configuration
vllm_mode = 'server'
vllm_server_host = '127.0.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - 💡(How to fix) Fix [Usage]: 'LLMEngine' object has no attribute 'collective_rpc' [2 comments, 2 participants]