You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
My REST API request from Python to JIRA is failing is following error message:
Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None
time.sleep() is not solving the issue.
Any help would be appreciated.
I received the same error. We have two environments one for dev and one for prod - both using the same set of credentials, so I often wrote a script and tested it on dev then I ran it on prod.
When I have had the prod jira object created, and reused the same variable but swapped the url to dev, I got the same error. I have created a new jira object and the issue was sorted.
I am not sure how the jira object is created in python, but I am assuming that when we reuse an existing jira object and change the url to a similar environment, python will not regenerate everything, perhaps reuses the previausly created auth_object and the jira server doesn't like the requests and refuses them as these were created for a different server.
So, yes we did couple of tests:
Its working from browser and postman
url = https://***jiraserver***/rest/api/2/issue/abc-123/?fields=issuelinks
response = requests.request("GET", url, auth=auth, headers=headers, data = payload, verify = False)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @alexey sorochkin ,
this sounds crazy. Due to the nature of a REST call, which is stateless, a connection is never kept open longer.
Can you give me more details when this happens? Does this happen only for specific calls? POST, GET, PUT same?
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok. Which call exactly?
have you tried to send the REST call with a browser extension to verify if it works in general?
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok this means the REST API interface in Jira is not broken. :)
Is
request.request()
from a library?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do other GET request (eg. get all projects) work with this HTTP request library function?
Try GET /rest/api/2/project
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, nothing is working. Event simple attemp to GET jira url information immediately resulting in this error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And what about a PUT/POST requests?
e.g. PUT /rest/api/2/issue/{issueIdOrKey}/assignee ?
Has your code ever worked?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
PUT and POST giving same error.
It worked up until few days ago and suddenly it started showing this error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you remember what has changed? A new SSL certificate pops up immedately into my mind, as a source of problems. Network changes? Host name changes?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We dont know yet, but thanks for ideas.
What network change can cause this kind of problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @alexey sorochkin ,
I have no clue about what could be the reason. But thinking logically, if your didn't change the Python script and Jira was also not manipulated, something in between must have been changed - the network (firewall, router, vpn, ...).
Probably there was a package / software upgrade on both client and server. Eg. a new Python lib / binary could react different than before.
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.