Skip to content

Question about Using AWS S3 in region "cn-northwest-1"(China) #294

@zhangsimingshannonai

Description

@zhangsimingshannonai

My S3 bucket is in AWS-CHINA, region is "cn-northwest-1", but I didn't find anything about this in the src, Is ice support china-region?

I used ice in kubernetes way.
Here is my configmap-ice.yaml

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: ice
data:
  ice.properties: |
    ice.processor=true
    ice.reader=true
    ice.reservationCapacityPoller=false
    ice.reservationPeriod=oneyear
    ice.reservationUtilization=HEAVY
    ice.highstockUrl=https://code.highcharts.com/stock/4.2.1/highstock.js
    ice.urlPrefix=aws.shannonai
    ice.fromEmail=xxxxxxxxxxxxxxxxxxxxxxxx
    ice.ondemandCostAlertThreshold=250
    ice.s3SecretKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    ice.billing_s3bucketname=xxxxxxxxxxxx
    ice.billing_s3bucketregion=cn-northwest-1
    ice.billing_accessRoleName=xxxxxxxxxxxxxxxxx
    ice.startmillis=1364774400000
    ice.companyName=shannonai
    ice.work_s3bucketname=xxxxxxxxxxxxxxxxxx
    ice.work_s3bucketprefix=ice/
    ice.work_s3bucketregion=cn-northwest-1
    ice.processor.localDir=/mnt/ice_processor
    ice.reader.localDir=/mnt/ice_reader
    ice.monthlycachesize=12

Here is my deployment.yaml's env part

  - name: ice
          image: harbor.shannonai.com/test/ice:latest
          ports:
            - containerPort: 8080
          imagePullPolicy: IfNotPresent
          env: 
            - name: GRAILS_OPTS 
              value: "-server -Xmx2G -Xms1G -Dfile.encoding=UTF-8"
            - name: EC2_REGION
              value: cn-northwest-1
            - name: AWS_DEFAULT_REGION
              value: cn-northwest-1
          command:
            - /opt/ice/grailsw
            - -Djava.net.preferIPv4Stack=true
            - -Djava.net.preferIPv4Addresses
            - -Duser.timezone=Asia/Shanghai
            - -Dice.s3AccessKeyId=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            - -Dice.s3SecretKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            - run-app

The error I met is

2019-10-15 18:17:32,210 [localhost-startStop-1] INFO  BootStrap  - Starting ice...
| Error com.amazonaws.services.s3.model.AmazonS3Exception: The authorization header is malformed; the authorization component "Credential=xxxxxxxxxxxxxx/20191015/us-east-1/s3/aws4_request" is malformed. (Service: Amazon S3; Status Code: 400; Error Code: AuthorizationHeaderMalformed; Request ID: 194A470802DB493B), S3 Extended Request ID: U0DPCCZy6ZswY91v4lav0jjMX7SEtAn6S+OHsCTMIU3Z7BGo9Q1mRNJF/eUk1NyPlm91vKRH0Ak=

It seems that ice is still connect to the default s3 region "us-east-1", where did I misconfig? Please help me to figure it out, thanks very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions