Jira inaccessible after upgrade or XML import with error "RFC2616 cookie value cannot have..."

Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

After upgrade or XML import into Jira >8.20.8, the instance presents the following error:

(Auto-migrated image: description temporarily unavailable)

On atlassian-jira.log there'll be the corresponding error message and stack trace:

2022-05-04 17:34:18,292-0700 http-nio-8080-exec-5 ERROR [c.a.j.web.servlet.InternalServerErrorServlet] {errorId=d8739e1f-0bb7-4c51-996e-1cdf693e9e16, interpretedMsg=, cause=java.lang.IllegalArgumentException: RFC2616 cookie value cannot have ' ', stacktrace=java.lang.IllegalArgumentException: RFC2616 cookie value cannot have ' ' at org.springframework.http.ResponseCookie$Rfc6265Utils.validateCookieValue(ResponseCookie.java:361) [spring-web-5.1.18.RELEASE.jar:5.1.18.RELEASE] at org.springframework.http.ResponseCookie.<init>(ResponseCookie.java:71) [spring-web-5.1.18.RELEASE.jar:5.1.18.RELEASE] at org.springframework.http.ResponseCookie.<init>(ResponseCookie.java:36) [spring-web-5.1.18.RELEASE.jar:5.1.18.RELEASE] at org.springframework.http.ResponseCookie$1.build(ResponseCookie.java:253) [spring-web-5.1.18.RELEASE.jar:5.1.18.RELEASE] at com.atlassian.jira.security.xsrf.XsrfTokenStore$CookieStore.set(XsrfTokenStore.java:91) [classes/:?] at com.atlassian.jira.security.xsrf.XsrfTokenStrategy.lambda$createAndStore$0(XsrfTokenStrategy.java:93) [classes/:?] at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source) [?:?] at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) [?:?] at com.atlassian.jira.security.xsrf.XsrfTokenStrategy.createAndStore(XsrfTokenStrategy.java:93) [classes/:?] at com.atlassian.jira.security.xsrf.XsrfTokenStrategy.access$200(XsrfTokenStrategy.java:21) [classes/:?] at com.atlassian.jira.security.xsrf.XsrfTokenStrategy$SessionBasedStrategy.getToken(XsrfTokenStrategy.java:203) [classes/:?] at com.atlassian.jira.security.xsrf.SimpleXsrfTokenGenerator.generateTokenImpl(SimpleXsrfTokenGenerator.java:96) [classes/:?] at com.atlassian.jira.security.xsrf.SimpleXsrfTokenGenerator.generateToken(SimpleXsrfTokenGenerator.java:43) [classes/:?] at com.atlassian.jira.security.xsrf.XsrfTokenAdditionRequestFilter.setXsrfToken(XsrfTokenAdditionRequestFilter.java:58) [classes/:?] at com.atlassian.jira.security.xsrf.XsrfTokenAdditionRequestFilter.doFilter(XsrfTokenAdditionRequestFilter.java:44) [classes/:?] [...]

Diagnosis

During startup, verify on atlassian-jira.log the current value of Server ID, you may identify unsupported characters (In this example we have a blank space):

2022-06-08 08:29:16,025-0700 JIRA-Bootstrap INFO [c.a.jira.upgrade.ConsistencyCheckerImpl] Checking JIRA consistency 2022-06-08 08:29:16,042-0700 JIRA-Bootstrap INFO [c.a.jira.upgrade.ConsistencyCheckerImpl] The Server ID for this JIRA instance is: [ UD9A-AZE3-5D13-78VV]

Additionally, verify if the parameter jira.xsrf.cookie.delim is defined, this hold a default value of "_", but if customized it also might result in the issue described here. This parameter may be set on jira-config.properties file.

Solution

For Server ID

  1. Stop Jira

  2. Run the following SQL command:

    UPDATE propertystring SET propertyvalue = '<ID>' where id = (select id from propertystring where id in (select id from propertyentry where PROPERTY_KEY='jira.sid.key'));
  3. Replace <ID> with the serial key without unsupported characters, using the format: XXXX-XXXX-XXXX-XXXX

  4. Restart Jira

For jira.xsrf.cookie.delim

  1. Stop Jira

  2. Remove property entry customization, so the default value ("_") is used.

  3. Restart Jira

Updated on April 21, 2026

Still need help?

The Atlassian Community is here for you.