diff --git a/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocket.java b/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocket.java index 6141d51e855..133a873fd4d 100644 --- a/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocket.java +++ b/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocket.java @@ -118,7 +118,7 @@ void updateLastSendAndHeard() { void readLength() throws IOException { int len = incomingBuffer.getInt(); if (len < 0 || len >= packetLen) { - throw new IOException("Packet len " + len + " is out of range " + packetLen + "!"); + throw new IOException("Packet len " + len + " is out of range " + packetLen + "! -Djute.maxBuffer to cover it."); } incomingBuffer = ByteBuffer.allocate(len); }