Problem establishing secure connection: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:618)
I cannot connect to gracedb through python.
- I tried pcdev2, pcdev3, pcdev4, pcdev5.
- I tried ligo-proxy-init with and without '-p' option.
- I tried python2.7 and python3
- It works fine for me on my laptop, but not in CIT
Anybody could help?
[marek.szczepanczyk@ldas-pcdev5 ~]$ ligo-proxy-init marek.szczepanczyk
Your identity: marek.szczepanczyk@LIGO.ORG
Enter pass phrase for this identity:
Creating proxy .................................... Done
Your proxy is valid until: Aug 11 07:29:36 2019 GMT
[marek.szczepanczyk@ldas-pcdev5 ~]$ grid-proxy-info
subject : /DC=org/DC=cilogon/C=US/O=LIGO/CN=Marek Szczepanczyk marek.szczepanczyk@ligo.org
issuer : /DC=org/DC=cilogon/C=US/O=CILogon/CN=CILogon Basic CA 1
identity : /DC=org/DC=cilogon/C=US/O=LIGO/CN=Marek Szczepanczyk marek.szczepanczyk@ligo.org
type : end entity credential
strength : 2048 bits
path : /tmp/x509up_p2847529.file859K3H.1
timeleft : 275:59:58 (11.5 days)
[marek.szczepanczyk@ldas-pcdev5 ~]$ ipython
Python 2.7.5 (default, Jun 20 2019, 16:11:37)
Type "copyright", "credits" or "license" for more information.
IPython 3.2.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: from ligo.gracedb.rest import GraceDb
In [2]: client = GraceDb()
In [3]: response = client.event('G1234')
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-3-71dcac91ab4a> in <module>()
----> 1 response = client.event('G1234'
2 )
/usr/lib/python2.7/site-packages/ligo/gracedb/rest.pyc in event(self, graceid)
813 """
814 return self.get(
--> 815 self.templates['event-detail-template'].format(graceid=graceid))
816
817 def events(self, query=None, orderby=None, count=None, columns=None,
/usr/lib/python2.7/site-packages/ligo/gracedb/rest.pyc in templates(self)
610 @property
611 def templates(self):
--> 612 return self.service_info.get('templates')
613
614 @property
/usr/lib/python2.7/site-packages/ligo/gracedb/rest.pyc in service_info(self)
570 # checks whether that version is available on the server
571 try:
--> 572 r = self.request("GET", self._versioned_service_url)
573 except HTTPError as e:
574 # If we get a 404 error, that means that the versioned
/usr/lib/python2.7/site-packages/ligo/gracedb/rest.pyc in request(self, method, url, body, headers, priming_url)
670 priming_url = self._service_url
671 return super(GraceDb, self).request(method, url, body, headers,
--> 672 priming_url)
673
674 def _getCode(self, input_value, code_dict):
/usr/lib/python2.7/site-packages/ligo/gracedb/rest.pyc in request(self, method, url, body, headers, priming_url)
392 response = response.read()
393
--> 394 self.make_request(conn, method, url, body, headers or {})
395 response = self.get_response(conn)
396
/usr/lib/python2.7/site-packages/ligo/gracedb/rest.pyc in make_request(self, conn, *args, **kwargs)
357 msg = "\nERROR \n\n"
358 msg += "Problem establishing secure connection: %s \n\n" % str(e)
--> 359 self.output_and_die(msg)
360
361 def request(self, method, url, body=None, headers=None, priming_url=None):
/usr/lib/python2.7/site-packages/ligo/gracedb/rest.pyc in output_and_die(cls, msg)
473 @classmethod
474 def output_and_die(cls, msg):
--> 475 raise RuntimeError(msg)
476
477 # Given an HTTPResponse object, try to read its content and interpret as
RuntimeError:
ERROR
Problem establishing secure connection: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:618)