xorbitsai / inference

Replace OpenAI GPT with another LLM in your app by changing a single line of code. Xinference gives you the freedom to use any LLM you need. With Xinference, you're empowered to run inference with any open-source language models, speech recognition models, and multimodal models, whether in the cloud, on-premises, or even on your laptop.
https://inference.readthedocs.io
Apache License 2.0
4.86k stars 385 forks source link

启动时报RuntimeError: Cluster is not available after multiple attempts #2023

Open sunyankui opened 1 month ago

sunyankui commented 1 month ago

System Info / 系統信息

Python 3.11.9 windows11

Running Xinference with Docker? / 是否使用 Docker 运行 Xinfernece?

Version info / 版本信息

xinference, version 0.14.0

The command used to start Xinference / 用以启动 xinference 的命令

xinference-local -H 0.0.0.0

Reproduction / 复现过程

C:\Users\Administrator>xinference-local -H 0.0.0.0 2024-08-06 10:32:37,372 xinference.core.supervisor 3216 INFO Xinference supervisor 0.0.0.0:39084 started 2024-08-06 10:32:37,403 xinference.model.image.core 3216 WARNING Cannot find builtin image model spec: stable-diffusion-inpainting 2024-08-06 10:32:37,404 xinference.model.image.core 3216 WARNING Cannot find builtin image model spec: stable-diffusion-2-inpainting 2024-08-06 10:32:37,405 xinference.model.image.core 3216 WARNING Cannot find builtin image model spec: stable-diffusion-xl-inpainting 2024-08-06 10:32:37,416 xinference.core.worker 3216 INFO Starting metrics export server at 0.0.0.0:None 2024-08-06 10:32:37,421 xinference.core.worker 3216 INFO Checking metrics export server... 2024-08-06 10:32:42,412 xinference.core.worker 3216 INFO Metrics server is started at: http://0.0.0.0:51174 2024-08-06 10:32:42,413 xinference.core.worker 3216 INFO Xinference worker 0.0.0.0:39084 started 2024-08-06 10:32:42,418 xinference.core.worker 3216 INFO Purge cache directory: C:\Users\Administrator.xinference\cache Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Python311\Scripts\xinference-local.exe__main.py", line 7, in File "C:\Python311\Lib\site-packages\click\core.py", line 1157, in call return self.main(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\click\core.py", line 783, in invoke return callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\xinference\deploy\cmdline.py", line 225, in local start_local_cluster( File "C:\Python311\Lib\site-packages\xinference\deploy\cmdline.py", line 112, in start_local_cluster main( File "C:\Python311\Lib\site-packages\xinference\deploy\local.py", line 122, in main raise RuntimeError("Cluster is not available after multiple attempts") RuntimeError: Cluster is not available after multiple attempts

Expected behavior / 期待表现

xinference-local -H 127.0.0.1 可以正常启动,但是修改为0.0.0.0就报错,这是什么问题

Alex-Zuo-One commented 1 month ago

xinference-local -H 0.0.0.0 把这个 0.0.0.0 换成机器的ip试试

sunyankui commented 1 month ago

xinference-local -H 0.0.0.0 把这个 0.0.0.0 换成机器的ip试试

可以用本机ip,但是我本地有chatchat他会请求127.0.0.1的地址,改chatchat的配置也不好使,所以看怎么能让xinference绑定0.0.0.0算根本决绝问题

wangsen1110 commented 1 month ago

windows 下不能用0.0.0.0 换成 127.0.0.1 就可以了

lhs0627 commented 1 month ago

@wangsen1110 我用127.0.0.1也报错是为什么呢xinference-local --host 127.0.0.1 --port 9997

824562329 commented 2 weeks ago

(xinference) F:\pyth\Langchain-Chatchat>xinference-local --host 127.0.0.1 --port 9997 Traceback (most recent call last): File "C:\Users\Administrator.conda\envs\xinference\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Administrator.conda\envs\xinference\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\Administrator.conda\envs\xinference\Scripts\xinference-local.exe__main.py", line 7, in sys.exit(local()) File "C:\Users\Administrator.conda\envs\xinference\lib\site-packages\click\core.py", line 1157, in call return self.main(*args, kwargs) File "C:\Users\Administrator.conda\envs\xinference\lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) File "C:\Users\Administrator.conda\envs\xinference\lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) File "C:\Users\Administrator.conda\envs\xinference\lib\site-packages\click\core.py", line 783, in invoke return callback(*args, **kwargs) File "C:\Users\Administrator.conda\envs\xinference\lib\site-packages\xinference\deploy\cmdline.py", line 224, in local start_local_cluster( File "C:\Users\Administrator.conda\envs\xinference\lib\site-packages\xinference\deploy\cmdline.py", line 111, in start_local_cluster main( File "C:\Users\Administrator.conda\envs\xinference\lib\site-packages\xinference\deploy\local.py", line 122, in main raise RuntimeError("Cluster is not available after multiple attempts") RuntimeError: Cluster is not available after multiple attempts 2024-09-05 17:02:54,223 xinference.core.supervisor 10808 INFO Xinference supervisor 127.0.0.1:57814 started 2024-09-05 17:02:57,533 xinference.core.worker 10808 INFO Starting metrics export server at 127.0.0.1:None 2024-09-05 17:02:57,533 xinference.core.worker 10808 INFO Checking metrics export server...