Python 및 Torch 코딩 이모저모
RuntimeError: The server socket has failed to listen on any local network address.
섬섬옥수수
2024. 11. 20. 10:32
File "/root/.venv/lib/python3.8/site-packages/torch/distributed/rendezvous.py", line 172, in _create_c10d_store
return TCPStore(
RuntimeError: The server socket has failed to listen on any local network address. The server socket has failed to bind to [::]:29500 (errno: 98 - Address already in use). The server socket has failed to bind to 0.0.0.0:29500 (errno: 98 - Address already in use).
[2023-12-06 05:07:30,923] [INFO] [launch.py:315:sigkill_handler] Killing subprocess 252082
[2023-12-06 05:07:30,925] [INFO] [launch.py:315:sigkill_handler] Killing subprocess 252083
[2023-12-06 05:07:33,293] [INFO] [launch.py:315:sigkill_handler] Killing subprocess 252084
[2023-12-06 05:07:35,615] [INFO] [launch.py:315:sigkill_handler] Killing subprocess 252085
[2023-12-06 05:07:38,218] [ERROR] [launch.py:321:sigkill_handler] ['/root/.venv/bin/python3', '-u', 'hf_trainer.py', '--local_rank=3', '--deepspeed', 'deepspeed_config.json'] exits with return code = 1
이런식으로 TCP 관련 코드에서 멈추면서 나는 다음과같은 에러는
찾아보니 학습을 시작하기도 전에 난 에러로, 다른 프로세스가 cpu 에서 돌고있거나 아니면 완전히 kill 되지 않았는데 돌리면 생기는 에러이다.
그러므로 ps -ef 를 해보면 알 수 있다.