Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

p.nettyException - Handling TooLongFrameException - Play! framework

I'm trying to get started with the Play! framework, but when I attempt to start the server with activator run, I get the error below. I'm using activator 1.2.12.

[warn] p.nettyException - Handling TooLongFrameException
org.jboss.netty.handler.codec.frame.TooLongFrameException: HTTP header is larger than 8192 bytes.
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.readHeader(HttpMessageDecoder.java:624) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.readHeaders(HttpMessageDecoder.java:531) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:195) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:102) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500) ~[netty-3.9.3.Final.jar:na]
[error] p.nettyException - Exception caught in Netty
java.lang.IllegalArgumentException: Header name cannot contain the following prohibited characters: =,;: \t\r\n\v\f 
    at org.jboss.netty.handler.codec.http.HttpHeaders.valideHeaderNameChar(HttpHeaders.java:1040) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.DefaultHttpHeaders.hash(DefaultHttpHeaders.java:63) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.DefaultHttpHeaders.add(DefaultHttpHeaders.java:140) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.readHeaders(HttpMessageDecoder.java:536) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:195) ~[netty-3.9.3.Final.jar:na]
[warn] p.nettyException - Handling TooLongFrameException
org.jboss.netty.handler.codec.frame.TooLongFrameException: HTTP header is larger than 8192 bytes.
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.readHeader(HttpMessageDecoder.java:624) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.readHeaders(HttpMessageDecoder.java:531) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:195) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:102) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500) ~[netty-3.9.3.Final.jar:na]
[error] p.nettyException - Exception caught in Netty
java.lang.IllegalArgumentException: Header name cannot contain the following prohibited characters: =,;: \t\r\n\v\f 
    at org.jboss.netty.handler.codec.http.HttpHeaders.valideHeaderNameChar(HttpHeaders.java:1040) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.DefaultHttpHeaders.hash(DefaultHttpHeaders.java:63) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.DefaultHttpHeaders.add(DefaultHttpHeaders.java:140) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.readHeaders(HttpMessageDecoder.java:536) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:195) ~[netty-3.9.3.Final.jar:na]
[warn] p.nettyException - Handling TooLongFrameException
org.jboss.netty.handler.codec.frame.TooLongFrameException: HTTP header is larger than 8192 bytes.
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.readHeader(HttpMessageDecoder.java:624) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.readHeaders(HttpMessageDecoder.java:531) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:195) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:102) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500) ~[netty-3.9.3.Final.jar:na]
[error] p.nettyException - Exception caught in Netty
java.lang.IllegalArgumentException: Header name cannot contain the following prohibited characters: =,;: \t\r\n\v\f 
    at org.jboss.netty.handler.codec.http.HttpHeaders.valideHeaderNameChar(HttpHeaders.java:1040) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.DefaultHttpHeaders.hash(DefaultHttpHeaders.java:63) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.DefaultHttpHeaders.add(DefaultHttpHeaders.java:140) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.readHeaders(HttpMessageDecoder.java:536) ~[netty-3.9.3.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:195) ~[netty-3.9.3.Final.jar:na]

Anyone familiar with this error?

I've noticed that this is occurring with all of the activator seeds. Without editing any files after running activator new. I've also updated to the most recent version of activator and scala, with no luck.

like image 874
domi91c Avatar asked Mar 27 '26 06:03

domi91c


1 Answers

Request Header size is more than 8192 bytes. You can set it by adding -Dhttp.netty.maxHeaderSize:xx (xx = size required based on your request header size) in system properties while running the application.

Or

Try to reduce the header size. Check the headers you are sending in the request.

Also see Production Configuration to configure that value in your application.conf.

like image 126
Abhishek Vijjapu Avatar answered Mar 28 '26 20:03

Abhishek Vijjapu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!