Rancher服务器安装
2.6.5

cred信息通过测试是正确的
员额/元/aksCheckCred纲
得到响应
{"error":"could not find tenant ID: Request failed: subscriptions.Client#Get: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded"}发布于 2022-07-19 03:22:20
在阅读了代码之后,我在发送请求之前找到了它,牧场主将设置context.WithTimeout
func FindTenantID(ctx context.Context, env azure.Environment, subscriptionID string) (string, error) {
goCtx, cancel := context.WithTimeout(ctx, findTenantIDTimeout)
defer cancel()
....
}最后,我通过将系统时区更改为我的本地区域来解决这个问题,默认值是UTC。
root@xxx:~# timedatectl
Local time: Tue 2022-07-19 03:20:00 UTC
Universal time: Tue 2022-07-19 03:20:00 UTC
RTC time: Tue 2022-07-19 03:20:01
Time zone: UTC (UTC, +0000)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no变化时区
timedatectl list-timezones | grep -i shang
sudo timedatectl set-timezone Asia/Shanghai您必须重新启动,,重新启动牧场主是不工作的。
我不知道这是牧场主或蓝蓝sdk的错误
我还发现,环境字段不会由代码处理。
https://stackoverflow.com/questions/73030747
复制相似问题