Giter VIP home page Giter VIP logo

Comments (8)

XuanYang-cn avatar XuanYang-cn commented on August 23, 2024

@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.

XuanYang-cn avatar XuanYang-cn commented on August 23, 2024

/assign @junjiejiangjjj

from pymilvus.

sre-ci-robot avatar sre-ci-robot commented on August 23, 2024

@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.

junjiejiangjjj avatar junjiejiangjjj commented on August 23, 2024

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.

zs856 avatar zs856 commented on August 23, 2024

from pymilvus.

junjiejiangjjj avatar junjiejiangjjj commented on August 23, 2024

Try running this code directly on wsl

from pymilvus import MilvusClient
milvus_client = MilvusClient('./milvus_demo.db')

from pymilvus.

zs856 avatar zs856 commented on August 23, 2024
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.

junjiejiangjjj avatar junjiejiangjjj commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.