milvus使用python调用时连接失败 pymilvus.exceptions.MilvusException

报错:

  File "/root/anaconda3/envs/python3.8/lib/python3.8/site-packages/langchain/vectorstores/milvus.py", line 151, in __init__
    self.alias = self._create_connection_alias(connection_args)
  File "/root/anaconda3/envs/python3.8/lib/python3.8/site-packages/langchain/vectorstores/milvus.py", line 222, in _create_connection_alias
    raise e
  File "/root/anaconda3/envs/python3.8/lib/python3.8/site-packages/langchain/vectorstores/milvus.py", line 217, in _create_connection_alias
    connections.connect(alias=alias, **connection_args)
  File "/root/anaconda3/envs/python3.8/lib/python3.8/site-packages/pymilvus/orm/connections.py", line 349, in connect
    connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
  File "/root/anaconda3/envs/python3.8/lib/python3.8/site-packages/pymilvus/orm/connections.py", line 282, in connect_milvus
    gh._wait_for_channel_ready(timeout=timeout)
  File "/root/anaconda3/envs/python3.8/lib/python3.8/site-packages/pymilvus/client/grpc_handler.py", line 123, in _wait_for_channel_ready
    raise MilvusException(Status.CONNECT_FAILED,
pymilvus.exceptions.MilvusException: 
2023-09-21 20:38:22,373 - _api.py[line:216] - DEBUG: Attempting to acquire lock 139843302026928 on /root/.triton/autotune/Fp16Matmul_2d_kernel.pickle.lock
2023-09-21 20:38:22,373 - _api.py[line:219] - DEBUG: Lock 139843302026928 acquired on /root/.triton/autotune/Fp16Matmul_2d_kernel.pickle.lock
2023-09-21 20:38:22,373 - _api.py[line:249] - DEBUG: Attempting to release lock 139843302026928 on /root/.triton/autotune/Fp16Matmul_2d_kernel.pickle.lock
2023-09-21 20:38:22,373 - _api.py[line:252] - DEBUG: Lock 139843302026928 released on /root/.triton/autotune/Fp16Matmul_2d_kernel.pickle.lock
2023-09-21 20:38:22,373 - _api.py[line:216] - DEBUG: Attempting to acquire lock 139836793087696 on /root/.triton/autotune/Fp16Matmul_4d_kernel.pickle.lock
2023-09-21 20:38:22,373 - _api.py[line:219] - DEBUG: Lock 139836793087696 acquired on /root/.triton/autotune/Fp16Matmul_4d_kernel.pickle.lock
2023-09-21 20:38:22,374 - _api.py[line:249] - DEBUG: Attempting to release lock 139836793087696 on /root/.triton/autotune/Fp16Matmul_4d_kernel.pickle.lock
2023-09-21 20:38:22,374 - _api.py[line:252] - DEBUG: Lock 139836793087696 released on /root/.triton/autotune/Fp16Matmul_4d_kernel.pickle.lock

其中一种可能性是服务器配置了代理:

# 查看代理
echo $http_proxy

# 清除代理
export http_proxy=""
export https_proxy=""

你可能感兴趣的:(Linux,milvus,python)