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 Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

282 views 0 12
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot