milvus-io / milvus

A cloud-native vector database, storage for next generation AI applications
https://milvus.io
Apache License 2.0
30.95k stars 2.95k forks source link

[Bug]: An error related to gRPC occurred when creating a connection using the MilvusClientV2 Java SDK. #37613

Open davewxt opened 1 week ago

davewxt commented 1 week ago

Is there an existing issue for this?

Environment

- Milvus version:2.4.15
- Deployment mode(standalone or cluster):cluster
- SDK version(e.g. pymilvus v2.0.0rc2):2.4.4
- OS(Ubuntu or CentOS): windows本地
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

ConnectConfig connectConfig = ConnectConfig.builder()            
 .uri("http://xxxx:19530")               
.dbName(dataBaseName)            
 .token("root:Milvus")             
 .idleTimeoutMs(5L)      
 .connectTimeoutMs(5L)             
.build();         

MilvusClientV2 milvusClientV2=new MilvusClientV2(connectConfig);
ListDatabasesResp listDatabasesResponse = milvusClientV2.listDatabases();

Expected Behavior

Exception in thread "main" io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 0.892720700s. Name resolution delay 0.001561200 seconds. [closed=[], open=[[buffered_nanos=911662800, waiting_for_connection]]] at io.grpc.StatusRuntimeException.fillInStackTrace(StatusRuntimeException.java:68) at io.grpc.StatusRuntimeException.(StatusRuntimeException.java:58) at io.grpc.StatusRuntimeException.(StatusRuntimeException.java:50) at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:268) at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:249) at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:167) at io.milvus.grpc.MilvusServiceGrpc$MilvusServiceBlockingStub.connect(MilvusServiceGrpc.java:4685) at io.milvus.v2.client.MilvusClientV2.connect(MilvusClientV2.java:147) at io.milvus.v2.client.MilvusClientV2.connect(MilvusClientV2.java:109) at io.milvus.v2.client.MilvusClientV2.(MilvusClientV2.java:88) at com.sanofi.vector.rep.meta.main(meta.java:69)

Steps To Reproduce

1.milvus-java-sdk 2.4.4
2.jdk8
3.SpringBoot 2.6.0
4.milvus 版本2.14.5

Milvus Log

Exception in thread "main" io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 0.892720700s. Name resolution delay 0.001561200 seconds. [closed=[], open=[[buffered_nanos=911662800, waiting_for_connection]]] at io.grpc.StatusRuntimeException.fillInStackTrace(StatusRuntimeException.java:68) at io.grpc.StatusRuntimeException.(StatusRuntimeException.java:58) at io.grpc.StatusRuntimeException.(StatusRuntimeException.java:50) at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:268) at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:249) at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:167) at io.milvus.grpc.MilvusServiceGrpc$MilvusServiceBlockingStub.connect(MilvusServiceGrpc.java:4685) at io.milvus.v2.client.MilvusClientV2.connect(MilvusClientV2.java:147) at io.milvus.v2.client.MilvusClientV2.connect(MilvusClientV2.java:109) at io.milvus.v2.client.MilvusClientV2.(MilvusClientV2.java:88) at com.sanofi.vector.rep.meta.main(meta.java:69)

Anything else?

Exception in thread "main" io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 0.892720700s. Name resolution delay 0.001561200 seconds. [closed=[], open=[[buffered_nanos=911662800, waiting_for_connection]]] at io.grpc.StatusRuntimeException.fillInStackTrace(StatusRuntimeException.java:68) at io.grpc.StatusRuntimeException.(StatusRuntimeException.java:58) at io.grpc.StatusRuntimeException.(StatusRuntimeException.java:50) at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:268) at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:249) at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:167) at io.milvus.grpc.MilvusServiceGrpc$MilvusServiceBlockingStub.connect(MilvusServiceGrpc.java:4685) at io.milvus.v2.client.MilvusClientV2.connect(MilvusClientV2.java:147) at io.milvus.v2.client.MilvusClientV2.connect(MilvusClientV2.java:109) at io.milvus.v2.client.MilvusClientV2.(MilvusClientV2.java:88) at com.sanofi.vector.rep.meta.main(meta.java:69)

github-actions[bot] commented 1 week ago

The title and description of this issue contains Chinese. Please use English to describe your issue.

davewxt commented 1 week ago

It has already been changed to English. Please help to have a look. The project team is urging urgently now.

yanliang567 commented 1 week ago

I don't think milvus supports running on Windows. do you mean you running on Windows docker? Please refer this doc to export the whole Milvus logs for investigation. For Milvus installed with docker-compose, you can use docker-compose logs > milvus.log to export the logs.

/assign @davewxt

davewxt commented 1 week ago

@yanliang567 My Milvus is installed on Kubernetes and proxied to the local machine via a proxy method. This set of old APIs can be tested locally on Windows, but some functions are not supported.

final MilvusServiceClient milvusClient = new MilvusServiceClient( ConnectParam.newBuilder() .withHost("127.0.0.1") .withPort(19530) .withToken("root:Milvus") .withDatabaseName(dataBaseName) .build() );

    DescribeCollectionParam describeCollectionReq = DescribeCollectionParam.newBuilder()
            .withCollectionName("meta_collection1")
            .build();

    R<DescribeCollectionResponse> describeCollectionRes = milvusClient.describeCollection(describeCollectionReq);

    System.out.println(describeCollectionRes)
xiaofan-luan commented 1 week ago

@davewxt are you able to ping the milvus end point? We want to make sure there is no network issue here.

could you connect with attu and check if milvus service is all start as expected? or you can offer some log from server side

ditunes commented 4 days ago

i. also have same problem i config the time: .rpcDeadlineMs(1000000).connectTimeoutMs(10000).keepAliveTimeoutMs(10000) but after 0.5727549 not match my rpcDeadLineMs

========= Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.milvus.v2.client.MilvusClientV2]: Factory method 'buildClient' threw exception; nested exception is io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 0.572754931s. [buffered_nanos=639915539, waiting_for_connection] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:641) ... 126 common frames omitted Caused by: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 0.572754931s. [buffered_nanos=639915539, waiting_for_connection] at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262) at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243) at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156) at io.milvus.grpc.MilvusServiceGrpc$MilvusServiceBlockingStub.connect(MilvusServiceGrpc.java:4685) at io.milvus.v2.client.MilvusClientV2.connect(MilvusClientV2.java:147) at io.milvus.v2.client.MilvusClientV2.connect(MilvusClientV2.java:109) at io.milvus.v2.client.MilvusClientV2.(MilvusClientV2.java:88)

yanliang567 commented 1 day ago

/assign @yhmo could you please help to take a look? /unassign