报错 could only be replicated to 0 nodes instead of minReplication (=1). There are 0 datanode(s)

Caused by: org.apache.hadoop.ipc.RemoteException: File /tmp/linkis/root/bml/20230809/68d17478-8b31-44f7-984f-430a02fd39fe_v000018 could only be replicated to 0 nodes instead of minReplication (=1).  There are 0 datanode(s) running and no node(s) are excluded in this operation.

解决方案: 除了检查防火墙状态 iptables -L -n 以外, 检查 DataNode 是不是真的没有起来

我的情况就是datanode没有启来

检查报错

2023-08-25 10:56:24,449 WARN org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl: Removing failed volume /home/hadoop/dfs/data/current: 
org.apache.hadoop.util.DiskChecker$DiskErrorException: Directory is not writable: /home/hadoop/dfs/data/current/BP-1073838461-172.16.20.24-1691128065381/current/finalized/subdir0/subdir1

由于启动hadoop, 有时使用root用户启动了, 再换成hadoop启动就失败了, 要固定hadoop用户启动

将有问题的目录重置为hadoop用户:组 即可

cd /home/hadoop/dfs

sudo chown -R hadoop:hadoop ./*

你可能感兴趣的:(hadoop,各种问题,hadoop,linkis)