Comments (8)
@zs856 From your exceptions, your're actually connecting to milvus using this: uni[x:/tmp/tmph2hmv5a4_milvus_demo.db.sock](file:///X:/tmp/tmph2hmv5a4_milvus_demo.db.sock)
and it failed.
Seems like something's wrong when connecting to Milvus lite. @junjiejiangjjj Please help identify if this's a bug of Milvus-lite
from pymilvus.
/assign @junjiejiangjjj
from pymilvus.
@XuanYang-cn: GitHub didn't allow me to assign the following users: junjiejiangjjj.
Note that only milvus-io members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide
In response to this:
/assign @junjiejiangjjj
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
from pymilvus.
Right now milvus-lite doesn't support native Windows install yet, but can work around with wsl (https://learn.microsoft.com/en-us/windows/wsl/install),
from pymilvus.
from pymilvus.
Try running this code directly on wsl
from pymilvus import MilvusClient
milvus_client = MilvusClient('./milvus_demo.db')
from pymilvus.
from pymilvus import MilvusClient milvus_client = MilvusClient('./milvus_demo.db')
2024-07-02 22:35:22,904 - pymilvus.milvus_client.milvus_client - ERROR - Failed to create new connection using: 0632f8c0045d4cd6b811b2dd0ab219f3
---------------------------------------------------------------------------
MilvusException Traceback (most recent call last)
[... skipping hidden 1 frame]
Cell In[97], line 2
1 from pymilvus import MilvusClient
----> 2 milvus_client = MilvusClient('./milvus_demo.db')
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py:58, in MilvusClient.__init__(self, uri, user, password, db_name, token, timeout, **kwargs)
46 """A client for the common Milvus use case.
47
48 This client attempts to hide away the complexity of using Pymilvus. In a lot ofcases what
(...)
56 to None.
57 """
---> 58 self._using = self._create_connection(
59 uri, user, password, db_name, token, timeout=timeout, **kwargs
60 )
61 self.is_self_hosted = bool(utility.get_server_type(using=self._using) == "milvus")
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py:651, in MilvusClient._create_connection(self, uri, user, password, db_name, token, **kwargs)
650 logger.error("Failed to create new connection using: %s", using)
--> 651 raise ex from ex
652 else:
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py:648, in MilvusClient._create_connection(self, uri, user, password, db_name, token, **kwargs)
647 try:
--> 648 connections.connect(using, user, password, db_name, token, uri=uri, **kwargs)
649 except Exception as ex:
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/orm/connections.py:447, in Connections.connect(self, alias, user, password, db_name, token, **kwargs)
445 kwargs["secure"] = True
--> 447 connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
448 return
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/orm/connections.py:398, in Connections.connect.<locals>.connect_milvus(**kwargs)
396 timeout = t if isinstance(t, (int, float)) else Config.MILVUS_CONN_TIMEOUT
--> 398 gh._wait_for_channel_ready(timeout=timeout)
399 if kwargs.get("keep_alive", False):
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/client/grpc_handler.py:150, in GrpcHandler._wait_for_channel_ready(self, timeout)
149 except grpc.FutureTimeoutError as e:
--> 150 raise MilvusException(
151 code=Status.CONNECT_FAILED,
152 message=f"Fail connecting to server on {self._address}, illegal connection params or server unavailable",
153 ) from e
154 except Exception as e:
MilvusException: <MilvusException: (code=2, message=Fail connecting to server on uni[x:/tmp/tmp54q1oh9l_milvus_demo.db.sock](file:///X:/tmp/tmp54q1oh9l_milvus_demo.db.sock), illegal connection params or server unavailable)>
The above exception was the direct cause of the following exception:
MilvusException Traceback (most recent call last)
[... skipping hidden 1 frame]
Cell In[97], line 2
1 from pymilvus import MilvusClient
----> 2 milvus_client = MilvusClient('./milvus_demo.db')
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py:58, in MilvusClient.__init__(self, uri, user, password, db_name, token, timeout, **kwargs)
46 """A client for the common Milvus use case.
47
48 This client attempts to hide away the complexity of using Pymilvus. In a lot ofcases what
(...)
56 to None.
57 """
---> 58 self._using = self._create_connection(
59 uri, user, password, db_name, token, timeout=timeout, **kwargs
60 )
61 self.is_self_hosted = bool(utility.get_server_type(using=self._using) == "milvus")
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py:651, in MilvusClient._create_connection(self, uri, user, password, db_name, token, **kwargs)
650 logger.error("Failed to create new connection using: %s", using)
--> 651 raise ex from ex
652 else:
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py:648, in MilvusClient._create_connection(self, uri, user, password, db_name, token, **kwargs)
647 try:
--> 648 connections.connect(using, user, password, db_name, token, uri=uri, **kwargs)
649 except Exception as ex:
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/orm/connections.py:447, in Connections.connect(self, alias, user, password, db_name, token, **kwargs)
445 kwargs["secure"] = True
--> 447 connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
448 return
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/orm/connections.py:398, in Connections.connect.<locals>.connect_milvus(**kwargs)
396 timeout = t if isinstance(t, (int, float)) else Config.MILVUS_CONN_TIMEOUT
--> 398 gh._wait_for_channel_ready(timeout=timeout)
399 if kwargs.get("keep_alive", False):
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/client/grpc_handler.py:150, in GrpcHandler._wait_for_channel_ready(self, timeout)
149 except grpc.FutureTimeoutError as e:
--> 150 raise MilvusException(
151 code=Status.CONNECT_FAILED,
152 message=f"Fail connecting to server on {self._address}, illegal connection params or server unavailable",
153 ) from e
154 except Exception as e:
MilvusException: <MilvusException: (code=2, message=Fail connecting to server on uni[x:/tmp/tmp54q1oh9l_milvus_demo.db.sock](file:///X:/tmp/tmp54q1oh9l_milvus_demo.db.sock), illegal connection params or server unavailable)>
The above exception was the direct cause of the following exception:
MilvusException Traceback (most recent call last)
Cell In[97], line 2
1 from pymilvus import MilvusClient
----> 2 milvus_client = MilvusClient('./milvus_demo.db')
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py:58, in MilvusClient.__init__(self, uri, user, password, db_name, token, timeout, **kwargs)
36 def __init__(
37 self,
38 uri: str = "http://localhost:19530",
(...)
44 **kwargs,
45 ) -> None:
46 """A client for the common Milvus use case.
47
48 This client attempts to hide away the complexity of using Pymilvus. In a lot ofcases what
(...)
56 to None.
57 """
---> 58 self._using = self._create_connection(
59 uri, user, password, db_name, token, timeout=timeout, **kwargs
60 )
61 self.is_self_hosted = bool(utility.get_server_type(using=self._using) == "milvus")
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py:651, in MilvusClient._create_connection(self, uri, user, password, db_name, token, **kwargs)
649 except Exception as ex:
650 logger.error("Failed to create new connection using: %s", using)
--> 651 raise ex from ex
652 else:
653 logger.debug("Created new connection using: %s", using)
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py:648, in MilvusClient._create_connection(self, uri, user, password, db_name, token, **kwargs)
646 using = uuid4().hex
647 try:
--> 648 connections.connect(using, user, password, db_name, token, uri=uri, **kwargs)
649 except Exception as ex:
650 logger.error("Failed to create new connection using: %s", using)
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/orm/connections.py:447, in Connections.connect(self, alias, user, password, db_name, token, **kwargs)
444 if parsed_uri.scheme == "https":
445 kwargs["secure"] = True
--> 447 connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
448 return
450 # 2nd Priority, connection configs from env
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/orm/connections.py:398, in Connections.connect.<locals>.connect_milvus(**kwargs)
395 t = kwargs.get("timeout")
396 timeout = t if isinstance(t, (int, float)) else Config.MILVUS_CONN_TIMEOUT
--> 398 gh._wait_for_channel_ready(timeout=timeout)
399 if kwargs.get("keep_alive", False):
400 gh.register_state_change_callback(
401 ReconnectHandler(self, alias, kwargs_copy).reconnect_on_idle
402 )
File /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/pymilvus/client/grpc_handler.py:150, in GrpcHandler._wait_for_channel_ready(self, timeout)
148 self._setup_identifier_interceptor(self._user, timeout=timeout)
149 except grpc.FutureTimeoutError as e:
--> 150 raise MilvusException(
151 code=Status.CONNECT_FAILED,
152 message=f"Fail connecting to server on {self._address}, illegal connection params or server unavailable",
153 ) from e
154 except Exception as e:
155 raise e from e
MilvusException: <MilvusException: (code=2, message=Fail connecting to server on unix:/tmp/tmp54q1oh9l_milvus_demo.db.sock, illegal connection params or server unavailable)>
I got this
from pymilvus.
Run this command in the wsl terminal so that the error log is clearer。Please make sure milvus_lite is installed in this directory:/mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/
LD_LIBRARY_PATH=/mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/milvus_lite/lib/ /mnt/d/development/Github/streamlit-hello/.venv/lib/python3.12/site-packages/milvus_lite/lib/milvus ./mivlus.db unix:/tmp/tmp54q1oh9l_milvus_demo.db.sock INFO
from pymilvus.
Related Issues (20)
- [Bug]: /etc/hosts not supported when using uri HOT 3
- [Bug]: num_partitions does not take effect HOT 3
- [Enhancement]: Support database create, list and drop operations for Milvus client
- [Bug]: The error message is not clear enough when inserting rows HOT 2
- [Bug]: create index on json field is not supported: expected=supported field HOT 6
- [QUESTION]: Bulk insert supports uploading local files directly to S3 HOT 3
- [Bug]: db_name should return when list_connections called HOT 2
- [Enhancement]: `infer_dtype_bydata` can not infer DataType.ARRAY HOT 4
- [QUESTION]: Loosen environs package requirement HOT 2
- [Bug]: TypeError: 'numpy.float64' object is not iterable
- [Bug]: TypeError("data type 'bfloat16' not understood" HOT 1
- [Enhancement]: add generic type in metaclass HOT 1
- MilvusClient(**conf).search检索向量相似数据的实现逻辑 HOT 1
- [Bug]: Can't create partition in Milvus running on Docker Compose HOT 2
- [Bug]: pymilvus 2.3.5- query iterator got error: grpc_status:13, grpc_message:"Received RST_STREAM with error code 2" HOT 1
- [QUESTION]: 请问hybrid_search中如果有sparse vector的检索,支持partition key吗 HOT 6
- [Bug]: Use Furthest Neighbor Search HOT 1
- [Bug]: ParamError(message=f"`{param_name}` value {param_value} is illegal") HOT 6
- [QUESTION]: Can we have different weights for each collection while doing a similarity search? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymilvus.