Zookeeper error len4807928 is out of range!

Source: Internet
Author: User
Tags zookeeper

because of some misoperation, the data on the Znode node is too large, more than the length, when the LS or RMR will be error

probably like the following image:



Packet len4807928 is out of range

There are such articles on the outside Web:

Https://stackoverflow.com/questions/10249579/zookeeper-cli-failing-ioexception-packet-len12343123123-is-out-of-range


This is the source code of zookeeper:

707         void Readlength () throws IOException {
708             int len = Incomingbuffer.getint ();
709             if (Len < 0 | | Len >= packetlen) {
710                 throw new IOException ("Packet len" + len + "is out of range! ");
711             }
712             incomingbuffer = bytebuffer.allocate (len);
713         }

And there are solutions to the article in the outer web:



7 Down vote

I was able to work around this by increasing the max size of my listing call.

I added the "-djute.maxbuffer=50111000" to my zkcli.sh script so, it started the client using the following line:

$JAVA "-dzookeeper.log.dir=${zoo_log_dir}" "-dzookeeper.root.logger=${zoo_log4j_prop}" \
 "-djute.maxbuffer= 49107800 "-CP" $CLASSPATH "$CLIENT _jvmflags $JVMFLAGS \
 org.apache.zookeeper.ZooKeeperMain" $@ "

I was then able to list & use Rmr/big/node


It's about adding in your zkcli.sh.

The "-djute.maxbuffer=50111000" line is equivalent to increasing his maximum capacity and then deleting or LS viewing your node.

7 down vote

I am able to work around this by increasing the max size of my listing call.

I added the "-djute.maxbuffer=50111000" to my zkcli.sh script so it started the client using the following Li NE:

 $JAVA "-dzookeeper.log.dir=${zoo_log_dir}" "-dzookeeper.root.logger=${zoo_log4j_prop}" \ "-djute.maxbuffer= 49107800 "-CP" $CLASSPATH "$CLIENT _jvmflags $JVMFLAGS \ Org.apache.zookeeper.ZooKeeperMain" $@ "

I was then ABL E to list & use Rmr/big/node

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.