Namenode没有开始使用CentOS 7

时间:2016-03-29 21:59:33

标签: hadoop hortonworks-data-platform ambari

我使用Hortonworks数据平台安装了Hadoop。我有三台运行CentOS 7的计算机。这三台计算机中的一台正在运行amabari-server和ambari-client实例。另外两个只运行amabari-client。

所有安装过程一直运行到NameNode Start任务,这会引发错误。 NameNode正在amabari-server的同一台机器上运行。

这是错误日志

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py", line 401, in <module>
    NameNode().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py", line 102, in start
    namenode(action="start", hdfs_binary=hdfs_binary, upgrade_type=upgrade_type, env=env)
  File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk
    return fn(*args, **kwargs)
  File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py", line 146, in namenode
    create_log_dir=True
  File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py", line 267, in service
    Execute(daemon_cmd, not_if=process_id_exists_command, environment=hadoop_env_exports)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 158, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 121, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 238, in action_run
    tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call
    tries=tries, try_sleep=try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _call
    raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of 'ambari-sudo.sh su hdfs -l -s /bin/bash -c 'ulimit -c unlimited ;  /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh --config /usr/hdp/current/hadoop-client/conf start namenode'' returned 1. starting namenode, logging to /var/log/hadoop/hdfs/hadoop-hdfs-namenode-hadoop.out

上面的日志说:

  

resource_management.core.exceptions.Fail:执行'ambari-sudo.sh su hdfs -l -s / bin / bash -c'ulimit -c unlimited;在/us / / / / / / / /的hadoop / HDFS / Hadoop的HDFS-名称节点-hadoop.out

但是当我打开hadoop-hdfs-namenode-hadoop.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) 30513
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) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 65536
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

我为用户hdfs设置了更大的软硬限制,但它没有用。我已经格式化了namenode,但它也没有用。所以我尝试重新安装服务器和客户端,它仍然无法正常工作。

感谢您的任何建议。

1 个答案:

答案 0 :(得分:0)

拔出一些头发之后,我已经找到了一个解决方法,但我还没有理解为什么。这似乎与DNS有关。当我将主机名添加到hosts文件时,它解决了问题,而不是依赖于当前主机的DNS。 e.g。

172.16.1.34 hostname.domain hostname

这很奇怪,因为DNS对主机起作用。我在代理人后面工作。