-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Bug]: S3 Milvus - can insert entities but failing to create index (Error:GetObjectSize: No response body.
)
#25939
Comments
/assign @jiaoew1991 /unassign |
/assign @zhagnlu /unassign |
Could you upgrade milvus version to 2.2.12 which has ability to get more key log. |
I thought to solve this problem, you will need to specify region of your S3 in your milvus.yaml |
it would also work if you specify on your system env |
yes I have set |
what is the name of the environment variables that should be set? what should they be set to? |
Here is the log I get after upgrading and setting
|
I think you will need to setup the region config, especially if you are trying to use S3 and running milvus on macos or windows. try to change the milvus.yaml file region field? |
but the aws S3 user experience really sucks |
I have set I am running on AWS EC2 linux, in the same service region (eu-north-1) as the S3 bucket. My IAM credential have FULL S3 access. I have configured my aws from the CLI - I can query the target bucket succesfully with the same credentials:
I have set
I agree. In general it's very counterintuitive. It's strange that I can successfully insert entities, but making the index fails. Here's my latest
Is anything missing? |
I deleted the local
|
Not Every entity directly flushed to S3. |
I think that's the major reason, but I'm not sure what is happening. seems to be still related to IAM https://stackoverflow.com/questions/50826093/failed-to-retrieve-credentials-from-ec2-instance-metadata-service milvus-standalone | 2023-07-27 13:59:00,799 | INFO | default | [SEGCORE][ProcessFormattedStatement][milvus] [AWS LOG] [ERROR] 2023-07-27 13:59:00.799 EC2MetadataClient [140408944322304] Http request to retrieve credentials failed |
Thanks. I will take a look. Is there no step-by-step guide on how to setup S3 with Milvus? Something that includes the IAM specification, bucket setup etc? |
Upon running
I can successfully retrieve the EC2 instance metadata and I no longer get
Could this be the problem? How can I make Milvus request this metedata token? |
Is this an error in my configuration or how Milvus connects to the AWS metadata API? |
Are there any specific ACLs or permissions that must be setup on the S3 bucket? |
UPDATE: after switching to Google Cloud Storage, I successfully created the index with no friction. It would be great it Google Cloud Storage setup is added to the documentation. For anyone who is interested, here is my minio config:
I setup HMAC keys on GCP and granted Cloud Storage admin access. |
Hi I was trying to use a local MinIO and run into the same problem. Datanode and working fine when inserting. But when craeting index, it gives the following. What cloudProvide Name should I use instead?
|
did you follow any of these documents https://milvus.io/docs/eks.md https://milvus.io/docs/aws.md |
OH I found a fix from #25432 Problem should not be with aws sdk. Version 2.2.13 and 2.2.4 are using the same version aws. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is there an existing issue for this?
Environment
Current Behavior
I have deployed Milvus standalone to my EC2 instance, connected to S3 for storage.
The connection seems to be successful. Insertions are successful, and files appear in my S3 bucket.
However, when I create an index, the command hangs and I get the following error logs:
Here is my Milvus standalone config, kindly provided by @locustbaby:
docker-compose.yml
``` services: etcd: container_name: milvus-etcd image: quay.io/coreos/etcd:v3.5.5 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 /etcdfrom pymilvus import CollectionSchema, FieldSchema, DataType, Collection, connections
connections.connect(alias=, host=, port=)
book_id = FieldSchema(
name="book_id",
dtype=DataType.INT64,
is_primary=True,
)
book_name = FieldSchema(
name="book_name",
dtype=DataType.VARCHAR,
max_length=200,
)
word_count = FieldSchema(
name="word_count",
dtype=DataType.INT64,
)
book_intro = FieldSchema(
name="book_intro",
dtype=DataType.FLOAT_VECTOR,
dim=2
)
schema = CollectionSchema(
fields=[book_id, book_name, word_count, book_intro],
description="Test book search",
enable_dynamic_field=True
)
collection_name = "book"
collection = Collection(
collection_name, schema, consistency_level="Strong", using="default2"
)
import numpy as np
entities = [
[i for i in range(1000)],
["book_name" for i in range(1000)],
[100 for i in range(1000)],
[np.zeros(2) for i in range(1000)],
]
insert_result = collection.insert(entities)
def create_index(
collection,
index_field="embeddings",
index_params={
"index_type": "IVF_FLAT",
"params": {"nlist": 4096},
"metric_type": "IP",
},
):
collection.create_index(field_name=index_field, index_params=index_params)
create_index(collection, "book_intro")
milvus-standalone | [2023/07/25 21:19:03.009 +00:00] [INFO] [indexnode/task.go:317] ["index params are ready"] [buildID=443101205607962167] ["index params"="{"dim":"512","index_type":"IVF_FLAT","metric_type":"IP","nlist":"4096"}"]
milvus-standalone | [2023/07/25 21:19:03.009 +00:00] [INFO] [gc/gc_tuner.go:84] ["GC Tune done"] ["previous GOGC"=200] ["heapuse "=138] ["total memory"=663] ["next GC"=302] ["new GOGC"=200] [gc-pause=54.667µs] [gc-pause-end=1690319943000578687]
milvus-standalone | 2023-07-25 21:19:03,010 | INFO | default | [SEGCORE][N6milvus7storage17MinioChunkManagerE::MinioChunkManager][milvus] init MinioChunkManager with parameter[endpoint: 's3.eu-north-1.amazonaws.com:443', default_bucket_name:'sp-milvus', use_secure:'true']
milvus-standalone | [2023/07/25 21:19:03.026 +00:00] [WARN] [indexcgowrapper/helper.go:76] ["failed to create index, C Runtime Exception: [UnexpectedError] Error:GetObjectSize: No response body.\n"]
milvus-standalone | [2023/07/25 21:19:03.026 +00:00] [ERROR] [indexnode/task.go:340] ["failed to build index"] [error="[UnexpectedError] Error:GetObjectSize: No response body."] [stack="github.com/milvus-io/milvus/internal/indexnode.(*indexBuildTask).BuildIndex\n\t/go/src/github.com/milvus-io/milvus/internal/indexnode/task.go:340\ngithub.com/milvus-io/milvus/internal/indexnode.(*TaskScheduler).processTask.func1\n\t/go/src/github.com/milvus-io/milvus/internal/indexnode/task_scheduler.go:207\ngithub.com/milvus-io/milvus/internal/indexnode.(*TaskScheduler).processTask\n\t/go/src/github.com/milvus-io/milvus/internal/indexnode/task_scheduler.go:220\ngithub.com/milvus-io/milvus/internal/indexnode.(*TaskScheduler).indexBuildLoop.func1\n\t/go/src/github.com/milvus-io/milvus/internal/indexnode/task_scheduler.go:253"]
milvus-standalone | [2023/07/25 21:19:03.026 +00:00] [INFO] [indexnode/taskinfo_ops.go:42] ["IndexNode store task state"] [clusterID=by-dev] [buildID=443101205607962167] [state=Retry] ["fail reason"="[UnexpectedError] Error:GetObjectSize: No response body."]
The text was updated successfully, but these errors were encountered: