Skip to content

Commit

Permalink
ZOOKEEPER-4221: Improve the error message when message goes above jut…
Browse files Browse the repository at this point in the history
…e.maxbufer size

Author: Mathieu Marie <[email protected]>

Reviewers: Damien Diederen <[email protected]>, Mate Szalay-Beko <[email protected]>

Closes apache#1614 from mariemat/ZOOKEEPER-4221
  • Loading branch information
Mathieu Marie authored and symat committed Feb 26, 2021
1 parent 37eae03 commit 94d0c4d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,10 @@ private boolean readLength(SelectionKey k) throws IOException {
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");
Expand Down

0 comments on commit 94d0c4d

Please sign in to comment.