-
Bug
-
Resolution: Fixed
-
Medium
-
7.6.9, 7.13.9, 7.13.14, 8.13.2, 8.20.7, 9.4.2, 9.4.9
-
7.06
-
68
-
Severity 3 - Minor
-
7
-
-
Issue Summary
"The encoding [binary] is not recognised by the JRE" keeps getting logged in Tomcat log. It occurs quite often and creating a lot of noise in the logs.
Steps to Reproduce
- Create a fresh Jira 7.13 instance, without any add-ons
- Make sure Jira Software is installed
- Open a new incognito window > select Project > Create project > select "Scrum Software Development"
OR
Install a custom add-on that will to this warning being logged (one potential add-on is Back to Top). This can be the case in Jira 8.x as well.
Expected Results
Tomcat logs do not log any warning.
Actual Results
Upon selecting the project template, the following gets logged in the logs:
06-Jul-2020 13:43:15.291 WARNING [http-nio-7139-exec-23] org.apache.catalina.connector.Response.setContentType The encoding [binary] is not recognised by the JRE06-Jul-2020 13:43:15.291 WARNING [http-nio-7139-exec-23] org.apache.catalina.connector.Response.setContentType The encoding [binary] is not recognised by the JRE java.lang.IllegalArgumentException: java.io.UnsupportedEncodingException: The character encoding [binary] is not supported at org.apache.coyote.Response.setCharacterEncoding(Response.java:417) at org.apache.catalina.connector.Response.setContentType(Response.java:810) at org.apache.catalina.connector.ResponseFacade.setContentType(ResponseFacade.java:250) at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:138) at com.atlassian.gzipfilter.SelectingResponseWrapper.setContentType(SelectingResponseWrapper.java:68) at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:138) at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:138) at com.atlassian.core.filters.encoding.FixedHtmlEncodingResponseWrapper.setContentType(FixedHtmlEncodingResponseWrapper.java:38) at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:138) at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:138) at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:138) at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:138) at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:138) at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:138) at com.atlassian.core.filters.HeaderSanitisingResponseWrapper.setContentType(HeaderSanitisingResponseWrapper.java:57) at com.atlassian.plugin.webresource.impl.support.http.Response.setContentType(Response.java:56) at com.atlassian.plugin.webresource.impl.support.http.Response.setContentTypeIfNotBlank(Response.java:69) at com.atlassian.plugin.webresource.impl.http.Controller.sendCachedInProduction(Controller.java:288) at com.atlassian.plugin.webresource.impl.http.Controller.sendCached(Controller.java:282) at com.atlassian.plugin.webresource.impl.http.Controller.serveResource(Controller.java:213) at com.atlassian.plugin.webresource.impl.http.Controller.serveResource(Controller.java:62) at com.atlassian.plugin.webresource.impl.http.Router$2.apply(Router.java:45) at com.atlassian.plugin.webresource.impl.http.Router$2.apply(Router.java:43) at com.atlassian.plugin.webresource.impl.support.http.BaseRouter.callHandler(BaseRouter.java:167) at com.atlassian.plugin.webresource.impl.support.http.BaseRouter.dispatch(BaseRouter.java:144) at com.atlassian.plugin.webresource.servlet.PluginResourceDownload.serveFile(PluginResourceDownload.java:65) at com.atlassian.plugin.servlet.AbstractFileServerServlet.doGet(AbstractFileServerServlet.java:28) at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.atlassian.jira.web.filters.JiraLastFilter.lambda$doFilter$0(JiraLastFilter.java:39) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:74) at com.atlassian.jira.web.filters.JiraLastFilter.doFilter(JiraLastFilter.java:36) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.jira.tzdetect.IncludeResourcesFilter.doFilter(IncludeResourcesFilter.java:77) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.jira.baseurl.IncludeResourcesFilter.doFilter(IncludeResourcesFilter.java:34) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58
Workaround
Change logging level from WARNING level to ERROR, in order to suppress the message:
- Edit logging.properties file in $JIRA_INSTALL/conf
- At the end of the file, insert the following:
# Surpress 'The encoding [binary] is not recognised by the JRE' org.apache.catalina.connector.Response.level = ERROR
- Save the file and restart Jira
Notes
- The warning may not appear every time, while attempting to reproduce the issue.
- In order to have a successful replication, a private / incognito window must be used in order to clear browser cache.
- Some custom plugins can also cause this message being logged (e.g. we identified this message being logged due to Back to Top plugin). Disabling and uninstalling the plugin is a way to test
- A way to test if any other plugin is causing this message to be logged, is to enable Safe Mode, do a full re-index and check whether the issue still appears in the log.
- At this moment, we cannot see that the warning is present in Jira 8.5.x for the Jira Software add-on. However, it seems there is a different cause for this message in Jira 8.x., mainly related to custom plugins being used. In that case, users should reach to plugin vendors and report the behaviour.