1

ambari 1.7我已经使用我面临一个奇怪的问题设置了 hadoop 集群。数据节点第一次启动但在几分之一秒内自动死亡。当我尝试重新启动 datanode 它没有启动。请帮我解决这个问题。
重启datanode的日志如下

2015-01-26 17:58:02,233 - Error while executing command 'start':
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 123, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HDFS/package/scripts/datanode.py", line 37, in start
    datanode(action="start")
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_datanode.py", line 55, in datanode
    create_log_dir=True
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HDFS/package/scripts/utils.py", line 102, in service
    not_if=service_is_up
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 148, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 149, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 115, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 241, in action_run
    raise ex
Fail: Execution of 'ulimit -c unlimited;  su -s /bin/bash - hdfs -c 'export HADOOP_LIBEXEC_DIR=/usr/hdp/current/hadoop-client/libexec && /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start datanode'' returned 1. stdin: is not a tty
starting datanode, logging to /var/log/hadoop/hdfs/hadoop-hdfs-datanode-node1.out

重启我的hadoop集群后我有一个类似的问题。这是我来自 /var/log/hadoop/hdfs/hadoop-hdfs-datanode-master.hadoopcluster.out 的日志文件

ulimit -a for user hdfs
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 62510
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 128000
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 65536
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
4

1 回答 1

0

这是我解决问题的方法(这不是一个完美的解决方案,但我把它放在这里供大家参考)。

经过几次尝试和谷歌搜索,我发布它可能是由于名称节点和数据节点之间的不一致造成的。

所以我从每个数据节点中删除了整个 HDFS 目录。您的数据节点目录的位置可以从hdfs-site.xml.

之后,我通过命令格式化namenodehadoop namenode -format

到那时,我能够启动数据节点但无法启动名称节点。

最后,我从我的主机中删除了名称节点目录并重新启动整个集群。

现在它工作正常,但我不可避免地丢失了旧 HDFS 中的原始数据。

于 2016-08-12T06:44:47.733 回答