我是Jira-Python
模块新手。我正在使用以下代码段连接到我的jira
服务器。
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()
有时上面的代码可以正常工作。但大多数时候它失败并出现以下错误:
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',))
谁能帮我。提前致谢!