1 Reply Latest reply on Jul 5, 2017 6:21 AM by bluefirestorm

    requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)

    guitar2002 Lurker

      C:\Users\huangj20\Envs\cyc_jack\Scripts\python.exe C:/Jack_Data/study/VMware/vsphere-automation-sdk-python-master/samples/vsphere/contentlibrary/ovfdeploy/deploy_ovf_template.py --server 10.141.57.17 --username administrator@vsphere.local --password Password123! --clustername Cluster-D1051 --libitemname CentOS6
      server: 10.141.57.17
      Traceback (most recent call last):
        File "C:/Jack_Data/study/VMware/vsphere-automation-sdk-python-master/samples/vsphere/contentlibrary/ovfdeploy/deploy_ovf_template.py", line 158, in <module>
          main()
        File "C:/Jack_Data/study/VMware/vsphere-automation-sdk-python-master/samples/vsphere/contentlibrary/ovfdeploy/deploy_ovf_template.py", line 154, in main
          deploy_ovf_sample.main()
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\sample_base.py", line 96, in main
          self.before()
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\sample_base.py", line 72, in before
          attr()  # calling the method
        File "C:/Jack_Data/study/VMware/vsphere-automation-sdk-python-master/samples/vsphere/contentlibrary/ovfdeploy/deploy_ovf_template.py", line 70, in _setup
          self.servicemanager = self.get_service_manager()
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\sample_base.py", line 104, in get_service_manager
          self.skip_verification)
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\service_manager_factory.py", line 32, in get_service_manager
          cls.service_manager.connect()
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\service_manager.py", line 47, in connect
          skip_verification=self.skip_verification)
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\vapiconnect.py", line 50, in connect
          return login(stub_config, user, pwd)
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\vapiconnect.py", line 68, in login
          session_id = session_svc.create()
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\com\vmware\cis_client.py", line 190, in create
          return self._invoke('create', None)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\vmware\vapi\bindings\stub.py", line 238, in _invoke
          return self._api_interface.native_invoke(ctx, _method_name, kwargs)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\vmware\vapi\bindings\stub.py", line 169, in native_invoke
          method_result = self.invoke(ctx, method_id, data_val)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\vmware\vapi\bindings\stub.py", line 134, in invoke
          ctx)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\vmware\vapi\protocol\client\msg\json_connector.py", line 73, in invoke
          response = self._do_request(VAPI_INVOKE, params)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\vmware\vapi\protocol\client\msg\json_connector.py", line 109, in _do_request
          _, response_msg = self.rpc_provider.do_request(request_ctx, request_msg)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\vmware\vapi\protocol\client\rpc\requests_provider.py", line 88, in do_request
          timeout=self._timeout)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\requests\sessions.py", line 507, in post
          return self.request('POST', url, data=data, json=json, **kwargs)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\requests\sessions.py", line 464, in request
          resp = self.send(prep, **send_kwargs)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\requests\sessions.py", line 576, in send
          r = adapter.send(request, **kwargs)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\requests\adapters.py", line 431, in send
      disconnecting the session
          raise SSLError(e, request=request)
      requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)

      Process finished with exit code 1

      :\Users\huangj20\Envs\cyc_jack\Scripts\python.exe C:/Jack_Data/study/VMware/vsphere-automation-sdk-python-master/samples/vsphere/contentlibrary/ovfdeploy/deploy_ovf_template.py --server 10.141.57.17 --username administrator@vsphere.local --password Password123! --clustername Cluster-D1051 --libitemname CentOS6
      server: 10.141.57.17
      Traceback (most recent call last):
        File "C:/Jack_Data/study/VMware/vsphere-automation-sdk-python-master/samples/vsphere/contentlibrary/ovfdeploy/deploy_ovf_template.py", line 158, in <module>
          main()
        File "C:/Jack_Data/study/VMware/vsphere-automation-sdk-python-master/samples/vsphere/contentlibrary/ovfdeploy/deploy_ovf_template.py", line 154, in main
          deploy_ovf_sample.main()
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\sample_base.py", line 96, in main
          self.before()
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\sample_base.py", line 72, in before
          attr()  # calling the method
        File "C:/Jack_Data/study/VMware/vsphere-automation-sdk-python-master/samples/vsphere/contentlibrary/ovfdeploy/deploy_ovf_template.py", line 70, in _setup
          self.servicemanager = self.get_service_manager()
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\sample_base.py", line 104, in get_service_manager
          self.skip_verification)
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\service_manager_factory.py", line 32, in get_service_manager
          cls.service_manager.connect()
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\service_manager.py", line 47, in connect
          skip_verification=self.skip_verification)
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\vapiconnect.py", line 50, in connect
          return login(stub_config, user, pwd)
        File "C:\Jack_Data\study\VMware\vsphere-automation-sdk-python-master\samples\vsphere\common\vapiconnect.py", line 68, in login
          session_id = session_svc.create()
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\com\vmware\cis_client.py", line 190, in create
          return self._invoke('create', None)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\vmware\vapi\bindings\stub.py", line 238, in _invoke
          return self._api_interface.native_invoke(ctx, _method_name, kwargs)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\vmware\vapi\bindings\stub.py", line 169, in native_invoke
          method_result = self.invoke(ctx, method_id, data_val)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\vmware\vapi\bindings\stub.py", line 134, in invoke
          ctx)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\vmware\vapi\protocol\client\msg\json_connector.py", line 73, in invoke
          response = self._do_request(VAPI_INVOKE, params)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\vmware\vapi\protocol\client\msg\json_connector.py", line 109, in _do_request
          _, response_msg = self.rpc_provider.do_request(request_ctx, request_msg)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\vmware\vapi\protocol\client\rpc\requests_provider.py", line 88, in do_request
          timeout=self._timeout)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\requests\sessions.py", line 507, in post
          return self.request('POST', url, data=data, json=json, **kwargs)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\requests\sessions.py", line 464, in request
          resp = self.send(prep, **send_kwargs)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\requests\sessions.py", line 576, in send
          r = adapter.send(request, **kwargs)
        File "C:\Users\huangj20\Envs\cyc_jack\lib\site-packages\requests\adapters.py", line 431, in send
      disconnecting the session
          raise SSLError(e, request=request)
      requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
       
      Process finished with exit code 1