HBase Master:CodedInputStream 遇到了声称具有负大小的嵌入字符串或消息

HBase Master: CodedInputStream encountered an embedded string or message which claimed to have negative size

尝试访问 HBase 网络时出现此错误 ui:

2020-03-11 13:43:55,295 ERROR org.mortbay.log: /master-status
java.lang.IllegalArgumentException: com.google.protobuf.InvalidProtocolBufferException: CodedInputStream encountered an embedded string or message which claimed to have negative size.

解决方案

  1. 停止 hbase masterbackup-masterregion servers
  2. 运行 使用 hbase 命令离线修复 hbase master table:
    hbase org.apache.hadoop.hbase.util.hbck.OfflineMetaRepair`
    
  3. 登录Zookeeper,删除hbase根目录:
    deleteall /hbase
    
    注意:您可能需要重新创建目录并通过 setAcl
  4. 再次正确设置zookeeper权限
  5. 启动 HBase masterbackup-masterregion server