Creating a project fails with: An error occurred while trying to contact JIRA

Jaap Papavoine April 6, 2014

Hi,

When I use my admin account (with Jira Administration and Jira System Administrator global permissions) to create a new project, i receive an "An error occurred while trying to contact JIRA" error instead of the project type selection screen. Opening up my browser console i can see a 401 returned:

jira/rest/project-templates/1.0/templates?_=1396869269885 401 (Unauthorized)

The problem occurs both when i use the 'cog icon' -> Projects and then the create project button, and when i use the Project drowndown menu and then select 'create project'.

I noticed this problem does not occur when I bypass our IIS reverse proxy. What I also noticed is that when I perform the second login for administrative features this error does not occur.

Somehow, popping up the screen for the second logon fails behind the IIS reverse proxy.

Anyone?

3 answers

1 accepted

2 votes
Answer accepted
Jaap Papavoine April 13, 2014

I figured this one out.

By default, IIS provides custom error pages for certain http status codes. When jira asks for the second authentication for administrators, IIS replaces Jira's original response with the IIS error page. The Jira JavaScript code does not like this much and throws the error: 'An error occurred while trying to contact Jira'.

You can 'fix' this by configuring IIS to provide 'Detailed Errorpages' in the advanced configuration of the error pages feature.

For reference: We use the tomcat ajp connector to connect IIS to Jira. I'm not sure if this error also shows up using ARR. We will be building a test setup with ARR later this month so I'll report back when we figured that out.

Cheers!

valentinmk February 25, 2015

Hi, Jaap Papavoine Your solution is help in may case. Thanks a lot. For reference - IIS + AJP connector (Jacarta) + Tomcat 7 and it is still happins in JIRA 6.3

Jaap Papavoine February 25, 2015

Great! This is not so much a Jira issue, but more of a IIS issue. We moved away from AJP to using Advanced Request Routing succesfully. Using ARR avoids these kinds of problems.

David Rose May 11, 2015

Your a life saver, this saved me hours of sodding about!

1 vote
Thorsten Lenzgen May 11, 2016

Same problem here after upgrade to JIRA 7.1.6. I disabled all plugins (JIRA safe mode) and then i could create projects. One add-ons was not compatible with this version. It's important to check that before doing an upgrade smile

1 vote
David Kiellar November 19, 2015

I am getting this error with the new 7.0 version.  I can't add projects.  How do I fix this.  Not sure what to do

Suggest an answer

Log in or Sign up to answer