Sample HTTPS connector configuration causes parse errors

XMLWordPrintable

      Hi,

      When I use the sample HTTPS connector configuration for conf/server.xml from:

      https://confluence.atlassian.com/adminjiraserver/running-jira-applications-over-ssl-or-https-938847764.html

      it causes Jira 9.2.0 to fail to start, with the following parse error in logs/catalina.out:

      06-Sep-2022 06:06:30.734 WARNING [main] org.apache.catalina.startup.Catalina.parseServerXml Unable to load server configuration from [/opt/atlassian/jira/conf/server.xml]
              org.xml.sax.SAXParseException; systemId: file:/opt/atlassian/jira/conf/server.xml; lineNumber: 35; columnNumber: 80; Element type "Connector" must be followed by either attribute specifications, ">" or "/>".
                      at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
                      at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
                      at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1535)
                      at org.apache.catalina.startup.Catalina.parseServerXml(Catalina.java:617)
                      at org.apache.catalina.startup.Catalina.load(Catalina.java:709)
                      at org.apache.catalina.startup.Catalina.load(Catalina.java:746)
                      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                      at java.base/java.lang.reflect.Method.invoke(Unknown Source)
                      at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:305)
                      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
      06-Sep-2022 06:06:30.738 SEVERE [main] org.apache.catalina.startup.Catalina.start Cannot start server, server instance is not configured

      The cause appears to have been a copy-paste from step 3 of the workaround in JRASERVER-67974, which reads:

      Add relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>" to properties

      However, the actual example given immediately afterward in JRASERVER-67974 has several of the characters in the relaxedQueryChars string encoded, as does the KB article referenced in the workaround:

      relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"

      I've double-checked the default Jira server.xml and it uses the encoded version. Changing relaxedQueryChars to use that fixes the startup problem.

      Can the documentation be updated to match what appears to be used and working in practice, i.e.


      Step 2. Update Tomcat with the KeyStore

      1. Create a backup of <Jira_INSTALL>/conf/server.xml before editing it.
      2. Edit the HTTPS connector so that it has the parameters that point to the keystore:
        <Connector relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;" port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxHttpHeaderSize="8192" SSLEnabled="true" maxThreads="150" minSpareThreads="25" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" sslEnabledProtocols="TLSv1.2,TLSv1.3" clientAuth="false" useBodyEncodingForURI="true" keyAlias="jira" keystoreFile="<Jira_HOME>/jira.jks" keystorePass="changeit" keystoreType="JKS"/>
        

      Thanks for your time and consideration!

            Assignee:
            Oksana Levchuk
            Reporter:
            Marcus Fong
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: