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 2e65da84044..02cde23a917 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 @@ 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");