HDFS FQA-Active Namenode does not exit SafeMode with error :"Protocol message was too large.
1、背景
重新启动 Active Namenode 时,它卡在安全模式并报告以下错误:
Caused by: java.lang.IllegalStateException: com.google.protobuf.InvalidProtocolBufferException: Protocol message was too large. May be malicious. Use CodedInputStream.setSizeLimit() to increase the size limit.
2、原因
Namenode 拒绝块报告,因为它们大于 128 MB,因此陷入安全模式
java.lang.IllegalStateException: com.google.protobuf.InvalidProtocolBufferException: Protocol message was too large. May be malicious. Use CodedInputStream.setSizeLimit() to increase the size limit.
3、解决方案
在hdfs-site.xml中添加以下配置
ipc.maximum.data.length=268435456
默认的ipc.maximum.data.length是128MB,修改为256MB