Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

milvus local uri does not work #8562

Closed
5 tasks done
zc277584121 opened this issue Sep 19, 2024 · 1 comment
Closed
5 tasks done

milvus local uri does not work #8562

zc277584121 opened this issue Sep 19, 2024 · 1 comment
Labels
👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database.

Comments

@zc277584121
Copy link
Contributor

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

0.8.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

git clone https://github.com/langgenius/dify.git
cd dify/docker

the environment configuration file

cp .env.example .env

Change the value VECTOR_STORE in the .env file

VECTOR_STORE=milvus

Change the Milvus configuration in the .env file

MILVUS_URI=http://127.0.0.1:19530

For the MILVUS_URI setting, 127.0.0.1 or localhost does not work. However, if I set the it as an external uri of the server e.g.http://172.16.70.6:19530, it works.

I tried to enter the api and worker container, and then tried to ping 127.0.0.1:19530, but it failed. This means that the two containers and the milvus standalone container do not share the same IP 127.0.0.1 . But when I change it to an external IP format, it worked, because every container can successfully ping the external IP.

I don't know much about network settings. I'm not sure if this is a bug, but it looks like a bug.

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

@dosubot dosubot bot added the 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. label Sep 19, 2024
Copy link

dosubot bot commented Sep 19, 2024

The issue you're encountering with the MILVUS_URI setting is due to how Docker handles networking. In Docker, 127.0.0.1 or localhost refers to the container itself, not the host machine or other containers. Therefore, the Milvus service cannot be reached using these addresses.

Instead, you should use the service name defined in the Docker Compose file, which allows Docker's internal DNS to resolve the correct container. For example, if the Milvus service is defined in the Docker Compose file with the name milvus-standalone, you should set MILVUS_URI to http://milvus-standalone:19530.

Here's how you can update your .env file:

MILVUS_URI=http://milvus-standalone:19530

This way, Docker will correctly route the request to the Milvus container.

For more details, you can refer to the Dify documentation and the .env.example file in the repository [1][2][3][4].

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database.
Projects
None yet
Development

No branches or pull requests

3 participants
@zc277584121 @JohnJyong and others