使用 minio 进行本地开发/测试时出现一个奇怪的错误:
com.amazonaws.services.s3.model.AmazonS3Exception: A header you provided
implies functionality that is not implemented (Service: Amazon S3; Status Code:
501; Error Code: NotImplemented; Request ID: 3L137; S3 Extended Request ID: 3L137),
S3 Extended Request ID: 3L137
堆栈跟踪显示这是飞出
at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:840)
at com.amazonaws.services.s3.AmazonS3Client.listNextBatchOfObjects(AmazonS3Client.java:911)
at com.amazonaws.services.s3.AmazonS3Client.listNextBatchOfObjects(AmazonS3Client.java:888)
在 Minio 本身上,我看到了与错误相关的日志:
minio_1 | Error: Invalid combination of marker 'd18d5d46-296d-4327-9304-fb72401fc5b6/some-data/ea4026b6-86a6-4950-b8e4-be0e1da80dfd.txt' and prefix 'd18d5d46-296d-4327-9304-fb72401fc5b6//some-data/'
minio_1 | 1: cmd/object-api-input-checks.go:87:cmd.checkListObjsArgs()
minio_1 | 2: cmd/fs-v1.go:1047:cmd.(*FSObjects).ListObjects()
minio_1 | 3: cmd/bucket-handlers-listobjects.go:156:cmd.(ObjectLayer).ListObjects-fm()
minio_1 | 4: cmd/bucket-handlers-listobjects.go:163:cmd.objectAPIHandlers.ListObjectsV1Handler()
minio_1 | 5: cmd/api-router.go:101:cmd.(objectAPIHandlers).ListObjectsV1Handler-fm()
minio_1 | 6: net/http/server.go:1947:http.HandlerFunc.ServeHTTP()
这里重要的是列出对象的初始请求工作正常。当我去调用listNextBatchOfObjects时,有问题,相关代码:
List<String> nextPage() {
List<String> blobNames = objectListing.objectSummaries.collect { S3ObjectSummary objectSummary ->
String blobName = objectSummary.key
if (removePrefix) {
blobName = blobName.replaceAll("^${removePrefix}/", '')
}
return blobName
}
objectListing = s3Client.listNextBatchOfObjects(objectListing)
return blobNames
}
相关版本:
Docker minio/minio 上的 Minio:RELEASE.2018-06-29T02-11-29Z
亚马逊 AWS S3 开发工具包 com.amazonaws:aws-java-sdk-s3:1.11.356