milvus-io / milvus-sdk-java

Java SDK for Milvus.
https://milvus.io
Apache License 2.0
394 stars 165 forks source link

jdk 2.4.7 and milvus 2.4.14 not work #1174

Open fgyang opened 2 weeks ago

fgyang commented 2 weeks ago

bug content bellow: Exception in thread "main" io.grpc.StatusRuntimeException: UNIMPLEMENTED: unknown service milvus.proto.milvus.MilvusService 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:4777) at io.milvus.v2.client.MilvusClientV2.connect(MilvusClientV2.java:155) at io.milvus.v2.client.MilvusClientV2.connect(MilvusClientV2.java:109) at io.milvus.v2.client.MilvusClientV2.(MilvusClientV2.java:88) at xin.zhulin.Test.main(Test.java:22)

milvus version: 2.4.14 java sdk version: 2.4.7

fgyang commented 2 weeks ago

python 3.10 pymilvus 2.4.9 milvus 2.4.14

error message: <MilvusException: (code=1, message=this version of sdk is incompatible with server, please downgrade your sdk or upgrade your server)>, <Time:{'RPC start': '2024-11-06 13:05:18.708269', 'RPC error': '2024-11-06 13:05:18.777936'}> Failed to create new connection using: 77004c519cda48029382a8ab90e4b960

yhmo commented 2 weeks ago

I guess your milvus is not 2.4.14. Both the pymilvus 2.4.9 and java sdk 2.4.7 work very well with milvus 2.4.14.

fgyang commented 2 weeks ago

image image this is my pymilvus version and milvus version

yhmo commented 2 weeks ago

Show me the test.py

fgyang commented 2 weeks ago

import pymilvus from pymilvus import MilvusClient

if name == 'main': print(pymilvus.version)

client = MilvusClient(
    uri='http://124.71.208.220:19530',  # replace with your own Milvus server address
    # uri='http://192.168.0.150:19530',  # replace with your own Milvus server address
    # uri='http://192.168.1.105:19530',  # replace with your own Milvus server address
    # uri='http://223.247.150.167:19530',  # replace with your own Milvus server address
    token="root:Milvus"
)

if client.has_collection(collection_name="demo_collection"):
    client.drop_collection(collection_name="demo_collection")
client.create_collection(
    collection_name="demo_collection",
    dimension=768,  # The vectors we will use in this demo has 768 dimensions
)
fgyang commented 2 weeks ago

this is my test.py code

yhmo commented 2 weeks ago

You got the error "this version of sdk is incompatible with server, please downgrade your sdk or upgrade your server" at this line?

client = MilvusClient(
......
yhmo commented 2 weeks ago

Seems you have several milvus addresses: uri='http://124.71.208.220:19530' uri='http://192.168.0.150:19530' uri='http://192.168.1.105:19530' uri='http://223.247.150.167:19530'

Are these milvus servers different versions? Maybe you wrongly choose an old version?

The error "this version of sdk is incompatible with server, please downgrade your sdk or upgrade your server" happens when you are using a high version pymilvus connect to a milvus version older than v2.2.9.