milvus connection and not creating database and collections in zlliz #40772
Replies: 3 comments 1 reply
-
connections.connect and MilvusClient are two different ways to interact with milvus.
MilvusClient is recommended. |
Beta Was this translation helpful? Give feedback.
-
InactiveRpcError: <_InactiveRpcError of RPC that terminated with: |
Beta Was this translation helpful? Give feedback.
-
Hi @AkshayBhure098 Maybe you should think of moving to a dedicated cluster ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have run below code but error is getting tried all methods
please try to resolve my issue I have made zlliz cluster created api key with proper given permissions still this error occurs.
in below example I have changed token for security purpose.
from pymilvus import connections
Replace with your cluster details
ENDPOINT = "https://in03-12c257bfa330beb.serverless.gcp-us-west1.cloud.zilliz.com"
TOKEN = "0cd0879f1fd2f03eb07432591c1ba318d4289f0c7b30b581fdee0fe437c9db8e87cfa0ceb8beda1dd64e48567c4ffe5fd44eca08"
Connect to the Milvus instance
client=connections.connect(uri=ENDPOINT, token=TOKEN)
print("Connected to Milvus!",client)
for above code below output
Connected to Milvus! None
and for below code
client.create_database("milvus_demo")
below output
AttributeError Traceback (most recent call last)
in <cell line: 0>()
----> 1 client.create_database("milvus_demo")
AttributeError: 'NoneType' object has no attribute 'create_database'
from pymilvus import MilvusClient, DataType
client = MilvusClient(
uri="https://in03-12c257bfa330beb.serverless.gcp-us-west1.cloud.zilliz.com",
token="0cd0879f1fd2f03eb07432591c1ba318d4289f0c",
)
client.create_database("milvus_demo")
for above code below output
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.PERMISSION_DENIED
details = "PrivilegeCreateDatabase: permission deny to db_12c257bfa330beb in the
db_12c257bfa330beb
database"debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"PrivilegeCreateDatabase: permission deny to db_12c257bfa330beb in the
db_12c257bfa330beb
database", grpc_status:7, created_time:"2025-03-19T09:44:43.830358413+00:00"}"The above exception was the direct cause of the following exception:
_InactiveRpcError Traceback (most recent call last)
/usr/local/lib/python3.11/dist-packages/grpc/_channel.py in _end_unary_response_blocking(state, call, with_call, deadline)
1004 return state.response
1005 else:
-> 1006 raise _InactiveRpcError(state) # pytype: disable=not-instantiable
1007
1008
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.PERMISSION_DENIED
details = "PrivilegeCreateDatabase: permission deny to db_12c257bfa330beb in the
db_12c257bfa330beb
database"debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"PrivilegeCreateDatabase: permission deny to db_12c257bfa330beb in the
db_12c257bfa330beb
database", grpc_status:7, created_time:"2025-03-19T09:44:43.830358413+00:00"}"Beta Was this translation helpful? Give feedback.
All reactions