BUG or server issue? KeyError: 'site'


#1

Hi,

We have a strange issue on one of our Plesk/Ubuntu servers. The server is configured similar to all our other Plesk/Ubuntu servers but we get the error only on that one. Just for info: The server with the issue is our “oldest” Plesk installation that has been upgraded over the time. Apart from that the servers are very similar and up-to-date.

We tried letsencypt (both 1.8 and 1.9) with several domains on the same host. The result was always the same.

My domain is: For security reasons we will use the placeholder DOMAIN.com and HOST.com

My operating system is (include version): Ubuntu 12.04.5 LTS‬

My web server is (include version): Apache/2.2.22 (Ubuntu)

I can login to a root shell on my machine (yes or no, or I don’t know): YES

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): Plesk 12.5.30 Update #51

I ran this command: Install certificate via Plesk extensions

It produced this output in Plesk:
Error: Let’s Encrypt SSL certificate installation failed: Failed letsencrypt execution: Saving debug log to /opt/psa/var/modules/letsencrypt/logs/letsencrypt.log
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for DOMAIN.com
http-01 challenge for www.DOMAIN.com
Starting new HTTPS connection (1): 127.0.0.1
Starting new HTTPS connection (1): HOST.com
Cleaning up challenges
An unexpected error occurred:
KeyError: 'site’
Please see the logfiles in /opt/psa/var/modules/letsencrypt/logs for more details.

It produced this output in /opt/psa/var/modules/letsencrypt/logs :

2016-10-25 05:59:04,592:DEBUG:letsencrypt_plesk.api_client:Plesk API-RPC request: <?xml version="1.0" ?>DOMAIN.com
2016-10-25 05:59:04,597:INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): 127.0.0.1
2016-10-25 05:59:04,609:DEBUG:requests.packages.urllib3.connectionpool:“POST /enterprise/control/agent.php HTTP/1.1” 301 178
2016-10-25 05:59:04,611:INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): HOST.com
2016-10-25 05:59:04,697:DEBUG:requests.packages.urllib3.connectionpool:“GET /enterprise/control/agent.php HTTP/1.1” 200 None
2016-10-25 05:59:04,700:DEBUG:letsencrypt_plesk.api_client:Plesk API-RPC response: <?xml version="1.0"?>


error
1003
Wrong request

2016-10-25 05:59:04,705:DEBUG:certbot.error_handler:Encountered exception:
Traceback (most recent call last):
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/certbot/auth_handler.py”, line 112, in _solve_challenges
resp = self.auth.perform(self.achalls)
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/letsencrypt_plesk/configurator.py”, line 77, in perform
responses.append(self.plesk_challenges[domain].perform(x))
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/letsencrypt_plesk/challenge.py”, line 28, in perform
self._init_domain_props()
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/letsencrypt_plesk/challenge.py”, line 52, in _init_domain_props
api_result = response[‘packet’][‘site’][‘get’][‘result’]
KeyError: ‘site’

2016-10-25 05:59:04,705:DEBUG:certbot.error_handler:Calling registered functions
2016-10-25 05:59:04,705:INFO:certbot.auth_handler:Cleaning up challenges
2016-10-25 05:59:04,707:DEBUG:certbot.main:Exiting abnormally:
Traceback (most recent call last):
File “/opt/psa/var/modules/letsencrypt/venv/bin/certbot”, line 11, in
sys.exit(main())
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/certbot/main.py”, line 776, in main
return config.func(config, plugins)
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/certbot/main.py”, line 511, in run
action, lineage = _auth_from_domains(le_client, config, domains)
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/certbot/main.py”, line 100, in _auth_from_domains
lineage = le_client.obtain_and_enroll_certificate(domains)
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/certbot/client.py”, line 281, in obtain_and_enroll_certificate
certr, chain, key, _ = self.obtain_certificate(domains)
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/certbot/client.py”, line 253, in obtain_certificate
self.config.allow_subset_of_names)
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/certbot/auth_handler.py”, line 74, in get_authorizations
resp = self._solve_challenges()
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/certbot/auth_handler.py”, line 112, in _solve_challenges
resp = self.auth.perform(self.achalls)
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/letsencrypt_plesk/configurator.py”, line 77, in perform
responses.append(self.plesk_challenges[domain].perform(x))
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/letsencrypt_plesk/challenge.py”, line 28, in perform
self._init_domain_props()
File “/usr/local/psa/var/modules/letsencrypt/venv.Kndyp/lib/python2.7/site-packages/letsencrypt_plesk/challenge.py”, line 52, in _init_domain_props
api_result = response[‘packet’][‘site’][‘get’][‘result’]
KeyError: ‘site’

Thanks!


#2

Hi @vidope, I don’t know if any of the letsencrypt_plesk developers hang out here. If not, you may need to find another forum to ask for their help, because it seems to me that this is a bug in that package (though it might be related to a problem with how the underlying certbot/letsencrypt package was installed upgraded).


#3

Hi @schoen, OK, we will try another forum or some own ideas. Thanks for the reply!


#4

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