aliyun / aliyun-cli

Alibaba Cloud CLI
Apache License 2.0
827 stars 198 forks source link

aliyun sts GetCallerIdentity timeout #384

Closed oort7 closed 3 years ago

oort7 commented 3 years ago

Failure rate: >50% We are getting this error very often. Sometimes this command succeeds after 10 or more retries.

Aliyun cli version: latest (3.0.90)

JacksonTian commented 3 years ago

Where are your call from? The sts.aliyuncs.com is hosted mainland.

JacksonTian commented 3 years ago
aliyun | grep timeout
  --read-timeout       use `--read-timeout <seconds>` to set I/O timeout(seconds)
  --connect-timeout    use `--connect-timeout <seconds>` to set connect timeout(seconds)

You can use above timeout flags.

oort7 commented 3 years ago

We are calling sts from servers located in Europe. If command works, it returns within a few seconds. Unfortunately if there is a problem, setting timeouts even to 300 seconds doesn't help and we are getting this error.

JacksonTian commented 3 years ago

you can use --sts-region flag to specify a regional endpoint. e.g.

aliyun sts GetCallerIdentity --sts-region eu-west-1  xxxx