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

Failed to access milvus due to "Network Error" #724

Open
conderls opened this issue Dec 22, 2024 · 5 comments
Open

Failed to access milvus due to "Network Error" #724

conderls opened this issue Dec 22, 2024 · 5 comments

Comments

@conderls
Copy link

Describe the bug:
failed to access milvus server, and shows 'Network Error'
image

Steps to reproduce:

# cluster side
# ------------
# 1. run milvus-v2.5-beta
bash standalone_embed.sh start

# 2. start attu-v2.4
# 172.17.0.1 is the ip of `docker0`  with `ifconfig` command
docker run -p 8000:3000 -e MILVUS_URL=172.17.0.1:19530 -e HOST_URL=http://172.17.0.1:8000 docker.unsee.tech/zilliz/attu:v2.4

# 3. milvus server is accessible with python SDK
from pymilvus import MilvusClient
client = MilvusClient(uri="http://localhost:19530")
client.list_databases()
# output: ['default']

# client side
# ---------
# 1. forward the port
# I can ssh login via `cluster_ip`
ssh -NfL 8000:localhost:8000 cluster_ip
# 2. access the attu via 
http://localhost:8000/
  • IP of docker0
    image

Milvus version:

  • v2.4.18

Attu version:

  • v2.4

more detailed docs
As I check the issues, there a few issues are similar like this one, but not well clarified.
for one common circumstance, start the milvus standalone mode via official settings using docker, how to start the attu painlessly to connect to the milvus server.

@shanghaikid
Copy link
Collaborator

Please make sure the attu container can access your milvus ip, in your case, is 172.17.0.1:19530.

So what is the ip address of your attu container?

@conderls
Copy link
Author

Please make sure the attu container can access your milvus ip, in your case, is 172.17.0.1:19530.

So what is the ip address of your attu container?

does it mean that I cannot use attu if my laptop DOES NOT connect to a network after I install the attu/milvus via docker?

@shanghaikid
Copy link
Collaborator

Please make sure the attu container can access your milvus ip, in your case, is 172.17.0.1:19530.
So what is the ip address of your attu container?

does it mean that I cannot use attu if my laptop DOES NOT connect to a network after I install the attu/milvus via docker?

you can use it, you need to ensure that the network in the Attu Docker has access to the Milvus server.

@conderls
Copy link
Author

conderls commented Jan 5, 2025

Please make sure the attu container can access your milvus ip, in your case, is 172.17.0.1:19530.
So what is the ip address of your attu container?

does it mean that I cannot use attu if my laptop DOES NOT connect to a network after I install the attu/milvus via docker?

you can use it, you need to ensure that the network in the Attu Docker has access to the Milvus server.

could you please show me more details about how to "ensure that the network in the Attu Docker has access to the Milvus server." as I start milvus in standalone mode and docker run attu image, both are with docker

using docker inspect to get the IPAddress

# docker inspect container-ID -f "{{json .NetworkSettings.Networks }}"
# milvus -> "Gateway":"172.17.0.1","IPAddress":"172.17.0.3"
# attu -> "Gateway":"172.17.0.1","IPAddress":"172.17.0.4"

after I enter into the attu docker container, and I can access milus server with

export MILVUS_HOST="http://172.24.0.1"
export MILVUS_PORT=19530
export TOKEN="root:Milvus"

curl --request GET \
  --url "${MILVUS_HOST}:${MILVUS_PORT}/v1/vector/collections" \
  --header "Authorization: Bearer ${TOKEN}" \
  --header "accept: application/json" \
  --header "content-type: application/json"

{"code":200,"data":[ ...]}

but I still failed to access milvus server via attu webUI, and shows 'Network Error'

docker run --net=milvus -p 8000:3000 -e MILVUS_URL=172.24.0.1:19530 -e HOST_URL=http://0.0.0.0:8000
 docker.unsee.tech/zilliz/attu:v2.4

@shanghaikid
Copy link
Collaborator

This is what is happening during the connection

  1. you enter your ip in the browser with 172.24.0.1:19530
  2. your browser send request with the ip info to the attu server
  3. your attu server will try to connect to the ip, in the case is 172.24.0.1:19350
  4. so if your server is able to connect to the milvus ( 172.24.0.1:19350 ), everything should be ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants