I am new to Jira-Python
module. I am using below snippet to connect to my jira
server.
try:
print "Connecting to JIRA: %s" % jira_server
jira_options = {'server': jira_server, 'verify':False}
jira = JIRA(options=jira_options,
basic_auth=(jira_user,
jira_password))
return jira
except Exception,e:
# jira_options = {'server': jira_server, 'verify':False}
# time.sleep(60)
jira = JIRA(options=jira_options,
basic_auth=(jira_user,
jira_password))
print "Failed to connect to JIRA: %s" % e
sys.exit()
Sometimes above codes works fine. But most of the times it fails with below error:
HTTPSConnectionPool(host='my_jira_server_name', port=443): Max retries exceeded with url: /rest/api/2/serverInfo (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02D48450>: Failed to establish a new connection: [Errno 10061] No connection could be made because the target machine actively refused it',))
Can any one help me. Thanks in advance!