{"action":"created","issue":{"url":"https://api.github.com/repos/certbot/certbot/issues/4531","repository_url":"https://api.github.com/repos/certbot/certbot","labels_url":"https://api.github.com/repos/certbot/certbot/issues/4531/labels{/name}","comments_url":"https://api.github.com/repos/certbot/certbot/issues/4531/comments","events_url":"https://api.github.com/repos/certbot/certbot/issues/4531/events","html_url":"https://github.com/certbot/certbot/issues/4531","id":222939454,"number":4531,"title":"Error creating certificate with certbot, acme-v01.api.letsencrypt.org","user":{"login":"ahmadkhudeish","id":4470173,"avatar_url":"https://avatars2.githubusercontent.com/u/4470173?v=4","gravatar_id":"","url":"https://api.github.com/users/ahmadkhudeish","html_url":"https://github.com/ahmadkhudeish","followers_url":"https://api.github.com/users/ahmadkhudeish/followers","following_url":"https://api.github.com/users/ahmadkhudeish/following{/other_user}","gists_url":"https://api.github.com/users/ahmadkhudeish/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmadkhudeish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmadkhudeish/subscriptions","organizations_url":"https://api.github.com/users/ahmadkhudeish/orgs","repos_url":"https://api.github.com/users/ahmadkhudeish/repos","events_url":"https://api.github.com/users/ahmadkhudeish/events{/privacy}","received_events_url":"https://api.github.com/users/ahmadkhudeish/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-04-20T03:34:15Z","updated_at":"2017-11-11T23:24:47Z","closed_at":"2017-04-20T21:59:36Z","author_association":"NONE","body":"## My operating system is (include version):\r\nDebian 8 (Jessie)\r\n\r\n## I installed Certbot with (certbot-auto, OS package manager, pip, etc):\r\nAnsible\r\n\r\n## I ran this command and it produced this output:\r\ncertbot certonly -a webroot --webroot-path=/var/www/{{ letsencrypt_domain_name }} -d {{ letsencrypt_domain_name }}  -n --agree-tos --email {{ letsencrypt_email }}\r\n\r\n\r\n## Certbot's behavior differed from what I expected because:\r\n`stderr: Saving debug log to /var/log/letsencrypt/letsencrypt.log\r\nStarting new HTTPS connection (1): acme-v01.api.letsencrypt.org\r\nAn unexpected error occurred:\r\nConnectionError: HTTPSConnectionPool(host='acme-v01.api.letsencrypt.org', port=443): Max retries exceeded with url: /directory (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f020eee70d0>: Failed to establish a new connection: [Errno -2] Name or service not known',))\r\nPlease see the logfiles in /var/log/letsencrypt for more details.\r\n`\r\n\r\n## Here is a Certbot log showing the issue (if available):\r\n###### Logs are stored in `/var/log/letsencrypt` by default. Feel free to redact domains, e-mail and IP addresses as you see fit.\r\n\r\n`2017-04-20 01:55:59,029:DEBUG:certbot.main:Root logging level set at 20\r\n2017-04-20 01:55:59,029:INFO:certbot.main:Saving debug log to /var/log/letsencrypt/letsencrypt.log\r\n2017-04-20 01:55:59,030:DEBUG:certbot.main:certbot version: 0.9.3\r\n2017-04-20 01:55:59,030:DEBUG:certbot.main:Arguments: ['-a', 'webroot', '--webroot-path=/var/www/production/portal.feenix.co.nz/current', '-d', 'portal.feenix.co.nz', '-n', '--agree-tos', '--email', 'net$\r\n2017-04-20 01:55:59,030:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#webroot,PluginEntryPoint#null,PluginEntryPoint#manual,PluginEntryPoint#standalone)\r\n2017-04-20 01:55:59,030:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2017-04-20 01:55:59,032:DEBUG:certbot.plugins.selection:Single candidate plugin: * webroot\r\nDescription: Place files in webroot directory\r\nInterfaces: IAuthenticator, IPlugin\r\nEntry point: webroot = certbot.plugins.webroot:Authenticator\r\nInitialized: <certbot.plugins.webroot.Authenticator object at 0x7f0a07dc9b50>\r\nPrep: True\r\n2017-04-20 01:55:59,033:DEBUG:certbot.plugins.selection:Selected authenticator <certbot.plugins.webroot.Authenticator object at 0x7f0a07dc9b50> and installer None\r\n2017-04-20 01:55:59,210:DEBUG:root:Sending GET request to https://acme-v01.api.letsencrypt.org/directory. args: (), kwargs: {}\r\n2017-04-20 01:55:59,217:INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org\r\n2017-04-20 01:55:59,234:DEBUG:certbot.main:Exiting abnormally:\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/certbot\", line 9, in <module>\r\n    load_entry_point('certbot==0.9.3', 'console_scripts', 'certbot')()\r\n  File \"/usr/lib/python2.7/dist-packages/certbot/main.py\", line 776, in main\r\n    return config.func(config, plugins)\r\n  File \"/usr/lib/python2.7/dist-packages/certbot/main.py\", line 558, in obtain_cert\r\n    le_client = _init_le_client(config, auth, installer)\r\n  File \"/usr/lib/python2.7/dist-packages/certbot/main.py\", line 368, in _init_le_client\r\n    acc, acme = _determine_account(config)\r\n  File \"/usr/lib/python2.7/dist-packages/certbot/main.py\", line 353, in _determine_account\r\n    config, account_storage, tos_cb=_tos_cb)\r\n  File \"/usr/lib/python2.7/dist-packages/certbot/client.py\", line 118, in register\r\n    acme = acme_from_config_key(config, key)\r\n  File \"/usr/lib/python2.7/dist-packages/certbot/client.py\", line 42, in acme_from_config_key\r\n    return acme_client.Client(config.server, key=key, net=net)\r\n  File \"/usr/lib/python2.7/dist-packages/acme/client.py\", line 63, in __init__\r\n    self.net.get(directory).json())\r\n  File \"/usr/lib/python2.7/dist-packages/acme/client.py\", line 624, in get\r\n    self._send_request('GET', url, **kwargs), content_type=content_type)\r\n  File \"/usr/lib/python2.7/dist-packages/acme/client.py\", line 606, in _send_request\r\n    response = self.session.request(method, url, *args, **kwargs)\r\n  File \"/usr/lib/python2.7/dist-packages/requests/sessions.py\", line 475, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"/usr/lib/python2.7/dist-packages/requests/sessions.py\", line 596, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"/usr/lib/python2.7/dist-packages/requests/adapters.py\", line 487, in send\r\n    raise ConnectionError(e, request=request)\r\nConnectionError: HTTPSConnectionPool(host='acme-v01.api.letsencrypt.org', port=443): Max retries exceeded with url: /directory (Caused by NewConnectionError('<requests.packages.urllib3.connection.Verifie$\r\n`"},"comment":{"url":"https://api.github.com/repos/certbot/certbot/issues/comments/343701525","html_url":"https://github.com/certbot/certbot/issues/4531#issuecomment-343701525","issue_url":"https://api.github.com/repos/certbot/certbot/issues/4531","id":343701525,"user":{"login":"alfiedotwtf","id":79411,"avatar_url":"https://avatars2.githubusercontent.com/u/79411?v=4","gravatar_id":"","url":"https://api.github.com/users/alfiedotwtf","html_url":"https://github.com/alfiedotwtf","followers_url":"https://api.github.com/users/alfiedotwtf/followers","following_url":"https://api.github.com/users/alfiedotwtf/following{/other_user}","gists_url":"https://api.github.com/users/alfiedotwtf/gists{/gist_id}","starred_url":"https://api.github.com/users/alfiedotwtf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfiedotwtf/subscriptions","organizations_url":"https://api.github.com/users/alfiedotwtf/orgs","repos_url":"https://api.github.com/users/alfiedotwtf/repos","events_url":"https://api.github.com/users/alfiedotwtf/events{/privacy}","received_events_url":"https://api.github.com/users/alfiedotwtf/received_events","type":"User","site_admin":false},"created_at":"2017-11-11T23:24:47Z","updated_at":"2017-11-11T23:24:47Z","author_association":"NONE","body":"I had this same error, and seemed like it was name resolution to blame. Adding the right entry to /etc/hosts fixed it."}}
{"actor":{"display_login":"alfiedotwtf"}}