{"action":"created","issue":{"url":"https://api.github.com/repos/certbot/certbot/issues/6207","repository_url":"https://api.github.com/repos/certbot/certbot","labels_url":"https://api.github.com/repos/certbot/certbot/issues/6207/labels{/name}","comments_url":"https://api.github.com/repos/certbot/certbot/issues/6207/comments","events_url":"https://api.github.com/repos/certbot/certbot/issues/6207/events","html_url":"https://github.com/certbot/certbot/issues/6207","id":340505400,"node_id":"MDU6SXNzdWUzNDA1MDU0MDA=","number":6207,"title":"certbot-auto 0.26.0 [Errno 39] Directory not empty: '/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory'","user":{"login":"sahsanu","id":10560305,"node_id":"MDQ6VXNlcjEwNTYwMzA1","avatar_url":"https://avatars0.githubusercontent.com/u/10560305?v=4","gravatar_id":"","url":"https://api.github.com/users/sahsanu","html_url":"https://github.com/sahsanu","followers_url":"https://api.github.com/users/sahsanu/followers","following_url":"https://api.github.com/users/sahsanu/following{/other_user}","gists_url":"https://api.github.com/users/sahsanu/gists{/gist_id}","starred_url":"https://api.github.com/users/sahsanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahsanu/subscriptions","organizations_url":"https://api.github.com/users/sahsanu/orgs","repos_url":"https://api.github.com/users/sahsanu/repos","events_url":"https://api.github.com/users/sahsanu/events{/privacy}","received_events_url":"https://api.github.com/users/sahsanu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-12T06:30:49Z","updated_at":"2018-07-12T17:11:30Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI've tried to renew one of my certificates using command `certbot-auto renew` and it updated certbot-auto from version 0.25.1 to 0.26.0, once updated one of my domains needs to renew the certificate but I receive the following error:\r\n\r\n`Attempting to renew cert (sub.domain.tld) from /etc/letsencrypt/renewal/sub.domain.tld.conf produced an unexpected error: [Errno 39] Directory not empty: '/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory'. Skipping.`\r\n\r\nAnd yes, /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory' dir is not empty because I've already an account for api v02 on production.\r\n\r\nThis is the renewal conf file for my domain:\r\n\r\n```\r\n# renew_before_expiry = 30 days\r\nversion = 0.24.0\r\narchive_dir = /etc/letsencrypt/archive/sub.domain.tld\r\ncert = /etc/letsencrypt/live/sub.domain.tld/cert.pem\r\nprivkey = /etc/letsencrypt/live/sub.domain.tld/privkey.pem\r\nchain = /etc/letsencrypt/live/sub.domain.tld/chain.pem\r\nfullchain = /etc/letsencrypt/live/sub.domain.tld/fullchain.pem\r\n\r\n# Options used in the renewal process\r\n[renewalparams]\r\nauthenticator = webroot\r\ninstaller = None\r\naccount = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\npost_hook = service apache2 reload; service stunnel reload; service dovecot reload\r\nrenew_hook = echo \"\\nHe renovado el certificado localizado en ${RENEWED_LINEAGE} y este certificado contiene los siguientes dominios ${RENEWED_DOMAINS}\\n\\n\" >&2\r\n[[webroot_map]]\r\nsub.domain.tld = /var/www/letsencrypt\r\n```\r\n\r\nand this is the log:\r\n```\r\n\r\n2018-07-12 08:17:09,574:DEBUG:certbot.main:certbot version: 0.26.0\r\n2018-07-12 08:17:09,575:DEBUG:certbot.main:Arguments: []\r\n2018-07-12 08:17:09,575:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)\r\n2018-07-12 08:17:09,632:DEBUG:certbot.log:Root logging level set at 20\r\n2018-07-12 08:17:09,633:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log\r\n2018-07-12 08:17:09,677:DEBUG:certbot.plugins.selection:Requested authenticator <certbot.cli._Default object at 0xb61ed9cc> and installer <certbot.cli._Default object at 0xb61ed9cc>\r\n2018-07-12 08:17:09,717:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:09,717:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:09,753:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:09,754:DEBUG:certbot.plugins.selection:Requested authenticator manual and installer None\r\n2018-07-12 08:17:09,790:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:09,791:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:09,825:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:09,826:DEBUG:certbot.plugins.selection:Requested authenticator manual and installer None\r\n2018-07-12 08:17:09,861:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:09,862:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:09,913:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:09,914:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:09,950:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:09,951:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:09,986:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:09,987:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,023:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,024:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,060:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,061:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,096:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,096:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,132:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,133:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,168:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,168:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,204:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,205:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,240:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,241:DEBUG:certbot.plugins.selection:Requested authenticator manual and installer None\r\n2018-07-12 08:17:10,276:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,277:DEBUG:certbot.plugins.selection:Requested authenticator manual and installer None\r\n2018-07-12 08:17:10,313:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,314:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,349:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,350:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,385:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,386:DEBUG:certbot.plugins.selection:Requested authenticator manual and installer None\r\n2018-07-12 08:17:10,420:DEBUG:certbot.storage:Should renew, less than 40 days before certificate expiry 2018-08-12 15:17:11 UTC.\r\n2018-07-12 08:17:10,420:INFO:certbot.renewal:Cert is due for renewal, auto-renewing...\r\n2018-07-12 08:17:10,421:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,426: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 0xb61c5b6c>\r\nPrep: True\r\n2018-07-12 08:17:10,427:DEBUG:certbot.plugins.selection:Selected authenticator <certbot.plugins.webroot.Authenticator object at 0xb61c5b6c> and installer None\r\n2018-07-12 08:17:10,427:INFO:certbot.plugins.selection:Plugins selected: Authenticator webroot, Installer None\r\n2018-07-12 08:17:10,517:WARNING:certbot.renewal:Attempting to renew cert (sub.domain.tld) from /etc/letsencrypt/renewal/sub.domain.tld.conf produced an unexpected error: [Errno 39] Directory not empty: '/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory'. Skipping.\r\n2018-07-12 08:17:10,518:DEBUG:certbot.renewal:Traceback was:\r\nTraceback (most recent call last):\r\n  File \"/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/renewal.py\", line 430, in handle_renewal_request\r\n    main.renew_cert(lineage_config, plugins, renewal_candidate)\r\n  File \"/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py\", line 1195, in renew_cert\r\n    le_client = _init_le_client(config, auth, installer)\r\n  File \"/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py\", line 641, in _init_le_client\r\n    acc, acme = _determine_account(config)\r\n  File \"/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py\", line 508, in _determine_account\r\n    acc = account_storage.load(config.account)\r\n  File \"/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/account.py\", line 234, in load\r\n    return self._load_for_server_path(account_id, self.config.server_path)\r\n  File \"/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/account.py\", line 210, in _load_for_server_path\r\n    self._symlink_to_accounts_dir(prev_server_path, server_path)\r\n  File \"/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/account.py\", line 199, in _symlink_to_accounts_dir\r\n    os.rmdir(accounts_dir)\r\nOSError: [Errno 39] Directory not empty: '/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory'\r\n\r\n2018-07-12 08:17:10,554:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,555:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,590:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,591:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,627:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,628:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,663:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,663:DEBUG:certbot.plugins.selection:Requested authenticator manual and installer None\r\n2018-07-12 08:17:10,699:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,700:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,735:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,736:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,771:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,772:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,808:INFO:certbot.renewal:Cert not yet due for renewal\r\n2018-07-12 08:17:10,809:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None\r\n2018-07-12 08:17:10,809:ERROR:certbot.renewal:All renewal attempts failed. The following certs could not be renewed:\r\n2018-07-12 08:17:10,810:ERROR:certbot.renewal:  /etc/letsencrypt/live/sub.domain.tld/fullchain.pem (failure)\r\n2018-07-12 08:17:10,810:DEBUG:certbot.log:Exiting abnormally:\r\nTraceback (most recent call last):\r\n  File \"/opt/eff.org/certbot/venv/bin/letsencrypt\", line 11, in <module>\r\n    sys.exit(main())\r\n  File \"/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py\", line 1364, in main\r\n    return config.func(config, plugins)\r\n  File \"/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py\", line 1276, in renew\r\n    renewal.handle_renewal_request(config)\r\n  File \"/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/renewal.py\", line 455, in handle_renewal_request\r\n    len(renew_failures), len(parse_failures)))\r\nError: 1 renew failure(s), 0 parse failure(s)\r\n```\r\n\r\nI've tested it on different installations and the error is the same, if I already have an account for v02 api I receive this error so seems a bug introduced on this new version.\r\n\r\nThank you.\r\n\r\nCheers,\r\nsahsanu\r\n"},"comment":{"url":"https://api.github.com/repos/certbot/certbot/issues/comments/404583656","html_url":"https://github.com/certbot/certbot/issues/6207#issuecomment-404583656","issue_url":"https://api.github.com/repos/certbot/certbot/issues/6207","id":404583656,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDU4MzY1Ng==","user":{"login":"bmw","id":6504915,"node_id":"MDQ6VXNlcjY1MDQ5MTU=","avatar_url":"https://avatars0.githubusercontent.com/u/6504915?v=4","gravatar_id":"","url":"https://api.github.com/users/bmw","html_url":"https://github.com/bmw","followers_url":"https://api.github.com/users/bmw/followers","following_url":"https://api.github.com/users/bmw/following{/other_user}","gists_url":"https://api.github.com/users/bmw/gists{/gist_id}","starred_url":"https://api.github.com/users/bmw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmw/subscriptions","organizations_url":"https://api.github.com/users/bmw/orgs","repos_url":"https://api.github.com/users/bmw/repos","events_url":"https://api.github.com/users/bmw/events{/privacy}","received_events_url":"https://api.github.com/users/bmw/received_events","type":"User","site_admin":false},"created_at":"2018-07-12T17:11:30Z","updated_at":"2018-07-12T17:11:30Z","author_association":"CONTRIBUTOR","body":"Thanks for the detailed bug report @sahsanu. I'm looking into this now and we'll probably put out a release shortly to fix it."}}
{"actor":{"display_login":"bmw"}}