Sebastian Lange
New Pleskian
The letsencrypt module fails to secure the (only) domain and the plesk panel on a fresh installed plesk system with a restored domain from backup (by Odin). There are currently just the default preinstalled plesk-panel default certificate under Tools->SSL Certs and the not working letsencrypt cert unter domain -> exampledomain.de -> ssl certs. The cert is selected correctly at the domin hosting settings.
This server just holds one domain which runs the panel under default port and the given (changed) homepage.
We select to use letsencrypt for the domain, include the www. prefix and also the plesk panel. After some time there is just the message
This server just holds one domain which runs the panel under default port and the given (changed) homepage.
We select to use letsencrypt for the domain, include the www. prefix and also the plesk panel. After some time there is just the message
The log at /usr/local/psa/var/modules/letsencrypt/logThis operation is taking too long. Check the results in a few minutes.
Code:
2016-09-09 14:01:39,343:DEBUG:certbot.storage:Writing new config /opt/psa/var/modules/letsencrypt/etc/renewal/exampledomain.de.conf.new.
2016-09-09 14:01:39,347:INFO:certbot.reporter:Reporting to user: Congratulations! Your certificate and chain have been saved at /opt/psa/var/modules/letsencrypt/etc/live/lob
o.de/fullchain.pem. Your cert will expire on 2016-12-08. To obtain a new or tweaked version of this certificate in the future, simply run certbot again with the "certonly" o
ption. To non-interactively renew *all* of your certificates, run "certbot renew"
2016-09-09 14:01:39,348:DEBUG:letsencrypt_plesk.api_client:Plesk API-RPC request: <?xml version="1.0" ?><packet><server><get_protos/></server></packet>
2016-09-09 14:01:39,351:INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): 127.0.0.1
2016-09-09 14:01:39,665:DEBUG:requests.packages.urllib3.connectionpool:"POST /enterprise/control/agent.php HTTP/1.1" 200 None
2016-09-09 14:01:39,668:DEBUG:letsencrypt_plesk.api_client:Plesk API-RPC response: <?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<server>
<get_protos>
<result>
<status>ok</status>
<protos>
<proto>1.0.0.0</proto>
<proto>1.1.0.0</proto>
<proto>1.2.0.0</proto>
<proto>1.3.0.0</proto>
<proto>1.3.1.0</proto>
<proto>1.3.2.0</proto>
<proto>1.3.3.0</proto>
<proto>1.3.4.0</proto>
<proto>1.3.5.0</proto>
<proto>1.4.0.0</proto>
<proto>1.4.1.0</proto>
<proto>1.4.2.0</proto>
<proto>1.4.1.1</proto>
<proto>1.4.1.2</proto>
<proto>1.5.0.0</proto>
<proto>1.5.1.0</proto>
<proto>1.5.2.0</proto>
<proto>1.5.2.1</proto>
<proto>1.6.0.0</proto>
<proto>1.6.0.1</proto>
<proto>1.6.0.2</proto>
<proto>1.6.2.0</proto>
<proto>1.6.3.0</proto>
<proto>1.6.3.1</proto>
<proto>1.6.3.2</proto>
<proto>1.6.3.3</proto>
<proto>1.6.3.4</proto>
<proto>1.6.3.5</proto>
<proto>1.6.4.0</proto>
<proto>1.6.5.0</proto>
<proto>1.6.6.0</proto>
<proto>1.6.7.0</proto>
</protos>
</result>
</get_protos>
</server>
</packet>
2016-09-09 14:01:39,677:DEBUG:letsencrypt_plesk.api_client:Plesk API-RPC request: <?xml version="1.0" ?><packet><certificate><get-pool><filter><domain-name>exampledomain.de</domain-name></filter></get-pool></certificate></packet>
2016-09-09 14:01:39,681:INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): 127.0.0.1
2016-09-09 14:01:39,975:DEBUG:requests.packages.urllib3.connectionpool:"POST /enterprise/control/agent.php HTTP/1.1" 200 None
2016-09-09 14:01:39,978:DEBUG:letsencrypt_plesk.api_client:Plesk API-RPC response: <?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<certificate>
<get-pool>
<result>
<status>ok</status>
<filter-id>exampledomain.de</filter-id>
<id>1</id>
<certificates>
<certificate>
<name>Lets Encrypt exampledomain.de</name>
</certificate>
</certificates>
</result>
</get-pool>
</certificate>
</packet>
2016-09-09 14:01:39,980:DEBUG:letsencrypt_plesk.api_client:Plesk API-RPC request: <?xml version="1.0" ?><packet><certificate><remove><filter><name>Lets Encrypt exampledomain.de</name></filter><site>exampledomain.de</site></remove></certificate></packet>
2016-09-09 14:01:39,982:INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): 127.0.0.1
2016-09-09 14:11:40,027:DEBUG:requests.packages.urllib3.connectionpool:"POST /enterprise/control/agent.php HTTP/1.1" 504 176
2016-09-09 14:11:40,045:DEBUG:letsencrypt_plesk.api_client:Plesk API-RPC response: <html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>
2016-09-09 14:11:40,104:DEBUG:certbot.error_handler:Encountered exception:
Traceback (most recent call last):
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/certbot/client.py", line 370, in deploy_certificate
self.installer.save() # needed by the Apache plugin
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/letsencrypt_plesk/configurator.py", line 177, in save
secure_plesk=self.conf('secure-panel'))
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/letsencrypt_plesk/deployer.py", line 133, in save
self.remove_cert()
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/letsencrypt_plesk/deployer.py", line 114, in remove_cert
response = self.plesk_api_client.request(request)
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/letsencrypt_plesk/api_client.py", line 96, in request
return XmlToDict(response.text.encode('utf-8'))
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/letsencrypt_plesk/api_client.py", line 188, in __init__
dom = parseString(data)
File "/opt/plesk/python/2.7/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/opt/plesk/python/2.7/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/opt/plesk/python/2.7/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
ExpatError: mismatched tag: line 6, column 2
2016-09-09 14:11:40,105:DEBUG:certbot.error_handler:Calling registered functions
2016-09-09 14:11:40,125:DEBUG:certbot.main:Exiting abnormally:
Traceback (most recent call last):
File "/opt/psa/var/modules/letsencrypt/venv/bin/certbot", line 11, in <module>
sys.exit(main())
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/certbot/main.py", line 744, in main
return config.func(config, plugins)
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/certbot/main.py", line 507, in run
lineage.chain, lineage.fullchain)
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/certbot/client.py", line 370, in deploy_certificate
self.installer.save() # needed by the Apache plugin
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/letsencrypt_plesk/configurator.py", line 177, in save
secure_plesk=self.conf('secure-panel'))
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/letsencrypt_plesk/deployer.py", line 133, in save
self.remove_cert()
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/letsencrypt_plesk/deployer.py", line 114, in remove_cert
response = self.plesk_api_client.request(request)
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/letsencrypt_plesk/api_client.py", line 96, in request
return XmlToDict(response.text.encode('utf-8'))
File "/usr/local/psa/var/modules/letsencrypt/venv.RB7fT/lib/python2.7/site-packages/letsencrypt_plesk/api_client.py", line 188, in __init__
dom = parseString(data)
File "/opt/plesk/python/2.7/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/opt/plesk/python/2.7/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/opt/plesk/python/2.7/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
ExpatError: mismatched tag: line 6, column 2