Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dnsapi] huaweicloud issue cert not work #3296

Open
xlight opened this issue Dec 9, 2020 · 5 comments
Open

[dnsapi] huaweicloud issue cert not work #3296

xlight opened this issue Dec 9, 2020 · 5 comments

Comments

@xlight
Copy link

xlight commented Dec 9, 2020

看起来添加txt record 环节一直再循环
@eastonman 不知道有没有时间看一下?

Steps to reproduce

export HUAWEICLOUD_ProjectID=07540a9333000f6xxxxxxxxxxe0
export HUAWEICLOUD_Username=Exxxxxxe
export HUAWEICLOUD_Password=yTxxxxxxxxxx5b3
acme.sh --issue --dns dns_huaweicloud  -d test.xxxxxx.com.cn --debug 2

Debug log

[Wed Dec  9 14:13:32 CST 2020] d_api='/root/.acme.sh/dnsapi/dns_huaweicloud.sh'
[Wed Dec  9 14:13:32 CST 2020] dns_entry='test.xxxx.com.cn,_acme-challenge.test.xxxx.com.cn,,dns_huaweicloud,ntyGVl0xxxxxx8IONG6RMI,/root/.acme.sh/dnsapi/dns_huaweicloud.sh'
[Wed Dec  9 14:13:32 CST 2020] Found domain api file: /root/.acme.sh/dnsapi/dns_huaweicloud.sh
[Wed Dec  9 14:13:32 CST 2020] Adding txt value: ntyGVl05-xxxx-333333 for domain:  _acme-challenge.test.xxxx.com.cn
[Wed Dec  9 14:13:32 CST 2020] Getting Token
[Wed Dec  9 14:13:32 CST 2020] POST
[Wed Dec  9 14:13:32 CST 2020] _post_url='https://iam.myhuaweicloud.com/v3/auth/tokens'
[Wed Dec  9 14:13:32 CST 2020] body='{
    "auth": {
      "identity": {
        "methods": [
          "password"
        ],
        "password": {
          "user": {
            "name": "ETxxxxxxike",
            "password": "yTxxxxxxxxx5b3",
            "domain": {
              "name": "ETxxxxxxike"
            }
          }
        }
      },
      "scope": {
        "project": {
          "id": "07540a9xxxxxxxxxxx43e0acme.sh"
        }
      }
    }
  }'
[Wed Dec  9 14:13:32 CST 2020] _postContentType
[Wed Dec  9 14:13:32 CST 2020] Http already initialized.
[Wed Dec  9 14:13:32 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:33 CST 2020] _ret='0'
[Wed Dec  9 14:13:33 CST 2020] 400
[Wed Dec  9 14:13:33 CST 2020] 
[Wed Dec  9 14:13:33 CST 2020] _acme-challenge.test.xxxx.com.cn
[Wed Dec  9 14:13:33 CST 2020] GET
[Wed Dec  9 14:13:33 CST 2020] url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones?name=_acme-challenge.test.xxxx.com.cn'
[Wed Dec  9 14:13:33 CST 2020] timeout=
[Wed Dec  9 14:13:33 CST 2020] Http already initialized.
[Wed Dec  9 14:13:33 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:33 CST 2020] ret='0'
[Wed Dec  9 14:13:33 CST 2020] Get Zone ID Success.
[Wed Dec  9 14:13:33 CST 2020] 
[Wed Dec  9 14:13:33 CST 2020] Adding Record
[Wed Dec  9 14:13:33 CST 2020] GET
[Wed Dec  9 14:13:33 CST 2020] url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets?name=_acme-challenge.test.xxxx.com.cn'
[Wed Dec  9 14:13:33 CST 2020] timeout=
[Wed Dec  9 14:13:33 CST 2020] Http already initialized.
[Wed Dec  9 14:13:33 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:33 CST 2020] ret='0'
[Wed Dec  9 14:13:33 CST 2020] {"error_msg":"The API does not exist or has not been published in the environment","error_code":"APIGW.0101","request_id":"987da3ceb420f93ef0c186284f753bfc"}
[Wed Dec  9 14:13:33 CST 2020] 
[Wed Dec  9 14:13:33 CST 2020] GET
[Wed Dec  9 14:13:33 CST 2020] url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets?name=_acme-challenge.test.xxxx.com.cn'
[Wed Dec  9 14:13:33 CST 2020] timeout=
[Wed Dec  9 14:13:33 CST 2020] Http already initialized.
[Wed Dec  9 14:13:33 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:33 CST 2020] ret='0'
[Wed Dec  9 14:13:33 CST 2020] Record Set ID is: 
[Wed Dec  9 14:13:33 CST 2020] Removing Record
[Wed Dec  9 14:13:33 CST 2020] DELETE
[Wed Dec  9 14:13:33 CST 2020] _post_url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets/'
[Wed Dec  9 14:13:33 CST 2020] body
[Wed Dec  9 14:13:33 CST 2020] _postContentType
[Wed Dec  9 14:13:33 CST 2020] Http already initialized.
[Wed Dec  9 14:13:33 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:34 CST 2020] _ret='0'
[Wed Dec  9 14:13:34 CST 2020] GET
[Wed Dec  9 14:13:34 CST 2020] url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets?name=_acme-challenge.test.xxxx.com.cn'
[Wed Dec  9 14:13:34 CST 2020] timeout=
[Wed Dec  9 14:13:34 CST 2020] Http already initialized.
[Wed Dec  9 14:13:34 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:34 CST 2020] ret='0'
[Wed Dec  9 14:13:34 CST 2020] Removing Record
[Wed Dec  9 14:13:34 CST 2020] DELETE
[Wed Dec  9 14:13:34 CST 2020] _post_url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets/'
[Wed Dec  9 14:13:34 CST 2020] body
[Wed Dec  9 14:13:34 CST 2020] _postContentType
[Wed Dec  9 14:13:34 CST 2020] Http already initialized.
[Wed Dec  9 14:13:34 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:34 CST 2020] _ret='0'
[Wed Dec  9 14:13:34 CST 2020] GET
[Wed Dec  9 14:13:34 CST 2020] url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets?name=_acme-challenge.test.xxxx.com.cn'
[Wed Dec  9 14:13:34 CST 2020] timeout=
[Wed Dec  9 14:13:34 CST 2020] Http already initialized.
[Wed Dec  9 14:13:34 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:35 CST 2020] ret='0'
[Wed Dec  9 14:13:35 CST 2020] Removing Record
[Wed Dec  9 14:13:35 CST 2020] DELETE
[Wed Dec  9 14:13:35 CST 2020] _post_url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets/'
[Wed Dec  9 14:13:35 CST 2020] body
[Wed Dec  9 14:13:35 CST 2020] _postContentType
[Wed Dec  9 14:13:35 CST 2020] Http already initialized.
[Wed Dec  9 14:13:35 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:35 CST 2020] _ret='0'
[Wed Dec  9 14:13:35 CST 2020] GET
[Wed Dec  9 14:13:35 CST 2020] url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets?name=_acme-challenge.test.xxxx.com.cn'
[Wed Dec  9 14:13:35 CST 2020] timeout=
[Wed Dec  9 14:13:35 CST 2020] Http already initialized.
[Wed Dec  9 14:13:35 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:35 CST 2020] ret='0'
[Wed Dec  9 14:13:35 CST 2020] Removing Record
[Wed Dec  9 14:13:35 CST 2020] DELETE
[Wed Dec  9 14:13:35 CST 2020] _post_url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets/'
[Wed Dec  9 14:13:35 CST 2020] body
[Wed Dec  9 14:13:35 CST 2020] _postContentType
[Wed Dec  9 14:13:35 CST 2020] Http already initialized.
[Wed Dec  9 14:13:35 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:35 CST 2020] _ret='0'
[Wed Dec  9 14:13:35 CST 2020] GET
[Wed Dec  9 14:13:35 CST 2020] url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets?name=_acme-challenge.test.xxxx.com.cn'
[Wed Dec  9 14:13:35 CST 2020] timeout=
[Wed Dec  9 14:13:36 CST 2020] Http already initialized.
[Wed Dec  9 14:13:36 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:36 CST 2020] ret='0'
[Wed Dec  9 14:13:36 CST 2020] Removing Record
[Wed Dec  9 14:13:36 CST 2020] DELETE
[Wed Dec  9 14:13:36 CST 2020] _post_url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets/'
[Wed Dec  9 14:13:36 CST 2020] body
[Wed Dec  9 14:13:36 CST 2020] _postContentType
[Wed Dec  9 14:13:36 CST 2020] Http already initialized.
[Wed Dec  9 14:13:36 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:36 CST 2020] _ret='0'
[Wed Dec  9 14:13:36 CST 2020] GET
[Wed Dec  9 14:13:36 CST 2020] url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets?name=_acme-challenge.test.xxxx.com.cn'
[Wed Dec  9 14:13:36 CST 2020] timeout=
[Wed Dec  9 14:13:36 CST 2020] Http already initialized.
[Wed Dec  9 14:13:36 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:36 CST 2020] ret='0'
[Wed Dec  9 14:13:36 CST 2020] Removing Record
[Wed Dec  9 14:13:36 CST 2020] DELETE
[Wed Dec  9 14:13:36 CST 2020] _post_url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets/'
[Wed Dec  9 14:13:36 CST 2020] body
[Wed Dec  9 14:13:36 CST 2020] _postContentType
[Wed Dec  9 14:13:36 CST 2020] Http already initialized.
[Wed Dec  9 14:13:36 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:37 CST 2020] _ret='0'
[Wed Dec  9 14:13:37 CST 2020] GET
[Wed Dec  9 14:13:37 CST 2020] url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets?name=_acme-challenge.test.xxxx.com.cn'
[Wed Dec  9 14:13:37 CST 2020] timeout=
[Wed Dec  9 14:13:37 CST 2020] Http already initialized.
[Wed Dec  9 14:13:37 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:37 CST 2020] ret='0'
[Wed Dec  9 14:13:37 CST 2020] Removing Record
[Wed Dec  9 14:13:37 CST 2020] DELETE
[Wed Dec  9 14:13:37 CST 2020] _post_url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets/'
[Wed Dec  9 14:13:37 CST 2020] body
[Wed Dec  9 14:13:37 CST 2020] _postContentType
[Wed Dec  9 14:13:37 CST 2020] Http already initialized.
[Wed Dec  9 14:13:37 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:37 CST 2020] _ret='0'
[Wed Dec  9 14:13:37 CST 2020] GET
[Wed Dec  9 14:13:37 CST 2020] url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets?name=_acme-challenge.test.xxxx.com.cn'
[Wed Dec  9 14:13:37 CST 2020] timeout=
[Wed Dec  9 14:13:37 CST 2020] Http already initialized.
[Wed Dec  9 14:13:37 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:37 CST 2020] ret='0'
[Wed Dec  9 14:13:37 CST 2020] Removing Record
[Wed Dec  9 14:13:37 CST 2020] DELETE
[Wed Dec  9 14:13:37 CST 2020] _post_url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets/'
[Wed Dec  9 14:13:38 CST 2020] body
[Wed Dec  9 14:13:38 CST 2020] _postContentType
[Wed Dec  9 14:13:38 CST 2020] Http already initialized.
[Wed Dec  9 14:13:38 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:38 CST 2020] _ret='0'
[Wed Dec  9 14:13:38 CST 2020] GET
[Wed Dec  9 14:13:38 CST 2020] url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets?name=_acme-challenge.test.xxxx.com.cn'
[Wed Dec  9 14:13:38 CST 2020] timeout=
[Wed Dec  9 14:13:38 CST 2020] Http already initialized.
[Wed Dec  9 14:13:38 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:38 CST 2020] ret='0'
[Wed Dec  9 14:13:38 CST 2020] Removing Record
[Wed Dec  9 14:13:38 CST 2020] DELETE
[Wed Dec  9 14:13:38 CST 2020] _post_url='https://dns.ap-southeast-1.myhuaweicloud.com/v2/zones//recordsets/'
[Wed Dec  9 14:13:38 CST 2020] body
[Wed Dec  9 14:13:38 CST 2020] _postContentType
[Wed Dec  9 14:13:38 CST 2020] Http already initialized.
[Wed Dec  9 14:13:38 CST 2020] _CURL='curl --silent --dump-header /root/.acme.sh/http.header  -L  --trace-ascii /tmp/tmp.zO5OtAfUqU  -g '
[Wed Dec  9 14:13:38 CST 2020] _ret='0'
@eastonman
Copy link
Contributor

在log中ProjectID不正确,导致获取token错误。
我似乎应该增加错误处理。

@xlight
Copy link
Author

xlight commented Dec 9, 2020

感谢,的确是ProjectID问题。随便找了个“所属地区”的项目ID就可以了。

如果能加错误处理就完美了

@eastonman
Copy link
Contributor

#3409 加入错误处理

@eastonman
Copy link
Contributor

已经合并进入主分支
@xlight

@kettly1260
Copy link

@xlight 请问你是怎么处理成功的?我只有一个项目ID没办法更换。照样也是获取不到token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants