tethysplatform / TethysCluster

A Python module for creating HTCondor Clusters in the Cloud. TethysCluster is an adaptation of StarCluster (http://star.mit.edu/cluster)
GNU Lesser General Public License v3.0
1 stars 0 forks source link

Azure Certificate_Path - strange error when path doesn't exist #7

Open sdc50 opened 9 years ago

sdc50 commented 9 years ago

When the certificate file specified in CERTIFICATE_PATH is not found the following error is thrown:

$tethyscluster listclusters TethysCluster - (https://github.com/CI-WATER/TethysCluster/wiki) (v. 0.1.0) An adaptation of StarCluster (http://star.mit.edu/cluster)

!!! ERROR - Connection error: Traceback (most recent call last): File "/Users/sdc50/Documents/_MyDocuments/CI-Water/code/TethysCluster/test/lib/python2.7/site-packages/TethysCluster-0.1.0-py2.7.egg/tethyscluster/cli.py", line 273, in main sc.execute(args) File "/Users/sdc50/Documents/_MyDocuments/CI-Water/code/TethysCluster/test/lib/python2.7/site-packages/TethysCluster-0.1.0-py2.7.egg/tethyscluster/commands/listclusters.py", line 35, in execute self.cm.list_clusters(cluster_groups=args, File "/Users/sdc50/Documents/_MyDocuments/CI-Water/code/TethysCluster/test/lib/python2.7/site-packages/TethysCluster-0.1.0-py2.7.egg/tethyscluster/commands/base.py", line 117, in cluster_manager cm = cluster.ClusterManager(self.cfg, cloud=self.cloud) File "/Users/sdc50/Documents/_MyDocuments/CI-Water/code/TethysCluster/test/lib/python2.7/site-packages/TethysCluster-0.1.0-py2.7.egg/tethyscluster/commands/base.py", line 105, in cloud cloud = self.cfg.get_easy_cloud() File "/Users/sdc50/Documents/_MyDocuments/CI-Water/code/TethysCluster/test/lib/python2.7/site-packages/TethysCluster-0.1.0-py2.7.egg/tethyscluster/config.py", line 799, in get_easy_cloud return self.get_easy_sms() File "/Users/sdc50/Documents/_MyDocuments/CI-Water/code/TethysCluster/test/lib/python2.7/site-packages/TethysCluster-0.1.0-py2.7.egg/tethyscluster/config.py", line 787, in get_easy_sms sms = azureutils.EasySMS(**self.azure) File "/Users/sdc50/Documents/_MyDocuments/CI-Water/code/TethysCluster/test/lib/python2.7/site-packages/TethysCluster-0.1.0-py2.7.egg/tethyscluster/azureutils.py", line 122, in init self._region = self.get_region(location) File "/Users/sdc50/Documents/_MyDocuments/CI-Water/code/TethysCluster/test/lib/python2.7/site-packages/TethysCluster-0.1.0-py2.7.egg/tethyscluster/azureutils.py", line 177, in get_region if region_name not in self.regions: File "/Users/sdc50/Documents/_MyDocuments/CI-Water/code/TethysCluster/test/lib/python2.7/site-packages/TethysCluster-0.1.0-py2.7.egg/tethyscluster/azureutils.py", line 167, in regions regions = self.conn.list_locations() File "build/bdist.macosx-10.6-intel/egg/azure/servicemanagement/servicemanagementservice.py", line 1105, in list_locations Locations) File "build/bdist.macosx-10.6-intel/egg/azure/servicemanagement/servicemanagementclient.py", line 322, in _perform_get response = self.perform_get(path, x_ms_version) File "build/bdist.macosx-10.6-intel/egg/azure/servicemanagement/servicemanagementclient.py", line 136, in perform_get response = self._perform_request(request) File "build/bdist.macosx-10.6-intel/egg/azure/servicemanagement/servicemanagementclient.py", line 294, in _perform_request resp = self._filter(request) File "build/bdist.macosx-10.6-intel/egg/azure/http/httpclient.py", line 221, in perform_request self.send_request_headers(connection, request.headers) File "build/bdist.macosx-10.6-intel/egg/azure/http/httpclient.py", line 200, in send_request_headers connection.endheaders() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 991, in endheaders self._send_output(message_body) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 844, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 806, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1198, in connect self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 392, in wrap_socket ciphers=ciphers) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 146, in init ciphers) SSLError: [Errno 336265218] _ssl.c:355: error:140B0002:SSL routines:SSL_CTX_use_PrivateKey_file:system lib !!! ERROR - Check your internet connection?

sdc50 commented 9 years ago

See if I can catch the error and give a more helpful error message.