{"id":27149,"date":"2016-12-17T16:15:40","date_gmt":"2016-12-17T14:15:40","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=27149"},"modified":"2019-02-25T12:02:56","modified_gmt":"2019-02-25T10:02:56","slug":"amazon-linux-ami-lets-encrypt-importerror-no-module-named-interface","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2016\/12\/17\/amazon-linux-ami-lets-encrypt-importerror-no-module-named-interface\/","title":{"rendered":"Amazon Linux AMI : Let&#8217;s Encrypt : ImportError: No module named interface"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p><a href=\"https:\/\/letsencrypt.org\/\">Let&#8217;s Encrypt<\/a> has only experimental support for the <a href=\"https:\/\/aws.amazon.com\/amazon-linux-ami\/\">Amazon Linux AMI<\/a>, so it&#8217;s kind of expected to have issues once in a while. &nbsp; Here&#8217;s one I came across today:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\n# \/opt\/letsencrypt\/certbot-auto renew\nCreating virtual environment...\nInstalling Python packages...\nInstallation succeeded.\nTraceback (most recent call last):\nFile &quot;\/root\/.local\/share\/letsencrypt\/bin\/letsencrypt&quot;, line 7, in &amp;lt;module&amp;gt;\nfrom certbot.main import main\nFile &quot;\/root\/.local\/share\/letsencrypt\/local\/lib\/python2.7\/dist-packages\/certbot\/main.py&quot;, line 12, in &amp;lt;module&amp;gt;\nimport zope.component\nFile &quot;\/root\/.local\/share\/letsencrypt\/local\/lib\/python2.7\/dist-packages\/zope\/component\/__init__.py&quot;, line 16, in &amp;lt;module&amp;gt;\nfrom zope.interface import Interface\nImportError: No module named interface\n<\/pre>\n<p>My first though was to install the system updates. It looks like something is off in the Python-land. But even after the &#8220;<em>yum update<\/em>&#8221; was done, the issue was still there. A quick Google search later, thanks to the <a href=\"https:\/\/github.com\/certbot\/certbot\/issues\/2823\">this GitHub issue<\/a> and <a href=\"https:\/\/github.com\/certbot\/certbot\/issues\/1680#issuecomment-176729326\">this comment<\/a>, the solution is the following:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\npip install pip --upgrade\npip install virtualenv --upgrade\nvirtualenv -p \/usr\/bin\/python27 venv27\n<\/pre>\n<p>Running the renewal of the certificates works as expected after this.<\/p>\n<p>P.S.: I wish we had fewer package and dependency managers in the world&#8230;<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Let&#8217;s Encrypt has only experimental support for the Amazon Linux AMI, so it&#8217;s kind of expected to have issues once in a while. &nbsp; Here&#8217;s one I came across today: # \/opt\/letsencrypt\/certbot-auto renew Creating virtual environment&#8230; Installing Python packages&#8230; Installation succeeded. Traceback (most recent call last): File &quot;\/root\/.local\/share\/letsencrypt\/bin\/letsencrypt&quot;, line 7, in &amp;lt;module&amp;gt; from certbot.main import &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2016\/12\/17\/amazon-linux-ami-lets-encrypt-importerror-no-module-named-interface\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Amazon Linux AMI : Let&#8217;s Encrypt : ImportError: No module named interface<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Amazon Linux AMI: Let's Encrypt: ImportError: No module named interface #Amazon #AWS #LetsEncrypt #SSL #security #SysAdmin #hosting #WebDev","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,133,62,1334],"tags":[3270,3476,2366,3427,200,3413,1330,2289],"keyring_services":[],"class_list":["post-27149","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-sysadmin","category-technology","category-web-work","tag-amazon-aws","tag-amazon-linux-ami","tag-cloud-computing","tag-lets-encrypt","tag-security","tag-ssl","tag-web-development","tag-web-hosting"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":27352,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/02\/14\/fixing-outdated-lets-encrypt-zope-interface-error\/","url_meta":{"origin":27149,"position":0},"title":"Fixing outdated Let&#8217;s Encrypt (zope.interface error)","author":"Leonid Mamchenkov","date":"February 14, 2017","format":false,"excerpt":"I've started using Let's Encrypt for the SSL certificates a while back. \u00a0I installed it on all the web servers, irrelevant of the need for SSL, just to have it there, when I need it (thanks to this Ansible role). \u00a0One of those old web servers needed an SSL certificate\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26208,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/06\/27\/lets-encrypt-on-centos-7-and-amazon-ami\/","url_meta":{"origin":27149,"position":1},"title":"Let&#8217;s Encrypt on CentOS 7 and Amazon AMI","author":"Leonid Mamchenkov","date":"June 27, 2016","format":false,"excerpt":"The last few weeks were super busy at work, so I accidentally let a few SSL certificates expire. \u00a0Renewing them is always annoying and time consuming, so I was pushing it until the last minute, and then some. Instead of going the usual way for the renewal, I decided to\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26227,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/07\/07\/forcing-amazon-linux-ami-compatibility-with-centos-in-ansible\/","url_meta":{"origin":27149,"position":2},"title":"Forcing Amazon Linux AMI compatibility with CentOS in Ansible","author":"Leonid Mamchenkov","date":"July 7, 2016","format":false,"excerpt":"One of the things that makes Ansible so awesome is a huge collection of shared roles over at Ansible Galaxy. \u00a0These bring you best practices, flexible configurations and in general save hours and hours of hardcore swearing and hair pulling. Each role usually supports multiple versions of multiple Linux distributions.\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":25998,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/04\/05\/absolute-stupidity-of-include-directive-in-etc-sudoers-and-microsoft-azure\/","url_meta":{"origin":27149,"position":3},"title":"Absolute stupidity of include directive in \/etc\/sudoers, and Microsoft Azure","author":"Leonid Mamchenkov","date":"April 5, 2016","format":false,"excerpt":"I've just spent three hours (!!!) trying to troubleshoot why sudo was misbehaving on a brand new CentOS 7 server. \u00a0I was doing the setup of two identical servers in parallel (for two different clients). \u00a0 One server worked as expected, the other one didn't. The thing I was trying\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"ASCII skull","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/04\/ascii-skull.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":26999,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/11\/28\/s3-static-site-with-ssl\/","url_meta":{"origin":27149,"position":4},"title":"S3 static site with SSL","author":"Leonid Mamchenkov","date":"November 28, 2016","format":false,"excerpt":"\"S3 static site with SSL and automatic deploys using Travis\" is a goldmine of all those simple technologies tied into a single knot for an impressive result. \u00a0It has a bit of everything: Jekyll - simple, blog-aware, static sites engine, for managing content. GitHub - for version control of the\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"s3-static-site","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/11\/s3-static-site-479x500.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":26705,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/09\/28\/amazon-linux-ami-2016-09\/","url_meta":{"origin":27149,"position":5},"title":"Amazon Linux AMI 2016.09","author":"Leonid Mamchenkov","date":"September 28, 2016","format":false,"excerpt":"AWS Blog lets us know that Amazon Linux AMI 2016.09 is now available. \u00a0It comes with a variety of updates, such as Nginx 1.10, PHP 7, and PostgreSQL 9.5 and Python 3.5. \u00a0Another thing that got quite a bit of improvement is the boot time of the Amazon Linux AMI\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"amazon ami 2016.09","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/09\/amazon-ami-2016.09.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/27149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=27149"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/27149\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=27149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=27149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=27149"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=27149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}