milvus-sdk-java icon indicating copy to clipboard operation
milvus-sdk-java copied to clipboard

jdk 2.4.7 and milvus 2.4.14 not work

Open fgyang opened this issue 1 year ago • 8 comments

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 avatar Nov 06 '24 04:11 fgyang

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

fgyang avatar Nov 06 '24 05:11 fgyang

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.

yhmo avatar Nov 06 '24 06:11 yhmo

image image this is my pymilvus version and milvus version

fgyang avatar Nov 06 '24 07:11 fgyang

Show me the test.py

yhmo avatar Nov 06 '24 07:11 yhmo

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 avatar Nov 06 '24 12:11 fgyang

this is my test.py code

fgyang avatar Nov 06 '24 12:11 fgyang

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 avatar Nov 07 '24 06:11 yhmo

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.

yhmo avatar Nov 07 '24 06:11 yhmo