zilliz cloud log in failed by token and url #7500

Closed
opened 2026-02-21 18:20:54 -05:00 by yindo · 5 comments
Owner

Originally created by @wmqKevin on GitHub (Jan 2, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

main

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image

✔️ Expected Behavior

log in to MilvusClient using the URL and token from Zilliz Cloud

Actual Behavior

I want to log in to MilvusClient using the URL and token from Zilliz Cloud. My .env parameters are as follows:

VECTOR_STORE=milvus
MILVUS_URI=https://....cloud.zilliz.com.cn
MILVUS_TOKEN=5968f3...9012a6477110fe55cdbad
MILVUS_USER=root
MILVUS_PASSWORD=Milvus

However, I found that I can't log in. I checked the source code and found that the login is written as client = MilvusClient(uri=config.uri, user=config.user, password=config.password, db_name=config.database). There is no place to use the token for login. Is there an issue with my parameter configuration?

Originally created by @wmqKevin on GitHub (Jan 2, 2025). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version main ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![image](https://github.com/user-attachments/assets/58f0feb3-4356-4b1e-b3a4-5014ccb05234) ### ✔️ Expected Behavior log in to MilvusClient using the URL and token from Zilliz Cloud ### ❌ Actual Behavior I want to log in to MilvusClient using the URL and token from Zilliz Cloud. My `.env` parameters are as follows: ``` VECTOR_STORE=milvus MILVUS_URI=https://....cloud.zilliz.com.cn MILVUS_TOKEN=5968f3...9012a6477110fe55cdbad MILVUS_USER=root MILVUS_PASSWORD=Milvus ``` However, I found that I can't log in. I checked the source code and found that the login is written as `client = MilvusClient(uri=config.uri, user=config.user, password=config.password, db_name=config.database)`. There is no place to use the token for login. Is there an issue with my parameter configuration?
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 18:20:54 -05:00
yindo closed this issue 2026-02-21 18:20:55 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 2, 2025):

Hey there, @wmqKevin! I'm a bot here to help you with bugs, questions, and contributing. Let's tackle this issue together!

The issue you're encountering seems to be related to the use of token-based authentication with Milvus in Dify. According to the Dify configuration, the MILVUS_TOKEN is indeed intended for token-based authentication [1]. However, it appears that the current implementation of the MilvusClient in your setup does not utilize the token for authentication, as you've observed in the source code.

To resolve this, you should ensure that the MilvusClient is configured to use the token for authentication. This might involve modifying the client initialization to include the token, if the current version of the client does not support it directly. You may need to check if there are updates or patches available that address this issue, or consider implementing a custom solution to pass the token during the client initialization.

Additionally, verify that the token is valid and has the necessary permissions on Zilliz Cloud, as the error message suggests checking the token's validity and permissions.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 2, 2025): <!-- Greeting --> Hey there, @wmqKevin! I'm a bot here to help you with bugs, questions, and contributing. Let's tackle this issue together! <!-- Answer --> The issue you're encountering seems to be related to the use of token-based authentication with Milvus in Dify. According to the Dify configuration, the `MILVUS_TOKEN` is indeed intended for token-based authentication <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/configs/middleware/vdb/milvus_config.py)</sup>. However, it appears that the current implementation of the `MilvusClient` in your setup does not utilize the token for authentication, as you've observed in the source code. To resolve this, you should ensure that the `MilvusClient` is configured to use the token for authentication. This might involve modifying the client initialization to include the token, if the current version of the client does not support it directly. You may need to check if there are updates or patches available that address this issue, or consider implementing a custom solution to pass the token during the client initialization. Additionally, verify that the token is valid and has the necessary permissions on Zilliz Cloud, as the error message suggests checking the token's validity and permissions. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/2e710b8f-f788-4549-b4d3-cd9e0031909d?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/2e710b8f-f788-4549-b4d3-cd9e0031909d?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/2e710b8f-f788-4549-b4d3-cd9e0031909d?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/2e710b8f-f788-4549-b4d3-cd9e0031909d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/2e710b8f-f788-4549-b4d3-cd9e0031909d?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/2e710b8f-f788-4549-b4d3-cd9e0031909d?feedback_type=other)</sup>
Author
Owner

@wmqKevin commented on GitHub (Jan 2, 2025):

Also, the documentation states that vector_store can be set to zilliz, but when I set it, I get the message "Vector store zilliz is not supported."
doc:
image
error:
image

@wmqKevin commented on GitHub (Jan 2, 2025): Also, the documentation states that vector_store can be set to zilliz, but when I set it, I get the message "Vector store zilliz is not supported." doc: ![image](https://github.com/user-attachments/assets/d303d032-bee7-4e68-b484-8341952f7d36) error: ![image](https://github.com/user-attachments/assets/dcb31e18-179f-4851-bba7-c6a9de516cb5)
Author
Owner

@crazywoola commented on GitHub (Jan 3, 2025):

VECTOR_STORE=milvus
MILVUS_URI=https://....cloud.zilliz.com.cn
MILVUS_TOKEN=5968f3...9012a6477110fe55cdbad
MILVUS_USER=
MILVUS_PASSWORD=

Try this.

@crazywoola commented on GitHub (Jan 3, 2025): ``` VECTOR_STORE=milvus MILVUS_URI=https://....cloud.zilliz.com.cn MILVUS_TOKEN=5968f3...9012a6477110fe55cdbad MILVUS_USER= MILVUS_PASSWORD= ``` Try this.
Author
Owner

@wmqKevin commented on GitHub (Jan 3, 2025):

image
It doesn't work~
image
I'am the token is valid.
I can log in by this.
image

@wmqKevin commented on GitHub (Jan 3, 2025): ![image](https://github.com/user-attachments/assets/bccacbbb-ff3a-4df5-a497-d2b74ce56441) It doesn't work~ ![image](https://github.com/user-attachments/assets/bae53fa3-191a-4d74-a552-427942bfa03d) I'am the token is valid. I can log in by this. ![image](https://github.com/user-attachments/assets/84b6785f-eb78-4463-9a5c-3245dfe661b1)
Author
Owner

@streif96 commented on GitHub (Jan 23, 2025):

Why is this closed? The issue is still not fixed. As stated above "I checked the source code and found that the login is written as client = MilvusClient(uri=config.uri, user=config.user, password=config.password, db_name=config.database). There is no place to use the token for login. Is there an issue with my parameter configuration?" this is still the case and does not work with a Zilliz Cloud token.

@streif96 commented on GitHub (Jan 23, 2025): Why is this closed? The issue is still not fixed. As stated above "I checked the source code and found that the login is written as client = MilvusClient(uri=config.uri, user=config.user, password=config.password, db_name=config.database). There is no place to use the token for login. Is there an issue with my parameter configuration?" this is still the case and does not work with a Zilliz Cloud token.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7500