• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Migration Issue -'module' object has no attribute

Frank colson

New Pleskian
After performing an upgrade from 12 to 12.5 I was able to perform one successful migration. Now when attempting to run a subsequent migration I get the following error in the web form.

Failed to check Plesk API connection to target Plesk server: 'module' object has no attribute 'PROTOCOL_TLSv1_1'

info.log
[2017-01-16 18:29:02][INFO] START: Check connections
[2017-01-16 18:29:04][ERROR] Failed to check Plesk API connection to target Plesk server: 'module' object has no attribute 'PROTOCOL_TLSv1_1'

debug.log shows the error starting with:

+|2017-01-16_18:29:03,940|D|MT|core.utils.common.http_xml_client|||API request to https://216.224.xxx.xxx:8443/enterprise/control/agent.php:
=|2017-01-16_18:29:03,940|D|MT|core.utils.common.http_xml_client|||<?xml version="1.0" encoding="utf-8"?>
=|2017-01-16_18:29:03,940|D|MT|core.utils.common.http_xml_client|||<packet version="1.5.2.1">
=|2017-01-16_18:29:03,940|D|MT|core.utils.common.http_xml_client||| <server>
=|2017-01-16_18:29:03,940|D|MT|core.utils.common.http_xml_client||| <get>
=|2017-01-16_18:29:03,940|D|MT|core.utils.common.http_xml_client||| <stat/>
=|2017-01-16_18:29:03,940|D|MT|core.utils.common.http_xml_client||| </get>
=|2017-01-16_18:29:03,940|D|MT|core.utils.common.http_xml_client||| </server>
=|2017-01-16_18:29:03,940|D|MT|core.utils.common.http_xml_client|||</packet>
=|2017-01-16_18:29:03,940|D|MT|core.utils.common.http_xml_client|||
+|2017-01-16_18:29:03,941|D|MT|core.connections.checker|||Exception:
=|2017-01-16_18:29:03,941|D|MT|core.connections.checker|||Traceback (most recent call last):
=|2017-01-16_18:29:03,941|D|MT|core.connections.checker||| File "/usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/core/connections/checker.py", line 49, in check_plesk_api​

Looks like the empty XML may be causing some issue, but it is not clear.

The final part of the stack trace is:

=|2017-01-16_18:29:03,941|D|MT|core.connections.checker||| (ssl.PROTOCOL_TLSv1_1, "TLSv1.1"),
=|2017-01-16_18:29:03,941|D|MT|core.connections.checker|||AttributeError: 'module' object has no attribute 'PROTOCOL_TLSv1_1'
+|2017-01-16_18:29:03,943|D|MT|core.workflow.runner.by_subscription|||Execute shutdown action 'cleanup'​

My guess is that python cannot negotiate TLS with the local server and is failing, I just have no idea how to fix it the "plesk" way so that I am not breaking other services.

Thanks in advance for your help
 
Hello, Frank!
Could you please provide me the following information:
1. OS and bitness of target server
2. Content of /etc/sw-cp-server/conf.d/ssl.conf on target server
3. Python version and the list of available SSL protocols using the following commands:

# /opt/plesk/python/2.7/bin/python
Python 2.7.10 (default, Aug 24 2015, 13:10:16)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> print [elem for elem in dir(ssl) if elem.startswith('PROTOCOL_')]
 
Alina,

Thank you in advance for your help.

1. OS and bitness of target server - CentOS release 5.11 (Final) x86_64
2. Contents of ssl.conf - red items were added by me in an attempt to resolve the issue

ssl_ciphers HIGH:!aNULL:!MD5;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;

3. Python version and list of available SSL protocols

/opt/plesk/python/2.7/bin/python
Python 2.7.10 (default, Aug 24 2015, 13:06:43)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> print [elem for elem in dir(ssl) if elem.startswith('PROTOCOL_')]
['PROTOCOL_SSLv2', 'PROTOCOL_SSLv23', 'PROTOCOL_SSLv3', 'PROTOCOL_TLSv1']

as a note, when running the OS version of python, ssl is not available.

python
Python 2.4.3 (#1, Jan 9 2013, 06:47:03)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named ssl

Perhaps after the 12.5 upgrade, plesk is no longer using python 2.7 and is reverting to the OS version without SSL. Not sure how to test this however.

As root, by default I am using the OS version of Python.

[root@vps-]# which python
/usr/bin/python


Thanks again,

Frank
 
Hello!
We will fix this issue in the nearest updates of Plesk Migrator, issue number(PMT-3417), thank you for provided information!
 
Back
Top