Rest API not working with HTTP/2

We have an iOS application that is in development and provides the ability for our customer's to report an issue (creating a JIRA issue and then attaching files). Sometime on Wednesday May 11, 2016 the REST API calls we were making would start to fail "sporadically". Further investigation determined they would (usually) fail on the first call and then work on the second call.

We did some digging and found that the problem appears to be with the HTTP 2.0 support from nginx (https://trac.nginx.org/nginx/ticket/959#comment:10). In fact, if I execute the following (using Windows CURL):

curl -D- -u {username} -X POST --data "{\"fields\":{\"project\":{\"key\":\"AS\"},\"summary\":\"My Test\",\"issuetype\":{\"name\":\"Bug\"}}}" -H "Content-Type: application/json" https://{hostname}/rest/api/2/issue

I will get a failure:

curl: (16) HTTP/2 stream 1 was not closed cleanly: error_code = 7

However, if I add in the --http1.1 argument to curl, it works properly.

We also decided to download the open source "JIRAConnect" and compiled and ran that with the latest version of XCode. Your code fails (same as ours in iOS) with a -1004 "Cannot connect to server" on the first attempt. A second attempt (typically) will be successful.

Can someone look into this as soon as possible. If this investigation is correct, the speculation is that sometime over the past few days you upgraded your REST servers to the nginx that was related a couple of weeks ago. One quick solution (until they fix the bug) is to indicate your server blocks do not support HTTP 2.

1 answer

FYI - It now appears this is working. I assume JIRAConnect and other clients are now working too with HTTP 2.0.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published 8 hours ago in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

33 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you