This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: python2.7.9 [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
Type: crash Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: alex, binbjz
Priority: normal Keywords:

Created on 2014-12-15 05:46 by binbjz, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg232649 - (view) Author: binbjz (binbjz) Date: 2014-12-15 05:46
It will prompt ssl certificate_vefify_failed(_ssl.c:581) when I used pysphere with python 2.7.9 to connect server. But I switched python 2.7.8 it works well.

2014-12-15 13:22:53,187 [DEBUG] Can not connect to xxx.xxx.xxx.108: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
2014-12-15 13:22:53,187 [DEBUG] Can not connect to 153.65.178.113: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
Process Process-2:
Process Process-3:
Traceback (most recent call last):
Traceback (most recent call last):
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
2014-12-15 13:22:53,187 [DEBUG] Can not connect to xxx.xxx.xxx.109: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
Process Process-4:
Traceback (most recent call last):
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
2014-12-15 13:22:53,188 [DEBUG] Can not connect to xxx.xxx.xxx.104: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
Process Process-6:
Traceback (most recent call last):
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
2014-12-15 13:22:53,188 [DEBUG] Can not connect to 153.65.178.112: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
Process Process-1:
Traceback (most recent call last):
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
2014-12-15 13:22:53,189 [DEBUG] Can not connect to xxx.xxx.xxx.105: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
Process Process-7:
Traceback (most recent call last):
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
2014-12-15 13:22:53,190 [DEBUG] Can not connect to xxx.xxx.xxx.106: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
Process Process-8:
Traceback (most recent call last):
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
    self.run()
    self.run()
    self.run()
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run
    self.run()
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
    self.run()
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "EsxiControler.py", line 153, in get_all_inUse_vm_statusList
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "EsxiControler.py", line 153, in get_all_inUse_vm_statusList
    self._target(*self._args, **self._kwargs)
  File "EsxiControler.py", line 153, in get_all_inUse_vm_statusList
    self._target(*self._args, **self._kwargs)
    self._target(*self._args, **self._kwargs)
  File "EsxiControler.py", line 153, in get_all_inUse_vm_statusList
  File "EsxiControler.py", line 153, in get_all_inUse_vm_statusList
  File "EsxiControler.py", line 153, in get_all_inUse_vm_statusList
    meth2='get_inUse_vmstatus', meth3='disconnect', initK='vm_name', initV='vm_status')
  File "EsxiControler.py", line 210, in get_output_formatter
    meth2='get_inUse_vmstatus', meth3='disconnect', initK='vm_name', initV='vm_status')
    meth2='get_inUse_vmstatus', meth3='disconnect', initK='vm_name', initV='vm_status')
  File "EsxiControler.py", line 210, in get_output_formatter
    vm_dict = mtd2()
    meth2='get_inUse_vmstatus', meth3='disconnect', initK='vm_name', initV='vm_status')
  File "EsxiControler.py", line 210, in get_output_formatter
    meth2='get_inUse_vmstatus', meth3='disconnect', initK='vm_name', initV='vm_status')
  File "/tmp/EsxiControler.py", line 69, in get_inUse_vmstatus
  File "EsxiControler.py", line 210, in get_output_formatter
    vm_dict = mtd2()
  File "EsxiControler.py", line 210, in get_output_formatter
    vm_dict = mtd2()
  File "/tmp/EsxiControler.py", line 69, in get_inUse_vmstatus
    vm_dict = mtd2()
  File "/tmp/EsxiControler.py", line 69, in get_inUse_vmstatus
    vm_dict = mtd2()
  File "/tmp/EsxiControler.py", line 69, in get_inUse_vmstatus
  File "/tmp/EsxiControler.py", line 69, in get_inUse_vmstatus
    meth2='get_inUse_vmstatus', meth3='disconnect', initK='vm_name', initV='vm_status')
  File "EsxiControler.py", line 210, in get_output_formatter
    vm_dict = mtd2()
  File "/tmp/EsxiControler.py", line 69, in get_inUse_vmstatus
    for vmPath in self.get_vmlist():
    for vmPath in self.get_vmlist():
  File "/tmp/EsxiControler.py", line 56, in get_vmlist
  File "/tmp/EsxiControler.py", line 56, in get_vmlist
    for vmPath in self.get_vmlist():
    for vmPath in self.get_vmlist():
    for vmPath in self.get_vmlist():
    self.vmlist = self.server.get_registered_vms()
    self.vmlist = self.server.get_registered_vms()
  File "/tmp/EsxiControler.py", line 56, in get_vmlist
  File "/tmp/EsxiControler.py", line 56, in get_vmlist
  File "/tmp/EsxiControler.py", line 56, in get_vmlist
  File "2.7.9/lib/python2.7/site-packages/pysphere/vi_server.py", line 357, in get_registered_vms
  File "2.7.9/lib/python2.7/site-packages/pysphere/vi_server.py", line 357, in get_registered_vms
    self.vmlist = self.server.get_registered_vms()
    self.vmlist = self.server.get_registered_vms()
    self.vmlist = self.server.get_registered_vms()
  File "2.7.9/lib/python2.7/site-packages/pysphere/vi_server.py", line 357, in get_registered_vms
  File "2.7.9/lib/python2.7/site-packages/pysphere/vi_server.py", line 357, in get_registered_vms
  File "2.7.9/lib/python2.7/site-packages/pysphere/vi_server.py", line 357, in get_registered_vms
    for vmPath in self.get_vmlist():
  File "/tmp/EsxiControler.py", line 56, in get_vmlist
    self.vmlist = self.server.get_registered_vms()
  File "2.7.9/lib/python2.7/site-packages/pysphere/vi_server.py", line 357, in get_registered_vms
    self.run()
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "EsxiControler.py", line 153, in get_all_inUse_vm_statusList
2014-12-15 13:22:53,192 [DEBUG] Can not connect to xxx.xxx.xxx.83: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
    meth2='get_inUse_vmstatus', meth3='disconnect', initK='vm_name', initV='vm_status')
  File "EsxiControler.py", line 210, in get_output_formatter
    vm_dict = mtd2()
  File "/tmp/EsxiControler.py", line 69, in get_inUse_vmstatus
    for vmPath in self.get_vmlist():
  File "/tmp/EsxiControler.py", line 56, in get_vmlist
    self.vmlist = self.server.get_registered_vms()
  File "2.7.9/lib/python2.7/site-packages/pysphere/vi_server.py", line 357, in get_registered_vms
Process Process-5:
Traceback (most recent call last):
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
2014-12-15 13:22:53,192 [DEBUG] Can not connect to xxx.xxx.xxx.107: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
2014-12-15 13:22:53,192 [DEBUG] Can not connect to xxx.xxx.xxx.101: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
    self.run()
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "EsxiControler.py", line 153, in get_all_inUse_vm_statusList
    meth2='get_inUse_vmstatus', meth3='disconnect', initK='vm_name', initV='vm_status')
  File "EsxiControler.py", line 210, in get_output_formatter
    vm_dict = mtd2()
Process Process-10:
  File "/tmp/EsxiControler.py", line 69, in get_inUse_vmstatus
Traceback (most recent call last):
Process Process-9:
Traceback (most recent call last):
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    for vmPath in self.get_vmlist():
  File "/tmp/EsxiControler.py", line 56, in get_vmlist
    self.vmlist = self.server.get_registered_vms()
  File "2.7.9/lib/python2.7/site-packages/pysphere/vi_server.py", line 357, in get_registered_vms
    self.run()
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
    self.run()
  File "EsxiControler.py", line 153, in get_all_inUse_vm_statusList
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "EsxiControler.py", line 153, in get_all_inUse_vm_statusList
    meth2='get_inUse_vmstatus', meth3='disconnect', initK='vm_name', initV='vm_status')
  File "EsxiControler.py", line 210, in get_output_formatter
    vm_dict = mtd2()
    meth2='get_inUse_vmstatus', meth3='disconnect', initK='vm_name', initV='vm_status')
  File "/tmp/EsxiControler.py", line 69, in get_inUse_vmstatus
  File "EsxiControler.py", line 210, in get_output_formatter
    vm_dict = mtd2()
  File "/tmp/EsxiControler.py", line 69, in get_inUse_vmstatus
    for vmPath in self.get_vmlist():
  File "/tmp/EsxiControler.py", line 56, in get_vmlist
    self.vmlist = self.server.get_registered_vms()
  File "2.7.9/lib/python2.7/site-packages/pysphere/vi_server.py", line 357, in get_registered_vms
    for vmPath in self.get_vmlist():
  File "/tmp/EsxiControler.py", line 56, in get_vmlist
    self.vmlist = self.server.get_registered_vms()
  File "2.7.9/lib/python2.7/site-packages/pysphere/vi_server.py", line 357, in get_registered_vms
2014-12-15 13:22:53,193 [DEBUG] Can not connect to xxx.xxx.xxx.102: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
Process Process-11:
Traceback (most recent call last):
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
2014-12-15 13:22:53,194 [DEBUG] Can not connect to xxx.xxx.xxx.103: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
    self.run()
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "EsxiControler.py", line 153, in get_all_inUse_vm_statusList
    meth2='get_inUse_vmstatus', meth3='disconnect', initK='vm_name', initV='vm_status')
  File "EsxiControler.py", line 210, in get_output_formatter
    vm_dict = mtd2()
  File "/tmp/EsxiControler.py", line 69, in get_inUse_vmstatus
Process Process-12:
Traceback (most recent call last):
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    for vmPath in self.get_vmlist():
  File "/tmp/EsxiControler.py", line 56, in get_vmlist
    self.vmlist = self.server.get_registered_vms()
  File "2.7.9/lib/python2.7/site-packages/pysphere/vi_server.py", line 357, in get_registered_vms
    self.run()
  File "2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "EsxiControler.py", line 153, in get_all_inUse_vm_statusList
    meth2='get_inUse_vmstatus', meth3='disconnect', initK='vm_name', initV='vm_status')
  File "EsxiControler.py", line 210, in get_output_formatter
    vm_dict = mtd2()
  File "/tmp/EsxiControler.py", line 69, in get_inUse_vmstatus
    for vmPath in self.get_vmlist():
  File "/tmp/EsxiControler.py", line 56, in get_vmlist
    self.vmlist = self.server.get_registered_vms()
  File "2.7.9/lib/python2.7/site-packages/pysphere/vi_server.py", line 357, in get_registered_vms
    FaultTypes.NOT_CONNECTED)
    FaultTypes.NOT_CONNECTED)
VIException: [Not Connected]: Must call 'connect' before invoking this method
VIException: [Not Connected]: Must call 'connect' before invoking this method
    FaultTypes.NOT_CONNECTED)
VIException: [Not Connected]: Must call 'connect' before invoking this method
    FaultTypes.NOT_CONNECTED)
VIException: [Not Connected]: Must call 'connect' before invoking this method
    FaultTypes.NOT_CONNECTED)
VIException: [Not Connected]: Must call 'connect' before invoking this method
    FaultTypes.NOT_CONNECTED)
VIException: [Not Connected]: Must call 'connect' before invoking this method
    FaultTypes.NOT_CONNECTED)
VIException: [Not Connected]: Must call 'connect' before invoking this method
    FaultTypes.NOT_CONNECTED)
VIException: [Not Connected]: Must call 'connect' before invoking this method
    FaultTypes.NOT_CONNECTED)
VIException: [Not Connected]: Must call 'connect' before invoking this method
    FaultTypes.NOT_CONNECTED)
    FaultTypes.NOT_CONNECTED)
VIException: [Not Connected]: Must call 'connect' before invoking this method
VIException: [Not Connected]: Must call 'connect' before invoking this method
    FaultTypes.NOT_CONNECTED)
VIException: [Not Connected]: Must call 'connect' before invoking this method
msg232650 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2014-12-15 06:46
Python 2.7.9 enabled certificate validation by default for HTTP connections, see PEP476.

The server you're connecting to does not have a certificate that is trusted by your client. pysphere should configure SSL appropriately for this use case.
msg232652 - (view) Author: binbjz (binbjz) Date: 2014-12-15 07:19
alex,
thank you for quick reponse. I will check http://www.python.org/dev/peps/pep-0476/
msg232653 - (view) Author: binbjz (binbjz) Date: 2014-12-15 08:20
I have added code to disable global verification on phsphere. It works well. thanks.
History
Date User Action Args
2022-04-11 14:58:11adminsetgithub: 67241
2014-12-15 08:20:39binbjzsettype: behavior -> crash
resolution: not a bug ->
messages: + msg232653
2014-12-15 07:23:35berker.peksagsetstatus: open -> closed
type: crash -> behavior
resolution: not a bug
2014-12-15 07:19:15binbjzsetresolution: not a bug -> (no value)
messages: + msg232652
2014-12-15 06:46:04alexsetnosy: + alex
messages: + msg232650

resolution: not a bug
stage: resolved
2014-12-15 05:46:14binbjzcreate