Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jira Creating Project Throws 'Error creating project, XSRF check failed'

Tags:

I'm trying to get a copy of Jira running on a ubuntu server box I have on AWS. I configured Tomcat, and can successfully access my site at http://example.com:8080/jira and begin the setup process. I am able to create a username, but when instructed to make a first project, I receive the following error upon attempting to save:

Creating Project Throws 'Error creating project, XSRF check failed'

It is the same error that is documented here:

https://confluence.atlassian.com/jirakb/creating-project-throws-error-creating-project-xsrf-check-failed-397083076.html

By Atlassian themselves, as well as here:

https://answers.atlassian.com/questions/283780/looking-for-the-full-list-of-http-headers

By some forum users. Both cases suggest that the headers are being blocked, and the second link does a good job of listing out every header:

X-AREQUESTID
X-ASESSIONID
X-AUSERNAME
X-SITEMESH-OFF
X-Atlassian-Token
X-Requested-With

Do not forget to allow GET (of course), POST (of course) but also PUT http methods

The problem I'm facing is that I haven't been able to find out how my ubuntu server is blocking those headers. I'm running nginx, and will happily post my config if that helps. Otherwise all config was done in tomcat.

I got a tip somewhere that UFW may be blocking them, but that doesn't seem to be running. Does anyone know how I would go about unblocking these headers to resolve my Jira error?

like image 957
carbide20 Avatar asked May 27 '16 02:05

carbide20


1 Answers

UFW won't give you this error at all. UFW operates only up to Layer 4(TCP/UDP), not to the HTTP tier, the response you are getting is application layer, which means that all the lower layers are successfully communicating.

If you are running a proxy via nginx, make sure you have proxy_pass_request_headers on.

location / {
  proxy_pass                      http://example.com;
  proxy_set_header                Host http://example.com;
  proxy_pass_request_headers      on;
}

Check out:Setup Guide

You can only configure JIRA to respond to a single URL and this setting must match the URL that your users request for accessing your JIRA site. You cannot (for example) have a different hostname or URL for internal and external users. Any mismatch between this Base URL setting and the URL requested by your JIRA users will cause problems with dashboard gadgets.

XSRF is usually a misconfiguration of the hostname, you might want to check the base url that is configured.

like image 107
Luke Exton Avatar answered Sep 28 '22 02:09

Luke Exton