doCheckpoint中的异常:状态待机中不支持操作类别JOURNAL

时间:2016-09-15 06:12:03

标签: hadoop hdfs

我使用一个DataNode,活动NameNode,备用NameNode和三个JournalNode创建了HA-Cluster 什么时候把文件放到HDFS得到这个错误:

put: Operation category READ is not supported in state standby

put命令:

./hadoop fs -put golnaz.txt /user/input

NameNode日志:

at org.apache.hadoop.ipc.Client.call(Client.java:1476)
    at org.apache.hadoop.ipc.Client.call(Client.java:1407)
    at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:229)
    at com.sun.proxy.$Proxy15.rollEditLog(Unknown Source)
    at org.apache.hadoop.hdfs.protocolPB.NamenodeProtocolTranslatorPB.rollEditLog(NamenodeProtocolTranslatorPB.java:148)
    at org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer.triggerActiveLogRoll(EditLogTailer.java:273)
    at org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer.access$600(EditLogTailer.java:61)
    at org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer$EditLogTailerThread.doWork(EditLogTailer.java:315)
    at org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer$EditLogTailerThread.access$200(EditLogTailer.java:284)
    at org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer$EditLogTailerThread$1.run(EditLogTailer.java:301)
    at org.apache.hadoop.security.SecurityUtil.doAsLoginUserOrFatal(SecurityUtil.java:415)
    at org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer$EditLogTailerThread.run(EditLogTailer.java:297)
2016-09-15 02:07:23,961 INFO org.apache.hadoop.ipc.Server: IPC Server handler 9 on 9000, call org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol.rollEditLog from 103.41.177.161:45797 Call#11403 Retry#0: org.apache.hadoop.ipc.StandbyException: Operation category JOURNAL is not supported in state standby
2016-09-15 02:07:30,547 INFO org.apache.hadoop.ipc.Server: IPC Server handler 0 on 9000, call org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol.rollEditLog from 103.41.177.160:39200 Call#11404 Retry#0: org.apache.hadoop.ipc.StandbyException: Operation category JOURNAL is not supported in state standby

SecondaryNameNode日志中的错误:

ERROR org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Exception in doCheckpoint
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category JOURNAL is not supported in state standby

这是HDFS-Site.xml:

<configuration>
<property>
    <name>dfs.data.dir</name>
    <value>/root/hadoopstorage/data</value>
    <final>true</final>
</property>
<property>
    <name>dfs.name.dir</name>
    <value>/root/hadoopstorage/name</value>
    <final>true</final>
</property>
<property>
    <name>dfs.replication</name>
    <value>1</value>
</property>
<property>
    <name>dfs.webhdfs.enabled</name>
    <value>true</value>
</property>
<property>
    <name>dfs.nameservices</name>
    <value>ha-cluster</value>
</property>
<property>
    <name>dfs.ha.namenodes.ha-cluster</name>
    <value>NameNode,Standby</value>
</property>
<property>
    <name>dfs.namenode.rpc-address.ha-cluster.NameNode</name>
    <value>103.41.177.161:9000</value>
</property>
<property>
    <name>dfs.namenode.rpc-address.ha-cluster.Standby</name>
    <value>103.41.177.162:9000</value>
</property>
<property>
    <name>dfs.namenode.http-address.ha-cluster.NameNode</name>
    <value>103.41.177.161:50070</value>
</property>
<property>
    <name>dfs.namenode.http-address.ha-cluster.Standby</name>
    <value>103.41.177.162:50070</value>
</property>
<property>
    <name>dfs.namenode.shared.edits.dir</name>
    value>qjournal://103.41.177.161:8485;103.41.177.162:8485;103.41.177.160:8485/ha-cluster</value>
</property>
<property>
    <name>dfs.client.failover.proxy.provider.ha-cluster</name>
    <value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
</property>
<property>
    <name>dfs.ha.fencing.methods</name>
    <value>sshfence</value>
</property>
<property>
    <name>dfs.ha.fencing.ssh.private-key-files</name>
    <value>/root/.ssh/id_rsa</value>
</property>
<property>
    <name>dfs.ha.fencing.ssh.connect-timeout</name>
    <value>3000</value>
</property>
</configuration>

1 个答案:

答案 0 :(得分:0)

您没有提及有关自动故障转移(ZKFC和动物园管理员)的任何信息。没有它,hdfs将不会自动进行故障转移。

您可以尝试以下操作:通过检查namenodes控制台(或使用来自{{的{em> getServiceState 命令),确保两个名称节点都处于 standby 状态3}})。如果是这样,请同时使用 -transitionToActive 命令和 tail 名称节点日志手动触发转换。如果转换失败,请使用namenode日志更新您的帖子。