使用 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: localhost
port: 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-etcd
image: quay.io/coreos/etcd:v3.5.18
environment:
- ETCD_AUTO_COMPACTION_MODE=revision
- ETCD_AUTO_COMPACTION_RETENTION=1000
- ETCD_QUOTA_BACKEND_BYTES=4294967296
- ETCD_SNAPSHOT_COUNT=50000
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
healthcheck:
test: ["CMD", "etcdctl", "endpoint", "health"]
interval: 30s
timeout: 20s
retries: 3
minio:
container_name: milvus-minio
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
environment:
MINIO_ACCESS_KEY: 你的ACCESS_KEY
MINIO_SECRET_KEY: 你的SECRET_KE
ports:
- "9001:9001"
- "9000:9000"
volumes:
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_data
command: minio server /minio_data --console-address ":9001"
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.5.6
command: ["milvus", "run", "standalone"]
security_opt:
- seccomp:unconfined
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: minio:9000
volumes:
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus
- /milvus/config/milvus.yaml:/milvus/configs/milvus.yaml
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]
interval: 30s
start_period: 90s
timeout: 20s
retries: 3
ports:
- "19530:19530"
- "9091:9091"
depends_on:
- "etcd"
- "minio"
networks:
default:
name: milvus