1

I am using JIRA authentication in python:

from jira.client import JIRA
option={'server':'https://jira.nutanix.com/','verify':False}
jira_obj=JIRA(options=options, basic_auth=(user, password))

The code is not correct, I just want to show the way I call the JIRA API.

I am getting error as:

WARNING:root:EOF occurred in violation of protocol (_ssl.c:590) while doing GET https://jira.nutanix.com/rest/api/2/serverInfo [{u'headers': {'Accept-Encoding': 'gzip, deflate', 'Accept': '/', 'User-Agent': 'python-requests/2.10.0', 'Connection': 'keep-alive', u'X-Atlassian-Token': u'no-check', u'Cache-Control': u'no-cache', u'Content-Type': u'application/json'}, 'params': None}]

WARNING:root:Got recoverable error from GET https://jira.nutanix.com/rest/api/2/serverInfo, will retry [1/3] in 10s. Err: EOF occurred in violation of protocol (_ssl.c:590) Traceback (most recent call last):

Any help on this? I'm on macOS 10.11

Full traceback:

Traceback (most recent call last):
  File "/Users/syam.mohan/PycharmProjects/cluster_busy/gold_closer.py",   line 25, in <module>
  print connect_jira('syam.mohan','pwd',option)
  File "/Users/syam.mohan/PycharmProjects/cluster_busy/gold_closer.py",    line 12, in connect_jira
    jira = JIRA('https://jira.nutanix.com/',basic_auth=(user,    password))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jira/client.py", line 261, in __init__
si = self.server_info()
  File    "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-  packages/jira/client.py", line 1619, in server_info
    return self._get_json('serverInfo')
  File    "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-  packages/jira/client.py", line 2035, in _get_json
    r = self._session.get(url, params=params)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jira/resilientsession.py", line 130, in get
    return self.__verb('GET', url, **kwargs)
  File     "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-   packages/jira/resilientsession.py", line 116, in __verb
    if self.__recoverable(response_or_exception, url, verb.upper(),     retry_number):
  File  "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jira/resilientsession.py", line 88, in __recoverable
    time.sleep(delay)

KeyboardInterrupt

5
  • Full traceback might help. Commented Jul 14, 2017 at 14:10
  • @BoboDarph added full stack Commented Jul 14, 2017 at 14:16
  • 1
    Could you please try sudo apt-get install libffi-dev; sudo pip install -U requests[security] ? Taken from here: stackoverflow.com/a/35419523/8085234 Commented Jul 14, 2017 at 14:31
  • @BoboDarph, awesome bro!!!! Worked!! Commented Jul 14, 2017 at 14:42
  • if you can answer it, i can accept it. and upvote it Commented Jul 14, 2017 at 14:43

1 Answer 1

2

Please try

sudo apt-get install libffi-dev
sudo pip install -U requests[security]

Source: Python Requests requests.exceptions.SSLError: [Errno 8] _ssl.c:504: EOF occurred in violation of protocol

Sign up to request clarification or add additional context in comments.

1 Comment

He said he is running a Mac... apt-get has nothing to do with Mac OSX

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.