赞
踩
milvus向量数据库安装按照官方教程比较顺利,但他的可视化管理界面attu安装成功却一直连接不上,找了半天发现时版本匹配的问题,现把踩坑记录分享给大家。
环境前提:docker-compse已经安装
mkdir milvus
cd milvus
wget https://github.com/milvus-io/milvus/releases/download/v2.0.2/milvus-standalone-docker-compose.yml -O docker-compose.yml
坑1:让attu和milvus在一个docker的network中,否则连接会报,因为他们不在一个docker网络中(docker-compse知识范畴):
Error: Failed to connect to Milvus: Error: 14 UNAVAILABLE: No
connection establised
修改后的docker-compse.yml如下
version: '3.5' services: etcd: container_name: milvus-etcd image: quay.io/coreos/etcd:v3.5.0 environment: - ETCD_AUTO_COMPACTION_MODE=revision - ETCD_AUTO_COMPACTION_RETENTION=1000 - ETCD_QUOTA_BACKEND_BYTES=4294967296 volumes: - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/etcd:/etcd command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd minio: container_name: milvus-minio image: minio/minio:RELEASE.2020-12-03T00-03-10Z environment: MINIO_ACCESS_KEY: minioadmin MINIO_SECRET_KEY: minioadmin volumes: - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_data command: minio server /minio_data healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] interval: 30s timeout: 20s retries: 3 standalone: container_name: milvus-standalone image: milvusdb/milvus:v2.0.2 command: ["milvus", "run", "standalone"] environment: ETCD_ENDPOINTS: etcd:2379 MINIO_ADDRESS: minio:9000 volumes: - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus ports: - "19530:19530" depends_on: - "etcd" - "minio" # 增加attu容器,注意版本必须是v2.2.2 attu: container_name: attu image: zilliz/attu:v2.2.2 environment: MILVUS_URL: standalone:19530 ports: - "3000:3000" depends_on: - "standalone" networks: default: name: milvus
坑2:我之前用的latest版本的attu镜像,浏览器界面http://localhost:3000点击connect会报如下错误,就是因为attu版本过高导致。
Milvus is not ready yet.
windows环境,linux环境需要加sudo
docker-compse up -d
安装成功后如下图,我用的docker-desktop,否则需要用docker ps 命令查看。
直接点击connet按钮,成功进入!
完毕,祝大家避坑!!!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。