gpt4 book ai didi

java - p.nettyException - 处理 TooLongFrameException - 玩!框架

转载 作者:行者123 更新时间:2023-11-30 08:19:16 25 4
gpt4 key购买 nike

我正在尝试开始玩 Play!框架,但是当我尝试使用 activator run 启动服务器时,出现以下错误。我使用的是激活器 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]

有人熟悉这个错误吗?

我注意到所有激活剂种子都会发生这种情况。运行 activator new 后无需编辑任何文件。我还更新到了最新版本的 activator 和 scala,但没有成功。

最佳答案

请求 header 大小超过 8192 字节。您可以通过在运行应用程序时在系统属性中添加 -Dhttp.netty.maxHeaderSize:xx(xx = 根据您的请求 header 大小所需的大小)来设置它。

或者

尝试减小 header 大小。检查您在请求中发送的 header 。

另请参阅Production Configurationapplication.conf 中配置该值。

关于java - p.nettyException - 处理 TooLongFrameException - 玩!框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29189713/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com