Amazon s3 无法使用AWS Java SDK配置和运行pithos.io

Amazon s3 无法使用AWS Java SDK配置和运行pithos.io,amazon-s3,embedded-jetty,Amazon S3,Embedded Jetty,我正在尝试在我的服务器testmbr1.kabuter.com:8081上配置pithos.io: 下面是我如何启动pithos.io的: java -jar pithos-0.7.5-standalone.jar -f pithos.yaml 我的皮托斯·亚马尔: service: host: "0.0.0.0" port: 8081 logging: level: info console: true overrides: io.pithos: debug op

我正在尝试在我的服务器testmbr1.kabuter.com:8081上配置pithos.io:

下面是我如何启动pithos.io的:

java -jar pithos-0.7.5-standalone.jar -f pithos.yaml
我的皮托斯·亚马尔:

service:
  host: "0.0.0.0"
  port: 8081
logging:
  level: info
  console: true
  overrides:
    io.pithos: debug
options:
  service-uri: testmbr1.kabuter.com
  default-region: myregion
keystore:
  keys:
    AKIAIOSFODNN7EXAMPLE:
      master: true
      tenant: test@example.com
      secret: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
bucketstore:
  default-region: myregion
  cluster: "45.33.37.148"
  keyspace: storage
regions:
  myregion:
    metastore:
      cluster: "45.33.37.148"
      keyspace: storage
    storage-classes:
      standard:
        cluster: "45.33.37.148"
        keyspace: storage
        max-chunk: "128k"
        max-block-chunk: 1024
cassandra:
   saved_caches_directory: "target/db/saved_caches"
   data_file_directories:
     - "target/db/data"
   commitlog_directory: "target/db/commitlog"
我正在使用AWS Java SDK进行连接。以下是我的JUnit:

@Test
public void testPithosIO() {
try {
    ClientConfiguration config = new ClientConfiguration();
    config.setSignerOverride("S3SignerType");

    EndpointConfiguration endpointConfiguration = new EndpointConfiguration("http://testmbr1.kabuter.com:8081",
            "myregion");
    BasicAWSCredentials awsCreds = new BasicAWSCredentials("AKIAIOSFODNN7EXAMPLE",
            "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY");
    AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
            .withRegion("myregion")
            .withClientConfiguration(config)
            .withCredentials(new AWSStaticCredentialsProvider(awsCreds))
            .withEndpointConfiguration(endpointConfiguration).build();
    s3Client.createBucket("mybucket1");
    System.out.println(s3Client.getRegionName());
    System.out.println(s3Client.listBuckets());
} catch (Exception e) {
    e.printStackTrace();
}
}
我的问题是1)我得到:com.amazonaws.SdkClientException:无法执行HTTP请求:连接到mybucket1.testmbr1.kabuter.com:8081[mybucket1.testmbr1.kabuter.com/198.105.254.130,mybucket1.testmbr1.kabuter.com/104.239.207.44]失败:连接超时

通过添加指向testmbr1.kabuter.com的mybucket1.testmbr1 CNAME记录修复了这一问题

2) 在尝试创建bucket:s3Client.createBucket(“mybucket1”)时,我得到:

com.amazonaws.services.s3.model.AmazonS3Exception: The request signature we calculated does not match the signature you provided. Check your key and signing method. (Service: Amazon S3; Status Code: 403; Error Code: SignatureDoesNotMatch; Request ID: d98b7908-d11e-458a-be27-254b136f344a), S3 Extended Request ID: d98b7908-d11e-458a-be27-254b136f344a
我如何让它工作?pithos.io的文档似乎有限


有指针吗?

因为我的端点使用的是非标准端口:

http://testmbr1.kabuter.com:8081
我必须在pithos.yaml中使用端口定义服务器uri:

server-uri : testmbr1.kabuter.com:8081