Having trouble authenticating with JIRA Server over a virtual machine because of my company's proxy settings.
Here's the part of the script that breaks
jira_options={'server': 'https://jira.domain.com'}
oauth_dict = {
'access_token': access_token,
'access_token_secret': access_token_secret,
'consumer_key': consumer_key,
'key_cert': key_cert_data
}
jira = JIRA(options=jira_options, oauth=oauth_dict)
Error message:
[2019-03-27 15:03:23,907] {bash_operator.py:94} INFO - WARNING:root:HTTPSConnectionPool(host='jira.domain.com', port=443): Max retries exceeded with url: /rest/api/2/serverInfo (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f6e45ca5898>: Failed to establish a new connection: [Errno 110] Connection timed out',)) while doing GET https://jira.domain.com/rest/api/2/serverInfo [{'params': None, 'headers': {'User-Agent': 'python-requests/2.18.4', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json,*.*;q=0.9', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Atlassian-Token': 'no-check'}}]
[2019-03-27 15:03:23,907] {bash_operator.py:94} INFO - WARNING:root:Got ConnectionError [HTTPSConnectionPool(host='jira.domain.com', port=443): Max retries exceeded with url: /rest/api/2/serverInfo (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f6e45ca5898>: Failed to establish a new connection: [Errno 110] Connection timed out',))] errno:None on GET https://jira.domain.com/rest/api/2/serverInfo
I am able to run this code locally without issue an I have also tested a version of this script in cURL which works as expected, though this doesn't meet security standards because it's using simple authentication.
curl --noproxy “*” -o /usr/local/airflow/data/jira_input.json -D- -u ‘+jira_client_email+‘:’+jira_client_key+' -X GET -H “Content-Type: application/json” “https://jira.domain.com/rest/api/2/search?jql=project=CC&updatedDate=-3d&startAt=0&maxResults=3000”
Does anybody have experience with resolving proxy issues to hit the JIRA API?
Hi!
Looks like your issue was to OAuth token
The issue was not that I used OAuth token -- it was that our company's firewall settings needed to be changed to enable a direct IP connection between my vEnv and JIRA Server!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.