Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-30406

Jira logs excessive warnings regarding form parameters and servlets

    XMLWordPrintable

Details

    Description

      Summary

      Many parts of Jira put excessive log messages into the log files regarding form parameters, and servlets. Most prominently, this can be seen when logging in through the login gadget on the dashboard.

      Steps to Reproduce

      1. Log out of Jira
      2. Visit the System Dashboard
      3. Log in to Jira

      Expected Results

      The log in completes with no warnings.

      Actual Results

      The below exception is thrown in the catalina.out file:

      12-Jun-2019 14:41:02.918 WARNING [http-nio-8821-exec-11] com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters A servlet request, to the URI http://localhost:8821/j821/rest/gadget/1.0/login, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.
      

      Note that the URL will vary wildly depending on the specific usage - this is but one example.
       

      Notes

      There is an entry in log4j.properties to address this logging, however the WebComponent class uses java.util.logging - which means it doesn't respect the settings in log4j.properties - and why those settings do not have the desired effect (despite being uncommented in Jira by default).

      Workaround

      1. Shut down Jira
      2. Edit $jira-install/conf/logging.properties, and add the following at the bottom:
        # Suppress log spam about the request body - https://jira.atlassian.com/browse/JRASERVER-30406
        com.sun.jersey.spi.container.servlet.WebComponent.level = SEVERE
        com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters.level = SEVERE
        
      1. Restart Jira for the changes to take effect

      Attachments

        Issue Links

          Activity

            People

              drauf Daniel Rauf
              edalgliesh Eric Dalgliesh
              Votes:
              98 Vote for this issue
              Watchers:
              104 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: