使用 docker compse 启动 Milvus 修改 MINIO_ACCESS_KEY 导致启动失败
使用 docker compse 启动 Milvus 修改 MINIO_ACCESS_KEY 导致启动失败
通过Milvus github上的issue 发现如下问题
[Bug]: Milvus fails to start after changing minio's MINIO_ACCESS_KEY #28458
https://github.com/milvus-io/milvus/issues/28458
[Bug]: change MINIO_SECRET_KEY, milvus-standalone cant start #39316
https://github.com/milvus-io/milvus/issues/39316
解决方案:
需要在 milvus.yaml 做相应修改
minio:# IP address of MinIO or S3 service.# Environment variable: MINIO_ADDRESS# minio.address and minio.port together generate the valid access to MinIO or S3 service.# MinIO preferentially acquires the valid IP address from the environment variable MINIO_ADDRESS when Milvus is started.# Default value applies when MinIO or S3 is running on the same network with Milvus.address: localhostport: 9000 # Port of MinIO or S3 service.# Access key ID that MinIO or S3 issues to user for authorized access.# Environment variable: MINIO_ACCESS_KEY_ID or minio.accessKeyID# minio.accessKeyID and minio.secretAccessKey together are used for identity authentication to access the MinIO or S3 service.# This configuration must be set identical to the environment variable MINIO_ACCESS_KEY_ID, which is necessary for starting MinIO or S3.# The default value applies to MinIO or S3 service that started with the default docker-compose.yml file.accessKeyID: 你的新KEY# Secret key used to encrypt the signature string and verify the signature string on server. It must be kept strictly confidential and accessib
le only to the MinIO or S3 server and users.# Environment variable: MINIO_SECRET_ACCESS_KEY or minio.secretAccessKey# minio.accessKeyID and minio.secretAccessKey together are used for identity authentication to access the MinIO or S3 service.# This configuration must be set identical to the environment variable MINIO_SECRET_ACCESS_KEY, which is necessary for starting MinIO or S3.# The default value applies to MinIO or S3 service that started with the default docker-compose.yml file.secretAccessKey: 你的新KEY
完整的docker-compose.yml
version: '3.5'services:etcd:container_name: milvus-etcdimage: quay.io/coreos/etcd:v3.5.18environment:- ETCD_AUTO_COMPACTION_MODE=revision- ETCD_AUTO_COMPACTION_RETENTION=1000- ETCD_QUOTA_BACKEND_BYTES=4294967296- ETCD_SNAPSHOT_COUNT=50000volumes:- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/etcd:/etcdcommand: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcdhealthcheck:test: ["CMD", "etcdctl", "endpoint", "health"]interval: 30stimeout: 20sretries: 3minio:container_name: milvus-minioimage: minio/minio:RELEASE.2023-03-20T20-16-18Zenvironment:MINIO_ACCESS_KEY: 你的ACCESS_KEYMINIO_SECRET_KEY: 你的SECRET_KEports:- "9001:9001"- "9000:9000"volumes:- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_datacommand: minio server /minio_data --console-address ":9001"healthcheck:test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]interval: 30stimeout: 20sretries: 3standalone:container_name: milvus-standaloneimage: milvusdb/milvus:v2.5.6command: ["milvus", "run", "standalone"]security_opt:- seccomp:unconfinedenvironment:ETCD_ENDPOINTS: etcd:2379MINIO_ADDRESS: minio:9000volumes:- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus- /milvus/config/milvus.yaml:/milvus/configs/milvus.yamlhealthcheck:test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]interval: 30sstart_period: 90stimeout: 20sretries: 3ports:- "19530:19530"- "9091:9091"depends_on:- "etcd"- "minio"networks:default:name: milvus