# An unexpected error occurred after run letsencrypt client

**URL:** <https://community.letsencrypt.org/t/an-unexpected-error-occurred-after-run-letsencrypt-client/7084>\
**Category:** Help\
**Created:** [December 15, 2015, 4:25pm UTC](https://community.letsencrypt.org/t/an-unexpected-error-occurred-after-run-letsencrypt-client/7084 "2015-12-15T16:25:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![superservidor](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@superservidor](https://community.letsencrypt.org/u/superservidor)\
**Post date:** [December 15, 2015, 4:25pm UTC](https://community.letsencrypt.org/t/an-unexpected-error-occurred-after-run-letsencrypt-client/7084/1 "2015-12-15T16:25:25Z")

</div>

Hi guys,

I have run the following commando to get a SSL cert from LetsEncrypt and all works OK:

./letsencrypt-auto certonly --webroot -w /home/alarcam/web/alarcam.cl/public\_html/ -d [www.alarcam.cl](http://www.alarcam.cl) -d [alarcam.cl](http://alarcam.cl)

Now I have ran the same command:

./letsencrypt-auto certonly --webroot -w /home/alarcam/web/alarcam.cl/public\_html/ -d [www.alarcam.cl](http://www.alarcam.cl) -d [alarcam.cl](http://alarcam.cl)

## but this time I am getting errors as below:

## An unexpected error occurred: ClientError: \<Response [502]\> Please see the logfiles in /var/log/letsencrypt for more details.

The log file in /var/log/letsencrypt/letsencrypt.log has:

###############################################################################

2015-12-15 16:06:53,533:DEBUG:letsencrypt.cli:Root logging level set at 30  
2015-12-15 16:06:53,533:INFO:letsencrypt.cli:Saving debug log to /var/log/letsencrypt/letsencrypt.log  
2015-12-15 16:06:53,533:DEBUG:letsencrypt.cli:letsencrypt version: 0.1.0  
2015-12-15 16:06:53,533:DEBUG:letsencrypt.cli:Arguments: [’–webroot’, ‘-w’, ‘/home/alarcam/web/alarcam.cl/public\_html/’, ‘-d’, ‘[www.alarcam.cl](http://www.alarcam.cl)’, ‘-d’, ‘[alarcam.cl](http://alarcam.cl)’]  
2015-12-15 16:06:53,534:DEBUG:letsencrypt.cli:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#webroot,PluginEntryPoint#null,PluginEntryPoint#manual,PluginEntryPoint#standalone)  
2015-12-15 16:06:53,543:DEBUG:letsencrypt.cli:Requested authenticator webroot and installer None  
2015-12-15 16:06:53,550:DEBUG:letsencrypt.plugins.webroot:Creating root challenges validation dir at /home/alarcam/web/alarcam.cl/public\_html/.well-known/acme-challenge  
2015-12-15 16:06:53,551:DEBUG:letsencrypt.plugins.webroot:Creating root challenges validation dir at /home/alarcam/web/alarcam.cl/public\_html/.well-known/acme-challenge  
2015-12-15 16:06:53,551:DEBUG:letsencrypt.display.ops:Single candidate plugin: \* webroot  
Description: Webroot Authenticator  
Interfaces: IAuthenticator, IPlugin  
Entry point: webroot = letsencrypt.plugins.webroot:Authenticator  
Initialized: \<letsencrypt.plugins.webroot.Authenticator object at 0x7f7d2464fc50\>  
Prep: True  
2015-12-15 16:06:53,551:DEBUG:letsencrypt.cli:Selected authenticator \<letsencrypt.plugins.webroot.Authenticator object at 0x7f7d2464fc50\> and installer None  
2015-12-15 16:07:04,226:DEBUG:root:Sending GET request to [https://acme-v01.api.letsencrypt.org/directory](https://acme-v01.api.letsencrypt.org/directory). args: (), kwargs: {}  
2015-12-15 16:07:04,235:INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): [acme-v01.api.letsencrypt.org](http://acme-v01.api.letsencrypt.org)  
2015-12-15 16:07:05,200:DEBUG:requests.packages.urllib3.connectionpool:“GET /directory HTTP/1.1” 502 1488  
2015-12-15 16:07:05,203:DEBUG:root:Received \<Response [502]\>. Headers: {‘Content-Length’: ‘1488’, ‘Expires’: ‘Tue, 15 Dec 2015 16:07:05 GMT’, ‘Server’: ‘nginx’, ‘Connection’: ‘keep-alive’, ‘ETag’: ‘“55f255cc-5d0”’, ‘Pragma’: ‘no-cache’, ‘Cache-Control’: ‘max-age=0, no-cache, no-store’, ‘Date’: ‘Tue, 15 Dec 2015 16:07:05 GMT’, ‘Content-Type’: ‘text/html’}. Content: '\n\n\n\n \n \n \<meta name=“viewport” content=\n “width=device-width, initial-scale=1”\>\n\n Maintenance\n \<link href=\n “[//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css](https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css)”\n rel=“stylesheet” type=“text/css”\>\n \<link href=\n “[//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css](https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css)”\n rel=“stylesheet” type=“text/css”\>\n\n\n\n

\n 
\n 
\n\t

\n

\n\t
\n\n 
\n 
# 502 \n Maintenance Time
\n 
\n 
\n\n 
\n 
\n 

Sorry! We’re doing some cleanup at the moment. We’ll be back shortly.

\n 
\n 
\n 
\n 
\n 

[\n \n Service Status (letsencrypt.status.io)\n](https://letsencrypt.status.io "Twitter")

\n 
\n 
\n 

[\n \n Check with us on Twitter\n](https://twitter.com/letsencrypt "Twitter")

\n 
\n 
 \n 
\n\n\n\n\n’  
2015-12-15 16:07:05,204:DEBUG:acme.client:Received response \<Response [502]\> (headers: {‘Content-Length’: ‘1488’, ‘Expires’: ‘Tue, 15 Dec 2015 16:07:05 GMT’, ‘Server’: ‘nginx’, ‘Connection’: ‘keep-alive’, ‘ETag’: ‘“55f255cc-5d0”’, ‘Pragma’: ‘no-cache’, ‘Cache-Control’: ‘max-age=0, no-cache, no-store’, ‘Date’: ‘Tue, 15 Dec 2015 16:07:05 GMT’, ‘Content-Type’: ‘text/html’}): '\n\n\n\n \n \n \<meta name=“viewport” content=\n “width=device-width, initial-scale=1”\>\n\n Maintenance\n \<link href=\n “[//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css](https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css)”\n rel=“stylesheet” type=“text/css”\>\n \<link href=\n “[//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css](https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css)”\n rel=“stylesheet” type=“text/css”\>\n\n\n\n 
\n 
\n 
\n\t

\n

\n\t
\n\n 
\n 
# 502 \n Maintenance Time
\n 
\n 
\n\n 
\n 
\n 

Sorry! We’re doing some cleanup at the moment. We’ll be back shortly.

\n 
\n 
\n 
\n 
\n 

[\n \n Service Status (letsencrypt.status.io)\n](https://letsencrypt.status.io "Twitter")

\n 
\n 
\n 

[\n \n Check with us on Twitter\n](https://twitter.com/letsencrypt "Twitter")

\n 
\n 
 \n 
\n\n\n\n\n’  
2015-12-15 16:07:05,206:DEBUG:letsencrypt.cli:Exiting abnormally:  
Traceback (most recent call last):  
File “/root/.local/share/letsencrypt/bin/letsencrypt”, line 11, in   
sys.exit(main())  
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py”, line 1283, in main  
return args.func(args, config, plugins)  
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py”, line 501, in obtain\_cert  
le\_client = \_init\_le\_client(args, config, authenticator, installer)  
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py”, line 174, in \_init\_le\_client  
acc, acme = \_determine\_account(args, config)  
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py”, line 161, in \_determine\_account  
config, account\_storage, tos\_cb=\_tos\_cb)  
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/client.py”, line 116, in register  
acme = acme\_from\_config\_key(config, key)  
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/client.py”, line 41, in acme\_from\_config\_key  
return acme\_client.Client(config.server, key=key, net=net)  
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/client.py”, line 60, in **init**  
self.net.get(directory).json())  
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/client.py”, line 609, in get  
self.\_send\_request(‘GET’, url, \*\*kwargs), content\_type=content\_type)  
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/client.py”, line 556, in \_check\_response  
raise errors.ClientError(response)  
ClientError: \<Response [502]\>

###############################################################################

Someone knows what I can do to solve this error?

---

<div class="post-metadata">

**Author:** ![autoit4you](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@autoit4you](https://community.letsencrypt.org/u/autoit4you)\
**Post date:** [December 15, 2015, 4:28pm UTC](https://community.letsencrypt.org/t/an-unexpected-error-occurred-after-run-letsencrypt-client/7084/2 "2015-12-15T16:28:56Z")

</div>

If you tried that command in the last half hour, then thats probably because of the current “Service Disruption”, see [https://letsencrypt.status.io/pages/55957a99e800baa4470002da](https://letsencrypt.status.io/pages/55957a99e800baa4470002da). Would be nice when some LE Staff would comment what exactly is meant by `an interruption at the hardware security modules`.

---

<div class="post-metadata">

**Author:** ![superservidor](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@superservidor](https://community.letsencrypt.org/u/superservidor)\
**Post date:** [December 15, 2015, 4:31pm UTC](https://community.letsencrypt.org/t/an-unexpected-error-occurred-after-run-letsencrypt-client/7084/3 "2015-12-15T16:31:59Z")

</div>

Problem solved !! I ran the command again and get the SSL cert with no problem !!!

---

<div class="post-metadata">

**Author:** ![jcjones](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/jcjones/32/78_2.png) [@jcjones](https://community.letsencrypt.org/u/jcjones)\
**Post date:** [December 15, 2015, 4:43pm UTC](https://community.letsencrypt.org/t/an-unexpected-error-occurred-after-run-letsencrypt-client/7084/4 "2015-12-15T16:43:49Z")

</div>

> [@autoit4you](#):
>
> interruption at the hardware security modules.

Analysis is ongoing, but the gist is: the HSMs caught a warning from some network blip (probably?) and the failsafes triggered to pause issuance while it got checked out.

Boulder's designed to halt new issuance under such circumstances safely. OCSP responses, for example, remain up and fresh even in the face of an HSM interruption due to how Boulder batches them.
