AttributeError: 'module' object has no attribute 'os_geteuid'

My domain is:

I ran this command:certbot renew

It produced this output:


Cert is due for renewal, auto-renewing…
Attempting to renew cert ( from /etc/letsencrypt/renewal/ produced an unexpected error: ‘module’ object has no attribute ‘os_geteuid’. Skipping.

My web server is (include version): nginx version: nginx/1.16.0

The operating system my web server runs on is (include version): CentOS Linux 7 (Core)

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.39.0

Python version: Python 2.7.5

The problem appeared after the upgrade from 0.36.0 to 0.38.0

Letsencrypt.log -


2019-11-25 12:06:14,995:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx
2019-11-25 12:06:14,996:WARNING:certbot.renewal:Attempting to renew cert ( from /etc/letsencrypt/renewal/ produced an unexpected error: ‘module’ object has no attribute ‘os_geteuid’. Skipping.
2019-11-25 12:06:14,997:DEBUG:certbot.renewal:Traceback was:
Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/certbot/”, line 449, in handle_renewal_request
main.renew_cert(lineage_config, plugins, renewal_candidate)
File “/usr/lib/python2.7/site-packages/certbot/”, line 1202, in renew_cert
installer, auth = plug_sel.choose_configurator_plugins(config, plugins, “certonly”)
File “/usr/lib/python2.7/site-packages/certbot/plugins/”, line 226, in choose_configurator_plugins
installer = pick_installer(config, req_inst, plugins, installer_question)
File “/usr/lib/python2.7/site-packages/certbot/plugins/”, line 31, in pick_installer
config, default, plugins, question, (interfaces.IInstaller,))
File “/usr/lib/python2.7/site-packages/certbot/plugins/”, line 103, in pick_plugin
File “/usr/lib/python2.7/site-packages/certbot/plugins/”, line 231, in init
in six.itervalues(self._plugins)]
File “/usr/lib/python2.7/site-packages/certbot/plugins/”, line 101, in init
self._initialized = self.plugin_cls(config,
File “/usr/lib/python2.7/site-packages/certbot_nginx/”, line 98, in init
File “/usr/lib/python2.7/site-packages/certbot_nginx/”, line 891, in _verify_setup
uid = misc.os_geteuid()
AttributeError: ‘module’ object has no attribute ‘os_geteuid’

Your Certbot nginx plugin is outdated and is out of sync with your Certbot version.

What does this show? It should show 0.39.0-1.

rpm -q python2-certbot-nginx

Does this help?

yum -y reinstall python-certbot-nginx

Make sure you have epel-release installed/enabled.

Thanks you!
Resolve is - yum install python-certbot-nginx
Package python2-certbot-nginx.noarch 0:0.34.2-1.el7 will be updated
Package python2-certbot-nginx.noarch 0:0.39.0-1.el7 will be an update

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.