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

On registration, KeyError: 'Directory field not found' #129

Open
exarkun opened this issue Nov 1, 2019 · 0 comments
Open

On registration, KeyError: 'Directory field not found' #129

exarkun opened this issue Nov 1, 2019 · 0 comments

Comments

@exarkun
Copy link

exarkun commented Nov 1, 2019

Using 0.16.0 and acme 0.39.0, I get this behavior:

2019-11-01 23:21:32,619:DEBUG:simp_le:1522: ('-v', '-d', '... DOMAIN', '--default_root', '/var/lib/acme/acme-challenges', '--valid_min', '2592000', '--email', '... EMAIL ...', '-f', 'account_reg.json', '-f', 'account_key.json', '-f', 'full.pem', '-f', 'fullchain.pem', '\
-f', 'key.pem', '--server', 'https://acme-staging.api.letsencrypt.org/directory') parsed as Namespace(account_key_public_exponent=65537, account_key_size=4096, ca_bundle=None, cert_key_size=4096, default_root='/var/lib/acme/acme-challenges', email='... EMAIL ...', help=\
False, integration_test=False, ioplugins=['account_reg.json', 'account_key.json', 'full.pem', 'fullchain.pem', 'key.pem'], reuse_key=False, revoke=False, server='https://acme-staging.$
pi.letsencrypt.org/directory', test=False, user_agent='simp_le/0.16.0', valid_min=2592000, verbose=True, version=False, vhosts=[Vhost(name='... DOMAIN ...', root=None)])
2019-11-01 23:21:32,620:DEBUG:simp_le:372: Loading account_reg.json
2019-11-01 23:21:32,620:DEBUG:simp_le:372: Loading account_key.json
2019-11-01 23:21:32,620:DEBUG:simp_le:372: Loading full.pem
2019-11-01 23:21:32,621:DEBUG:simp_le:372: Loading fullchain.pem
2019-11-01 23:21:32,621:DEBUG:simp_le:372: Loading key.pem
2019-11-01 23:21:32,622:DEBUG:simp_le:1315: Existing SANs: [], new: ['... DOMAIN ...']
2019-11-01 23:21:32,622:DEBUG:simp_le:1405: Computed roots: {'... DOMAIN ...': '/var/lib/acme/acme-challenges'}
2019-11-01 23:21:32,622:INFO:simp_le:1323: Generating new account key
2019-11-01 23:21:33,185:DEBUG:acme.client:1104: Sending GET request to https://acme-staging.api.letsencrypt.org/directory.
2019-11-01 23:21:33,187:DEBUG:urllib3.connectionpool:813: Starting new HTTPS connection (1): acme-staging.api.letsencrypt.org:443
2019-11-01 23:21:33,749:DEBUG:urllib3.connectionpool:393: https://acme-staging.api.letsencrypt.org:443 "GET /directory HTTP/1.1" 200 704
2019-11-01 23:21:33,750:DEBUG:acme.client:1145: Received response:
HTTP 200
Server: nginx
Date: Fri, 01 Nov 2019 23:21:33 GMT
Content-Type: application/json
Content-Length: 704
Connection: keep-alive
Cache-Control: public, max-age=0, no-cache
Replay-Nonce: 0001DMUZu_OzJSYWCoI5b8Zy-PYUADWB34v436ngo2Yy7mI
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
{
  "bL-jcLYHmRA": "https://community.letsencrypt.org/t/adding-random-entries-to-the-directory/33417",
  "key-change": "https://acme-staging.api.letsencrypt.org/acme/key-change",
  "meta": {
    "caaIdentities": [
      "letsencrypt.org"
    ],
    "terms-of-service": "https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf",
    "website": "https://letsencrypt.org/docs/staging-environment/"
  },
  "new-authz": "https://acme-staging.api.letsencrypt.org/acme/new-authz",
  "new-cert": "https://acme-staging.api.letsencrypt.org/acme/new-cert",
  "new-reg": "https://acme-staging.api.letsencrypt.org/acme/new-reg",
  "revoke-cert": "https://acme-staging.api.letsencrypt.org/acme/revoke-cert"
}
2019-11-01 23:21:33,750:INFO:simp_le:1353: By using simp_le, you implicitly agree to the CA's terms of service: https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
Traceback (most recent call last):
  File ".../lib/python3.7/site-packages/acme/messages.py", line 249, in __getitem__
    return self._jobj[self._canon_key(name)]
KeyError: 'newAccount'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File ".../lib/python3.7/site-packages/simp_le.py", line 1565, in main
    return main_with_exceptions(cli_args)
  File ".../lib/python3.7/site-packages/simp_le.py", line 1549, in main_with_exceptions
    persist_new_data(args, existing_data)
  File ".../lib/python3.7/site-packages/simp_le.py", line 1408, in persist_new_data
    args, existing_data.account_key, existing_data.account_reg)
  File ".../lib/python3.7/site-packages/simp_le.py", line 1357, in registered_client
    client.new_account(new_reg)
  File ".../lib/python3.7/site-packages/acme/client.py", line 604, in new_account
    response = self._post(self.directory['newAccount'], new_account)
  File ".../lib/python3.7/site-packages/acme/messages.py", line 251, in __getitem__
    raise KeyError('Directory field not found')
KeyError: 'Directory field not found'
Unhandled error has happened, traceback is above
Debugging tips: -v improves output verbosity. Help is available under --help.

Instead, I expected a Let's Encrypt account to be registered and then a certificate to be issued.

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

1 participant