列出下一个存储桶页面的Minio Weird错误

时间:2018-07-01 12:42:53

标签: amazon-web-services amazon-s3 minio

在使用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

Amazon AWS S3 SDK com.amazonaws:aws-java-sdk-s3:1.11.356

1 个答案:

答案 0 :(得分:0)

因此它与我构建keyName的方式有关。奇怪的是,初始objectListing请求将使用诸如“ thing // stuff /”之类的前缀,但是该前缀对于随后的请求来说是无效的。确保我的密钥不包含重复的斜杠来解决此问题。