This is an automated email from the ASF dual-hosted git repository.
symat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 94d0c4d ZOOKEEPER-4221: Improve the error message when message goes
above jute.maxbufer size
94d0c4d is described below
commit 94d0c4d8558e1b201665bb9dffd33dacbc7ca945
Author: Mathieu Marie <[email protected]>
AuthorDate: Fri Feb 26 09:35:02 2021 +0000
ZOOKEEPER-4221: Improve the error message when message goes above
jute.maxbufer size
Author: Mathieu Marie <[email protected]>
Reviewers: Damien Diederen <[email protected]>, Mate Szalay-Beko
<[email protected]>
Closes #1614 from mariemat/ZOOKEEPER-4221
---
.../src/main/java/org/apache/zookeeper/server/NIOServerCnxn.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/zookeeper-server/src/main/java/org/apache/zookeeper/server/NIOServerCnxn.java
b/zookeeper-server/src/main/java/org/apache/zookeeper/server/NIOServerCnxn.java
index 2e65da8..02cde23 100644
---
a/zookeeper-server/src/main/java/org/apache/zookeeper/server/NIOServerCnxn.java
+++
b/zookeeper-server/src/main/java/org/apache/zookeeper/server/NIOServerCnxn.java
@@ -545,7 +545,10 @@ public class NIOServerCnxn extends ServerCnxn {
return false;
}
if (len < 0 || len > BinaryInputArchive.maxBuffer) {
- throw new IOException("Len error " + len);
+ throw new IOException("Len error. "
+ + "A message from " + this.getRemoteSocketAddress() + "
with advertised length of " + len
+ + " is either a malformed message or too large to process"
+ + " (length is greater than jute.maxbuffer=" +
BinaryInputArchive.maxBuffer + ")");
}
if (!isZKServerRunning()) {
throw new IOException("ZooKeeperServer not running");