milvus-io / pymilvus

Python SDK for Milvus.
Apache License 2.0
1.04k stars 335 forks source link

[Bug]: hpack_parser.cc:833 when using an uri connection #1689

Open angel-luis opened 1 year ago

angel-luis commented 1 year ago

Is there an existing issue for this?

Describe the bug

When I connect using a uri https://my-endpoint.ngrok-free.app:443 I get the following error:

E0912 19:44:03.761939000 11117801472 hpack_parser.cc:833]              Error parsing 'content-type' metadata: error=invalid value key=content-type
[__internal_register] retry:4, cost: 0.27s, reason: <_InactiveRpcError: StatusCode.UNKNOWN, Stream removed>

Expected Behavior

To connect to Milvus like when I'm connecting in localhost.

Steps/Code To Reproduce behavior

Install the langchain library and use Milvus class.

from langchain.vectorstores import Milvus

Milvus(embedding_function=MyEmbeddingFunction(),
       connection_args={"uri": `https://my-endpoint.ngrok-free.app:443`})

Environment details

Anything else?

I've tried to trace the error and the code execution ends in pymilvus/client/grpc_handler.py line 1837:

def __internal_register(self, user: str, host: str) -> int:
        req = Prepare.register_request(user, host)
        response = self._stub.Connect(request=req)

The library is working when connecting to a localhost connection.

The ngrok point is pointing to the 19530 port in the host machine.

iameminmammadov commented 11 months ago

@angel-luis I have been facing the same issue. Have you ever found the solution?

angel-luis commented 11 months ago

I don't remember exactly but I changed the method of using Milvus so I couldn't get a workaround about this issue.

iameminmammadov commented 11 months ago

Ah. I see. Thanks.