JBoss EAP 5 fails to parse chunk encoded MCMP responses with parsing error
Issue
- JBoss fails to parse MCMP responses with a
java.lang.NumberFormatException:
INFO [DefaultMCMPHandler] Error parsing response header for command CONFIG
java.lang.NumberFormatException: For input string: "[1],Name:"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at java.lang.Integer.parseInt(Integer.java:499)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(DefaultMCMPHandler.java:914)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequests(DefaultMCMPHandler.java:720)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPHandler.java:481)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPHandler.java:446)
at org.jboss.modcluster.CatalinaEventHandler.status(CatalinaEventHandler.java:331)
at org.jboss.modcluster.CatalinaEventHandler.status(CatalinaEventHandler.java:56)
at org.jboss.modcluster.CatalinaEventHandlerAdapter.lifecycleEvent(CatalinaEventHandlerAdapter.java:160)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1348)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1612)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1601)
- We note this can occur with lots of nodes, contexts, and/or aliases as httpd may use chunked encoding for larger responses. JBoss is not properly parsing such chunk encoded MCMP responses.
- The JBoss node has -1 load on the httpd
mod_cluster-managerpage and is not being sent requests. Requests on httpd fail with an error saying "All workers in error state" - JBoss fails to parse MCMP responses with a
java.lang.StringIndexOutOfBoundsException:
INFO [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error parsing response header for command CONFIG
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(DefaultMCMPHandler.java:906)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequests(DefaultMCMPHandler.java:720)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPHandler.java:481)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPHandler.java:446)
at org.jboss.modcluster.CatalinaEventHandler.status(CatalinaEventHandler.java:331)
at org.jboss.modcluster.CatalinaEventHandler.status(CatalinaEventHandler.java:56)
at org.jboss.modcluster.CatalinaEventHandlerAdapter.lifecycleEvent(CatalinaEventHandlerAdapter.java:160)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1348)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1612)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1601)
at java.lang.Thread.run(Thread.java:682)
Environment
- JBoss Enteprise Application Platform (EAP) 5.2.0 and earlier
- JBoss Enterprise Web Server (EWS)
- Apache httpd
- mod_cluster 1.0.10.GA_CP04 and earlier
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.