alex / letsencrypt-aws

BSD 3-Clause "New" or "Revised" License
728 stars 121 forks source link

update_elb returns AttributeError: 'NoneType' #64

Closed BillBrower closed 8 years ago

BillBrower commented 8 years ago

I am running letsencrypt-aws from a docker container on an EC2 instance that is in the same VPC, and security group, as my ELB. Here is what it returns:

Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: Traceback (most recent call last):
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:   File "letsencrypt-aws.py", line 572, in <module>
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: 2016-06-06 01:36:54 [startup]
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: 2016-06-06 01:36:55 [running] mode='persistent'
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: 2016-06-06 01:36:55 [updating-elb] elb_name=u'pigeon-staff-api-development'
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:     cli()
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:   File "/app/.venv/lib/python2.7/site-packages/click/core.py", line 716, in __call__
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:     return self.main(*args, **kwargs)
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:   File "/app/.venv/lib/python2.7/site-packages/click/core.py", line 696, in main
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:     rv = self.invoke(ctx)
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:   File "/app/.venv/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:     return _process_result(sub_ctx.command.invoke(sub_ctx))
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:   File "/app/.venv/lib/python2.7/site-packages/click/core.py", line 889, in invoke
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:     return ctx.invoke(self.callback, **ctx.params)
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:   File "/app/.venv/lib/python2.7/site-packages/click/core.py", line 534, in invoke
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:     return callback(*args, **kwargs)
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:   File "letsencrypt-aws.py", line 526, in update_certificates
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:     force_issue, certificate_requests
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:   File "letsencrypt-aws.py", line 427, in update_elbs
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:     cert_request,
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:   File "letsencrypt-aws.py", line 346, in update_elb
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]:     expiration_date=current_cert.not_valid_after
Jun  6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: AttributeError: 'NoneType' object has no attribute 'not_valid_after'

At first, I was using an AWS certificate for port 443 on my target ELB, and I thought that might be the issue but I got the same error message after I removed it. I also looked at issue #38 but I have a hosted zone setup on Route53 for my domain so I'm not sure what the issue could be. Any chance you've seen this issue before? Any help would be much appreciated!

alex commented 8 years ago

Interesting. I have a hypothesis about this.

On Sun, Jun 5, 2016 at 6:50 PM, Bill Brower notifications@github.com wrote:

I am running letsencrypt-aws from a docker container on an EC2 instance that is in the same VPC, and security group, as my ELB. Here is what it returns:

Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: Traceback (most recent call last): Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: File "letsencrypt-aws.py", line 572, in Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: 2016-06-06 01:36:54 [startup] Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: 2016-06-06 01:36:55 [running] mode='persistent' Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: 2016-06-06 01:36:55 [updating-elb] elb_name=u'pigeon-staff-api-development' Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: cli() Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: File "/app/.venv/lib/python2.7/site-packages/click/core.py", line 716, in call Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: return self.main(_args, _kwargs) Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: File "/app/.venv/lib/python2.7/site-packages/click/core.py", line 696, in main Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: rv = self.invoke(ctx) Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: File "/app/.venv/lib/python2.7/site-packages/click/core.py", line 1060, in invoke Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: return _process_result(sub_ctx.command.invoke(sub_ctx)) Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: File "/app/.venv/lib/python2.7/site-packages/click/core.py", line 889, in invoke Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: return ctx.invoke(self.callback, _ctx.params) Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: File "/app/.venv/lib/python2.7/site-packages/click/core.py", line 534, in invoke Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: return callback(_args, **kwargs) Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: File "letsencrypt-aws.py", line 526, in update_certificates Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: force_issue, certificate_requests Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: File "letsencrypt-aws.py", line 427, in update_elbs Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: cert_request, Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: File "letsencrypt-aws.py", line 346, in update_elb Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: expiration_date=current_cert.not_valid_after Jun 6 01:36:55 ip-192-168-0-166 docker/9aca4ed8a3f6[2651]: AttributeError: 'NoneType' object has no attribute 'not_valid_after'

At first, I was using an AWS certificate for port 443 on my target ELB, and I thought that might be the issue but I got the same error message after I removed it. I also looked at issue #38 https://github.com/alex/letsencrypt-aws/issues/38 but I have a hosted zone setup on Route53 for my domain so I'm not sure what the issue could be. Any chance you've seen this issue before? Any help would be much appreciated!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alex/letsencrypt-aws/issues/64, or mute the thread https://github.com/notifications/unsubscribe/AAADBHI0IS3MtzBytJSYvujweZ7Ovun6ks5qI3zUgaJpZM4IugXd .

"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: D1B3 ADC0 E023 8CA6

alex commented 8 years ago

@BillBrower Ok. I think I fixed this. Let me know if it still fails.

BillBrower commented 8 years ago

Will do, thanks Alex!

Edit: That fixed it.