rgw报错SignatureDoesNotMatch

一、sdk版本


            com.amazonaws
            aws-java-sdk-s3
            1.11.475

二、错误信息

Service: Amazon S3; Status Code: 403; Error Code: SignatureDoesNotMatch; Request ID: tx000000000000001ef0edf-005e044b35-11611a-default; S3 Extended Request ID: 11611a-default-default
 

三、解决方法

添加disableChunkedEncoding()

 

例子:

AmazonS3 amazonS3 = AmazonS3ClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(credentials))
                .withEndpointConfiguration(
                        new AwsClientBuilder.EndpointConfiguration(INNER_HOSTS[RandomUtils.getRandomNum(INNER_HOSTS.length)],""))
                .disableChunkedEncoding().build();

四、如果还是不行,试试

it works without clientConfiguration.setSignerOverride("AWSS3V4SignerType")

你可能感兴趣的:(分布式存储)