Project

General

Profile

Bug #12023

Updated by François ARMAND almost 7 years ago

When editing a directive with a lot of parameter, I got the stack trace below.  


 It seems to be a Jetty problem, when the request is too big: https://stackoverflow.com/questions/22998834/webapp-with-embedded-jetty-giving-exception 

 The workaround seems to be to edit `/etc/default/rudder-jetty` 

 And update `JAVA_OPTIONS` to add "maxFormKey" Jetty parameter (documented here: http://www.eclipse.org/jetty/documentation/9.3.x/configuring-form-size.html) 

 got:  

 <pre> 
 JAVA_OPTIONS="(...existing options...) -Dorg.eclipse.jetty.server.Request.maxFormKeys=2000" 
 </pre> 

 <pre> 
 [2018-01-22 15:14:03] ERROR net.liftweb.http.LiftRules - Exception being returned to browser when processing /lift/ajax/F258035444682AVVN5G-20/ 
 java.lang.IllegalStateException: Form too many keys 
	 at org.eclipse.jetty.util.UrlEncoded.decodeUtf8To(UrlEncoded.java:518) 
	 at org.eclipse.jetty.util.UrlEncoded.decodeTo(UrlEncoded.java:611) 
	 at org.eclipse.jetty.server.Request.extractParameters(Request.java:298) 
	 at org.eclipse.jetty.server.Request.getParameterNames(Request.java:731) 
	 at javax.servlet.ServletRequestWrapper.getParameterNames(ServletRequestWrapper.java:189) 
	 at javax.servlet.ServletRequestWrapper.getParameterNames(ServletRequestWrapper.java:189) 
	 at net.liftweb.http.provider.servlet.HTTPRequestServlet.params$lzycompute(HTTPRequestServlet.scala:80) 
	 at net.liftweb.http.provider.servlet.HTTPRequestServlet.params(HTTPRequestServlet.scala:80) 
	 at net.liftweb.http.Req$.$anonfun$apply$14(Req.scala:493) 
	 at net.liftweb.http.AvoidGAL.thunk$lzycompute(Req.scala:355) 
	 at net.liftweb.http.AvoidGAL.thunk(Req.scala:355) 
	 at net.liftweb.http.Req$.$anonfun$apply$26(Req.scala:506) 
	 at net.liftweb.http.Req.x$49$lzycompute(Req.scala:973) 
	 at net.liftweb.http.Req.x$49(Req.scala:969) 
	 at net.liftweb.http.Req.__params$lzycompute(Req.scala:970) 
	 at net.liftweb.http.Req.__params(Req.scala:970) 
	 at net.liftweb.http.Req._params(Req.scala:947) 
	 at net.liftweb.http.Req.params$lzycompute(Req.scala:977) 
	 at net.liftweb.http.Req.params(Req.scala:977) 
	 at net.liftweb.http.Req.param(Req.scala:921) 
	 at net.liftweb.http.LiftServlet.runAjax(LiftServlet.scala:602) 
	 at net.liftweb.http.LiftServlet.$anonfun$handleAjax$1(LiftServlet.scala:753) 
	 at net.liftweb.http.LiftServlet.$anonfun$extractVersions$1(LiftServlet.scala:585) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$generateSnapshotRestorer$5(Vars.scala:546) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$generateSnapshotRestorer$4(Vars.scala:545) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$generateSnapshotRestorer$3(Vars.scala:545) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$generateSnapshotRestorer$2(Vars.scala:544) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$generateSnapshotRestorer$1(Vars.scala:543) 
	 at net.liftweb.http.S$PageStateHolder.runInContext(S.scala:228) 
	 at net.liftweb.http.RenderVersion$.$anonfun$doWith$3(LiftSession.scala:224) 
	 at net.liftweb.util.AnyVarTrait.doWith(AnyVar.scala:278) 
	 at net.liftweb.util.AnyVarTrait.doWith$(AnyVar.scala:274) 
	 at net.liftweb.util.AnyVar.doWith(AnyVar.scala:91) 
	 at net.liftweb.http.RenderVersion$.$anonfun$doWith$2(LiftSession.scala:223) 
	 at scala.Option.map(Option.scala:146) 
	 at net.liftweb.http.RenderVersion$.$anonfun$doWith$1(LiftSession.scala:219) 
	 at net.liftweb.common.Full.flatMap(Box.scala:808) 
	 at net.liftweb.http.RenderVersion$.doWith(LiftSession.scala:218) 
	 at net.liftweb.http.LiftServlet.extractVersions(LiftServlet.scala:585) 
	 at net.liftweb.http.LiftServlet.handleAjax(LiftServlet.scala:675) 
	 at net.liftweb.http.LiftServlet.net$liftweb$http$LiftServlet$$dispatchStatefulRequest(LiftServlet.scala:541) 
	 at net.liftweb.http.LiftServlet$StatefulResponse$.$anonfun$process$3(LiftServlet.scala:385) 
	 at net.liftweb.http.S.wrapQuery(S.scala:1562) 
	 at net.liftweb.http.S.$anonfun$_nest2InnerInit$2(S.scala:1729) 
	 at net.liftweb.http.S.doAround(S.scala:1491) 
	 at net.liftweb.http.S.$anonfun$_nest2InnerInit$1(S.scala:1717) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.S._nest2InnerInit(S.scala:1716) 
	 at net.liftweb.http.S.$anonfun$_innerInit$5(S.scala:1762) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.S.$anonfun$withReq$2(S.scala:1773) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.S.withReq(S.scala:1772) 
	 at net.liftweb.http.S.withReq$(S.scala:1770) 
	 at net.liftweb.http.S$.withReq(S.scala:47) 
	 at net.liftweb.http.S.$anonfun$_innerInit$4(S.scala:1757) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.S.$anonfun$_innerInit$3(S.scala:1755) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.S.$anonfun$_innerInit$2(S.scala:1755) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.S.$anonfun$_innerInit$1(S.scala:1754) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.S._innerInit(S.scala:1753) 
	 at net.liftweb.http.S.$anonfun$_init$7(S.scala:1795) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.S.$anonfun$_init$6(S.scala:1793) 
	 at net.liftweb.http.CoreRequestVarHandler.apply(Vars.scala:605) 
	 at net.liftweb.http.CoreRequestVarHandler.apply$(Vars.scala:591) 
	 at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:507) 
	 at net.liftweb.http.S.$anonfun$_init$5(S.scala:1793) 
	 at net.liftweb.http.CoreRequestVarHandler.apply(Vars.scala:605) 
	 at net.liftweb.http.CoreRequestVarHandler.apply$(Vars.scala:591) 
	 at net.liftweb.http.TransientRequestVarHandler$.apply(Vars.scala:520) 
	 at net.liftweb.http.S.$anonfun$_init$4(S.scala:1792) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.S.$anonfun$_init$3(S.scala:1791) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.S.$anonfun$_init$2(S.scala:1790) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.S._init(S.scala:1789) 
	 at net.liftweb.http.S.init(S.scala:1376) 
	 at net.liftweb.http.S.init$(S.scala:1370) 
	 at net.liftweb.http.S$.init(S.scala:47) 
	 at net.liftweb.http.LiftServlet$StatefulResponse$.doSession$1(LiftServlet.scala:385) 
	 at net.liftweb.http.LiftServlet$StatefulResponse$.process(LiftServlet.scala:394) 
	 at net.liftweb.http.LiftServlet.stepThroughPipeline$1(LiftServlet.scala:428) 
	 at net.liftweb.http.LiftServlet.doService(LiftServlet.scala:436) 
	 at net.liftweb.http.LiftServlet.$anonfun$service$2(LiftServlet.scala:157) 
	 at net.liftweb.util.TimeHelpers.calcTime(TimeHelpers.scala:427) 
	 at net.liftweb.util.TimeHelpers.calcTime$(TimeHelpers.scala:425) 
	 at net.liftweb.util.Helpers$.calcTime(Helpers.scala:34) 
	 at net.liftweb.util.TimeHelpers.logTime(TimeHelpers.scala:446) 
	 at net.liftweb.util.TimeHelpers.logTime$(TimeHelpers.scala:445) 
	 at net.liftweb.util.Helpers$.logTime(Helpers.scala:34) 
	 at net.liftweb.http.LiftServlet.doIt$1(LiftServlet.scala:156) 
	 at net.liftweb.http.LiftServlet.service(LiftServlet.scala:167) 
	 at net.liftweb.http.provider.HTTPProvider.$anonfun$service$7(HTTPProvider.scala:72) 
	 at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.URLRewriter$.doWith(Req.scala:1345) 
	 at net.liftweb.http.provider.HTTPProvider.$anonfun$service$4(HTTPProvider.scala:71) 
	 at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.provider.HTTPProvider.$anonfun$service$3(HTTPProvider.scala:70) 
	 at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.provider.HTTPProvider.service(HTTPProvider.scala:60) 
	 at net.liftweb.http.provider.HTTPProvider.service$(HTTPProvider.scala:55) 
	 at net.liftweb.http.LiftFilter.service(LiftServlet.scala:1064) 
	 at net.liftweb.http.provider.servlet.ServletFilterProvider.$anonfun$doFilter$3(ServletFilterProvider.scala:83) 
	 at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) 
	 at net.liftweb.http.provider.servlet.ServletFilterProvider.handleLoan$1(ServletFilterProvider.scala:59) 
	 at net.liftweb.http.provider.servlet.ServletFilterProvider.handleLoanWrappers(ServletFilterProvider.scala:63) 
	 at net.liftweb.http.provider.servlet.ServletFilterProvider.$anonfun$doFilter$2(ServletFilterProvider.scala:82) 
	 at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$apply$6(Vars.scala:611) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$apply$5(Vars.scala:610) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$apply$4(Vars.scala:610) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$apply$3(Vars.scala:609) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.CoreRequestVarHandler.apply(Vars.scala:608) 
	 at net.liftweb.http.CoreRequestVarHandler.apply$(Vars.scala:591) 
	 at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:507) 
	 at net.liftweb.http.provider.servlet.ServletFilterProvider.$anonfun$doFilter$1(ServletFilterProvider.scala:77) 
	 at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$apply$6(Vars.scala:611) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$apply$5(Vars.scala:610) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$apply$4(Vars.scala:610) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.CoreRequestVarHandler.$anonfun$apply$3(Vars.scala:609) 
	 at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) 
	 at net.liftweb.http.CoreRequestVarHandler.apply(Vars.scala:608) 
	 at net.liftweb.http.CoreRequestVarHandler.apply$(Vars.scala:591) 
	 at net.liftweb.http.TransientRequestVarHandler$.apply(Vars.scala:520) 
	 at net.liftweb.http.provider.servlet.ServletFilterProvider.doFilter(ServletFilterProvider.scala:75) 
	 at net.liftweb.http.provider.servlet.ServletFilterProvider.doFilter$(ServletFilterProvider.scala:69) 
	 at net.liftweb.http.LiftFilter.doFilter(LiftServlet.scala:1064) 
	 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1288) 
	 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 
	 at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) 
	 at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) 
	 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
	 at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) 
	 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
	 at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) 
	 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
	 at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) 
	 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
	 at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) 
	 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
	 at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) 
	 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
	 at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) 
	 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
	 at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) 
	 at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
	 at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) 
	 at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) 
	 at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) 
	 at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) 
	 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1288) 
	 at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443) 
	 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) 
	 at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:532) 
	 at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227) 
	 at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044) 
	 at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372) 
	 at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189) 
	 at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978) 
	 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) 
	 at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) 
	 at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) 
	 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) 
	 at org.eclipse.jetty.server.Server.handle(Server.java:369) 
	 at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:464) 
	 at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:924) 
	 at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:985) 
	 at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861) 
	 at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:236) 
	 at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) 
	 at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667) 
	 at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) 
	 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) 
	 at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) 
	 at java.lang.Thread.run(Thread.java:748) 
 </pre> 

 It seems to be a Jetty problem, when the request is too big: https://stackoverflow.com/questions/22998834/webapp-with-embedded-jetty-giving-exception 

 The workaround seems to be to edit `/etc/default/rudder-jetty` 

 And update `JAVA_OPTIONS` to add "maxFormKey" Jetty parameter (documented here: http://www.eclipse.org/jetty/documentation/9.3.x/configuring-form-size.html) 

 <pre> 
 JAVA_OPTIONS="(...existing options...) -Dorg.eclipse.jetty.server.Request.maxFormKeys=2000" 
 </pre> 

Back