Jira server startup fails with Tomcat misconfigured error

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

After upgrading Apache Tomcat to version 8.5.32 (see JRASERVER-68058 - Getting issue details... STATUS ), we’ve added new properties to the server.xml file that allow Tomcat to accept requests with special characters. Depending on the version you’re upgrading from, you might need to add these properties to your server.xml file.

症状

You can recognize that your server.xml file is missing these configuration properties by the following problems: 

  • The advanced search panel (JQL) is not displaying
  • Accessing some pages in Jira fail (404 error)
  • When starting up Jira, an error is displayed blocking the startup
  • An error about Tomcat misconfiguration is written in the log file 

影響バージョン

  • If you’re installing Jira from scratch, regardless of the version, you’re good to go, as the new server.xml file will contain the right properties.
  • If you’re upgrading from Jira 7.12.1 or earlier to any later version, make sure you don’t just copy the old server.xml file into the new version, but add the required properties (as described below)

Problem in detail

The Apache Tomcat server, which is a web server used by Jira, is filtering out requests that contain special characters. That’s because Tomcat is using a different encoding and URI standard than most browsers. The problem is most visible when searching with JQL as you’d use a number of special characters when doing it (e.g. []<>), but it can also affect other pages in Jira.

See also Apache Tomcat 8.5 http docs for more details: 

relaxedPathChars:

The HTTP/1.1 specification requires that certain characters are %nn encoded when used in URI paths. Unfortunately, many user agents including all the major browsers are not compliant with this specification and use these characters in unencoded form. To prevent Tomcat rejecting such requests, this attribute may be used to specify the additional characters to allow. If not specified, no additional characters will be allowed. The value may be any combination of the following characters: " < > [ \ ] ^ ` { | } . Any other characters present in the value will be ignored.


ソリューション

  1. <Jira-installation-directory>/conf に移動し、server.xml ファイルを編集します。
  2. Find all connectors your application is using. Just search for Connector in the file, or look at the example below. You're interested only in connectors whose protocol is set to HTTP and HTTPS (not AJP).
  3. server.xml の connector プロパティに relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"  を追加します。例:

    <Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443" acceptCount="100" disableUploadTimeout="true" bindOnInit="false"/>
  4. Jira を再起動します。
  5. (Data Center) Repeat these steps for each node.


最終更新日 2019 年 9 月 25 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.