一、域名解析问题

域名解析暂时失败问题
  vim /etc/sysconfig/network
  查看主机名
  vim etc/hosts
配置IP地址与主机名 192.168.60.132 centos  #改正就OK啦

二、启动问题

Starting namenodes on [localhost]
ERROR: Attempting to operate on hdfs namenode as root
ERROR: but there is no HDFS_NAMENODE_USER defined. Aborting operation.
Starting datanodes
ERROR: Attempting to operate on hdfs datanode as root
ERROR: but there is no HDFS_DATANODE_USER defined. Aborting operation.
Starting secondary namenodes [bogon]
ERROR: Attempting to operate on hdfs secondarynamenode as root
ERROR: but there is no HDFS_SECONDARYNAMENODE_USER defined. Aborting operation.
处理1

$ vim sbin/start-dfs.sh
$ vim sbin/stop-dfs.sh
两处增加以下内容
HDFS_DATANODE_USER=root
HDFS_DATANODE_SECURE_USER=hdfs
HDFS_NAMENODE_USER=root
HDFS_SECONDARYNAMENODE_USER=root
处理2
$ vim sbin/start-yarn.sh
$ vim sbin/stop-yarn.sh
两处增加以下内容
YARN_RESOURCEMANAGER_USER=root
HADOOP_SECURE_DN_USER=yarn
YARN_NODEMANAGER_USER=root

三、端口问题

    localhost: ssh: connect to host localhost port 22: Cannot assign requested address
cd /etc/ssh
vim sshd_config
添加 Port 22

四、Failed to get D-Bus connection: Operation not permitted

解决方法:docker run --privileged -ti -e "container=docker" -v /sys/fs/cgroup:/sys/fs/cgroup hadoop-master /usr/sbin/init

五、服务报错

sshd re-exec requires execution with an absolute path
在开启SSHD服务时报错.
sshd re-exec requires execution with an absolute path
用绝对路径启动,也报错如下:
Could not load host key: /etc/ssh/ssh_host_key
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Disabling protocol version 1. Could not load host key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available — exiting

解决过程:

#ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
#ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
#/usr/sbin/sshd

执行后报错:

Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key

解决过程:

#ssh-keygen -t dsa -f /etc/ssh/ssh_host_ecdsa_key
#ssh-keygen -t rsa -f /etc/ssh/ssh_host_ed25519_key
#/usr/sbin/sshd

六、报错如下

    WARNING: HADOOP_SECURE_DN_USER has been replaced by HDFS_DATANODE_SECURE_USER. Using value of HADOOP_SECURE_DN_USER.
Starting namenodes on [master]
master: /usr/hadoop/hadoop-3.2.0/libexec/hadoop-functions.sh: line 982: ssh: command not found
Starting datanodes
Last login: Mon Jan 28 08:32:32 UTC 2019 on pts/0
localhost: /usr/hadoop/hadoop-3.2.0/libexec/hadoop-functions.sh: line 982: ssh: command not found
Starting secondary namenodes [b982e2adc393]
Last login: Mon Jan 28 08:32:33 UTC 2019 on pts/0
b982e2adc393: /usr/hadoop/hadoop-3.2.0/libexec/hadoop-functions.sh: line 982: ssh: command not found
Starting resourcemanager
Last login: Mon Jan 28 08:32:35 UTC 2019 on pts/0
Starting nodemanagers
Last login: Mon Jan 28 08:32:42 UTC 2019 on pts/0
localhost: /usr/hadoop/hadoop-3.2.0/libexec/hadoop-functions.sh: line 982: ssh: command not foun
解决:

$ vim sbin/start-dfs.sh
$ vim sbin/stop-dfs.sh
将HADOOP_SECURE_DN_USER=hdfs替换为HADOOP_DATANODE_SECURE_DN_USER=hdfs
centos默认安装有ssh服务,没有客户端。
查看ssh安装
# rpm -qa | grep openssh
openssh-5.3p1-123.el6_9.x86_64
openssh-server-5.3p1-123.el6_9.x86_64
没有安装openssh-clients
yum安装ssh客户端
yum -y install openssh-clients

七、docker: Error response from daemon: cgroups: cannot find cgroup mount destination: unknown.

没有找到具体的解决方法,重启后可以访问。

八、permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)

vim /etc/ssh/sshd_config

# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $

        # This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information. # This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin # The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value. #Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress :: # Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit
# activation of protocol 1
Protocol 2 # HostKey for protocol version 1

-----------
就是改一下信息
RSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication no

改完后一定要重启ssh服务 service sshd restart
systemctl restart sshd.service

九、WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

系统预装的glibc库是2.12版本,而hadoop期望是2.14版本,所以打印警告信息。
现在有两个办法,重新编译glibc.2.14版本,安装后专门给hadoop使用,这个有点危险。
第二个办法直接在log4j日志中去除告警信息。在//usr/local/hadoop-2.5.2/etc/hadoop/log4j.properties文件中添加
log4j.logger.org.apache.hadoop.util.NativeCodeLoader=ERROR

十、MapReduce操作出现错误: 找不到或无法加载主类org.apache.hadoop.mapreduce.v2.app.MRAppMaster 问题解决方法

在命令行下输入 Hadoop classpath
编辑yarn-site.xml
添加一下内容

<configuration>
<property>
<name>yarn.application.classpath</name>
<value>输入刚才返回的Hadoop classpath路径</value>
</property>
</configuration>

 

最新文章

  1. 在知乎上看到 Web Socket这篇文章讲得确实挺好,从头看到尾都非常形象生动,一口气看完,没有半点模糊,非常不错
  2. Dom4j把xml转换成Map(非固定格式)
  3. Apple Reject
  4. sql server 导出表结构
  5. JVM性能监控与故障处理命令行工具
  6. xib中的view对iPhone和iPad自适应
  7. 项“XXXXX.sln”已在选择的位置受源代码管理
  8. 【笨嘴拙舌WINDOWS】实践检验之按键精灵【Delphi】
  9. poj 2635 The Embarrassed Cryptographer(数论)
  10. 解决自定义BackItem与Pop Gesture冲突的问题
  11. Android(java)学习笔记200:Android中View动画之 XML实现 和 代码实现
  12. java.lang.OutOfMemoryError: GC overhead limit exceeded 问题分析和解决(转)
  13. vc2010下使用64位控件
  14. JSplitPane demo
  15. Java web项目综合练习(Estore)
  16. 【干货】平安打卡神器E行销刷脸考勤破解,是怎么做到的?
  17. Sql Server数据库之事务,视图,索引
  18. python线程之condition
  19. javascript 类型比较方法
  20. duilib进阶教程 -- TreeView控件的bug (9)

热门文章

  1. 为什么Python中sort方法和sorted函数调用废弃使用cmp参数
  2. PyQt(Python+Qt)学习随笔:QTableWidgetItem项的复选状态checkState访问方法
  3. SQL Server常用函数及命令
  4. Libp2p 简介
  5. day105:Mofang:设置页面初始化&amp;更新头像/上传头像&amp;设置页面显示用户基本信息
  6. springboot 导出xlsx文件
  7. Dell R740 使用U盘安装 CentOS7.4 出现Warning:dracut-initqueue timeout - starting timeout scripts解决办法
  8. 【Codeforces 1037H】Security(SAM &amp; 线段树合并)
  9. 五、Zookeeper基于API操作Node节点
  10. linux修改文件所属的用户组以及用户