mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #1132] Unable to create a SSL Certificate with NS1 #930
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#930
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gitmors on GitHub (May 28, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1132
Checklist
Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
Yes
Are you sure you're not using someone else's docker image?
Yes
Have you searched for similar issues (both open and closed)?
Yes
Describe the bug
I am unable to create a ssl certificate
Nginx Proxy Manager Version
v2.9.3
To Reproduce:
Steps to reproduce the behavior:
Run nginx proxy manager with the following compose
version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
ports:
- '80:80'
- '81:81'
- '443:443'
environment:
TZ:"Europe/Berlin"
DB_SQLITE_FILE:"/data/database.sqlite"
DISABLE_IPV6:"true"
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
restart: unless-stopped
go to ssl certificate. create a certificate for a new domain. enter the domain. enter the email address. use a dns challange. choose NS1 as provider. change api key. agree the terms of use letsencrypt service. click save.
three months ago this step worked without any problems and all certificates were created and were valid. Unfortunately, there is now an error message and the certificates will no longer be recreated:
nothing has changed. with the container from: adferrand/dnsrobocert:latest everything still works perfect with the same setup.
Operating System
Debian 10 with docker engine installed
Additional context
browser: chrome version: 90.0.4430.212, javascipt: V8 9.0.257.29
text from letsencrypt.log file
2021-05-28 14:37:38,758:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * dns-nsone
Description: Obtain certificates using a DNS TXT record (if you are using NS1 for DNS).
Interfaces: IAuthenticator, IPlugin
Entry point: dns-nsone = certbot_dns_nsone._internal.dns_nsone:Authenticator
Initialized: <certbot_dns_nsone._internal.dns_nsone.Authenticator object at blabla>
Prep: True
2021-05-28 14:37:38,759:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot_dns_nsone._internal.dns_nsone.Authenticator object at blabla> and installer None
2021-05-28 14:37:38,759:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator dns-nsone, Installer None
2021-05-28 14:37:38,767:DEBUG:certbot._internal.main:Picked account: <Account(RegistrationResource(body=Registration(key=None, contact=(), agreement=None, status=None, terms_of_service_agreed=None, only_return_existing=None, external_account_binding=None), uri='https://acme-v02.api.letsencrypt.org/acme/acct/blabla', new_authzr_uri=None, terms_of_service=None), blabla, Meta(creation_dt=datetime.datetime(2021, 5, 28, 12, 6, 13, tzinfo=), creation_host='blabla', register_to_eff=None))>
2021-05-28 14:37:38,768:DEBUG:acme.client:Sending GET request to https://acme-v02.api.letsencrypt.org/directory.
2021-05-28 14:37:38,770:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org:443
2021-05-28 14:37:39,463:DEBUG:urllib3.connectionpool:https://acme-v02.api.letsencrypt.org:443 "GET /directory HTTP/1.1" 200 658
2021-05-28 14:37:39,463:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Fri, 28 May 2021 12:37:39 GMT
Content-Type: application/json
Content-Length: 658
Connection: keep-alive
Cache-Control: public, max-age=0, no-cache
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
{
"keyChange": "https://acme-v02.api.letsencrypt.org/acme/key-change",
"meta": {
"caaIdentities": [
"letsencrypt.org"
],
"termsOfService": "https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf",
"website": "https://letsencrypt.org"
},
"newAccount": "https://acme-v02.api.letsencrypt.org/acme/new-acct",
"newNonce": "https://acme-v02.api.letsencrypt.org/acme/new-nonce",
"newOrder": "https://acme-v02.api.letsencrypt.org/acme/new-order",
"revokeCert": "https://acme-v02.api.letsencrypt.org/acme/revoke-cert",
"yJfXSMAZ0_8": "https://community.letsencrypt.org/t/adding-random-entries-to-the-directory/blabla"
}
2021-05-28 14:37:39,464:DEBUG:certbot.display.util:Notifying user: Requesting a certificate for example.com
2021-05-28 14:37:39,517:DEBUG:certbot.crypto_util:Generating RSA key (2048 bits): /etc/letsencrypt/keys/0003_key-certbot.pem
2021-05-28 14:37:39,519:DEBUG:certbot.crypto_util:Creating CSR: /etc/letsencrypt/csr/0003_csr-certbot.pem
2021-05-28 14:37:39,520:DEBUG:acme.client:Requesting fresh nonce
2021-05-28 14:37:39,520:DEBUG:acme.client:Sending HEAD request to https://acme-v02.api.letsencrypt.org/acme/new-nonce.
2021-05-28 14:37:39,690:DEBUG:urllib3.connectionpool:https://acme-v02.api.letsencrypt.org:443 "HEAD /acme/new-nonce HTTP/1.1" 200 0
2021-05-28 14:37:39,691:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Fri, 28 May 2021 12:37:39 GMT
Connection: keep-alive
Cache-Control: public, max-age=0, no-cache
Link: https://acme-v02.api.letsencrypt.org/directory;rel="index"
Replay-Nonce: blabla
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
2021-05-28 14:37:39,691:DEBUG:acme.client:Storing nonce: blabla
2021-05-28 14:37:39,692:DEBUG:acme.client:JWS payload:
b'{\n "identifiers": [\n {\n "type": "dns",\n "value": "example.com"\n }\n ]\n}'
2021-05-28 14:37:39,694:DEBUG:acme.client:Sending POST request to https://acme-v02.api.letsencrypt.org/acme/new-order:
{
"protected": "blabla",
"signature": "blabla",
"payload": "blabla"
}
2021-05-28 14:37:39,959:DEBUG:urllib3.connectionpool:https://acme-v02.api.letsencrypt.org:443 "POST /acme/new-order HTTP/1.1" 201 333
2021-05-28 14:37:39,961:DEBUG:acme.client:Received response:
HTTP 201
Server: nginx
Date: Fri, 28 May 2021 12:37:39 GMT
Content-Type: application/json
Content-Length: 333
Connection: keep-alive
Boulder-Requester: blabla
Cache-Control: public, max-age=0, no-cache
Link: https://acme-v02.api.letsencrypt.org/directory;rel="index"
Location: https://acme-v02.api.letsencrypt.org/acme/order/blabla
Replay-Nonce: 0003rp_blabla
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
{
"status": "pending",
"expires": "2021-06-04T12:07:06Z",
"identifiers": [
{
"type": "dns",
"value": "example.com"
}
],
"authorizations": [
"https://acme-v02.api.letsencrypt.org/acme/authz-v3/blabla"
],
"finalize": "https://acme-v02.api.letsencrypt.org/acme/finalize/blabla"
}
2021-05-28 14:37:39,961:DEBUG:acme.client:Storing nonce: blabla
2021-05-28 14:37:39,962:DEBUG:acme.client:JWS payload:
b''
2021-05-28 14:37:39,964:DEBUG:acme.client:Sending POST request to https://acme-v02.api.letsencrypt.org/acme/authz-v3/blabla:
{
"protected": "blabla",
"signature": "blabla",
"payload": ""
}
2021-05-28 14:37:40,161:DEBUG:urllib3.connectionpool:https://acme-v02.api.letsencrypt.org:443 "POST /acme/authz-v3/blabla HTTP/1.1" 200 791
2021-05-28 14:37:40,162:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Fri, 28 May 2021 12:37:40 GMT
Content-Type: application/json
Content-Length: 791
Connection: keep-alive
Boulder-Requester: blabla
Cache-Control: public, max-age=0, no-cache
Link: https://acme-v02.api.letsencrypt.org/directory;rel="index"
Replay-Nonce: blabla
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
{
"identifier": {
"type": "dns",
"value": "example.com"
},
"status": "pending",
"expires": "2021-06-04T12:07:06Z",
"challenges": [
{
"type": "http-01",
"status": "pending",
"url": "https://acme-v02.api.letsencrypt.org/acme/chall-v3/blabla",
"token": "blabla"
},
{
"type": "dns-01",
"status": "pending",
"url": "https://acme-v02.api.letsencrypt.org/acme/chall-v3/blabla",
"token": "blabla"
},
{
"type": "tls-alpn-01",
"status": "pending",
"url": "https://acme-v02.api.letsencrypt.org/acme/chall-v3/blabla",
"token": "blabla"
}
]
}
2021-05-28 14:37:40,163:DEBUG:acme.client:Storing nonce: blabal
2021-05-28 14:37:40,164:INFO:certbot._internal.auth_handler:Performing the following challenges:
2021-05-28 14:37:40,164:INFO:certbot._internal.auth_handler:dns-01 challenge for example.com
2021-05-28 14:37:40,169:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.nsone.net:443
2021-05-28 14:37:40,415:DEBUG:urllib3.connectionpool:https://api.nsone.net:443 "GET /v1/zones/example.com HTTP/1.1" 200 None
2021-05-28 14:37:40,420:DEBUG:certbot._internal.error_handler:Encountered exception:
Traceback (most recent call last):
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/auth_handler.py", line 70, in handle_authorizations
resps = self.auth.perform(achalls)
File "/opt/certbot/lib/python3.7/site-packages/certbot/plugins/dns_common.py", line 60, in perform
self._perform(domain, validation_domain_name, validation)
File "/opt/certbot/lib/python3.7/site-packages/certbot_dns_nsone/_internal/dns_nsone.py", line 51, in _perform
self._get_nsone_client().add_txt_record(domain, validation_name, validation)
File "/opt/certbot/lib/python3.7/site-packages/certbot/plugins/dns_common_lexicon.py", line 48, in add_txt_record
self.provider.create_record(type='TXT', name=record_name, content=record_content)
TypeError: create_record() got an unexpected keyword argument 'type'
2021-05-28 14:37:40,420:DEBUG:certbot._internal.error_handler:Calling registered functions
2021-05-28 14:37:40,420:INFO:certbot._internal.auth_handler:Cleaning up challenges
2021-05-28 14:37:40,424:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.nsone.net:443
2021-05-28 14:37:40,671:DEBUG:urllib3.connectionpool:https://api.nsone.net:443 "GET /v1/zones/example.com HTTP/1.1" 200 None
2021-05-28 14:37:40,674:ERROR:certbot._internal.error_handler:Encountered exception during recovery: TypeError: delete_record() got an unexpected keyword argument 'type'
2021-05-28 14:37:40,674:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/opt/certbot/bin/certbot", line 8, in
sys.exit(main())
File "/opt/certbot/lib/python3.7/site-packages/certbot/main.py", line 15, in main
return internal_main.main(cli_args)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/main.py", line 1435, in main
return config.func(config, plugins)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/main.py", line 1304, in certonly
lineage = _get_and_save_cert(le_client, config, domains, certname, lineage)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/main.py", line 140, in _get_and_save_cert
lineage = le_client.obtain_and_enroll_certificate(domains, certname)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/client.py", line 444, in obtain_and_enroll_certificate
cert, chain, key, _ = self.obtain_certificate(domains)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/client.py", line 374, in obtain_certificate
orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/client.py", line 424, in _get_order_and_authorizations
authzr = self.auth_handler.handle_authorizations(orderr, best_effort)
File "/opt/certbot/lib/python3.7/site-packages/certbot/_internal/auth_handler.py", line 70, in handle_authorizations
resps = self.auth.perform(achalls)
File "/opt/certbot/lib/python3.7/site-packages/certbot/plugins/dns_common.py", line 60, in perform
self._perform(domain, validation_domain_name, validation)
File "/opt/certbot/lib/python3.7/site-packages/certbot_dns_nsone/_internal/dns_nsone.py", line 51, in _perform
self._get_nsone_client().add_txt_record(domain, validation_name, validation)
File "/opt/certbot/lib/python3.7/site-packages/certbot/plugins/dns_common_lexicon.py", line 48, in add_txt_record
self.provider.create_record(type='TXT', name=record_name, content=record_content)
TypeError: create_record() got an unexpected keyword argument 'type'
2021-05-28 14:37:40,675:ERROR:certbot._internal.log:An unexpected error occurred:
2021-05-28 14:37:40,676:ERROR:certbot._internal.log:TypeError: create_record() got an unexpected keyword argument 'type'
Thank you!!
Regards.
@chaptergy commented on GitHub (May 28, 2021):
See https://github.com/jc21/nginx-proxy-manager/issues/1119#issuecomment-846843724