Docker 最近很火, 可以快速轻量级地虚拟出多个node,所以打算在Docker中跑Hadoop伪分布式应用。

其实要做出个简单的版本倒是不难,主要在 建立ssh无密码登录本机时,出现刚登录上去,立刻就退出来的问题。

解决办法如下:

sudo ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key (一直回车)
sudo ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key (一直回车)
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config_bak
sudo vim /etc/ssh/sshd_config(把PermitRootLogin改为yes,把UsePAM改为no)
sudo /etc/init.d/ssh restart

此时再执行

ssh localhost

发现问题解决。

接着执行

hdfs namenode -format
start-dfs.sh
start-yarn.sh

JPS后发现:

1393 DataNode
1314 NameNode
1811 Jps
1700 ResourceManager
1556 SecondaryNameNode
1781 NodeManager

运行Hadoop自带的WordCount例子,一切OK!

参考文献:

http://www.tuicool.com/articles/QBryi23

http://www.baidu.com/link?url=0B2TZo7hTSbK1p5b0yih-uCuN8sMcY60NibPffEEYj70aPju_Tz4j7FDKBzmrkUa

http://blog.csdn.net/ggz631047367/article/details/42426391

解决 Docker Hadoop ssh "Connection to * closed".问题的更多相关文章

  1. 解决 SSH Connection closed by foreign host 问题

    Xshell 报错 : 1.有可能是IP和别人冲突,改一下IP就好了 2.也有可能是文件权限的问题.改一下: cd /etc/ssh/ chmod ssh_host_* chmod *.pub 3.也 ...

  2. Cygwin-Cygwin ssh Connection closed by ::1 出错

    问题描写叙述: Cygwin好不easy安装好了ssh服务,第一连接没有问题,能够显示相关信息 $ ssh localhost Last login: Sat Jul 25 09:00:30 2015 ...

  3. Docker Hadoop 配置常见错误及解决办法

    Docker Hadoop 配置常见错误及解决办法 问题1:wordcount运行卡住,hadoop 任务运行到running job就卡住了 INFO mapreduce.Job: Running ...

  4. 解决root用户ssh配置无密码登陆/hadoop用户照仿可以实现相同功能:hadoop用户登录并且把命令的所有root换成home/hadoop

    http://inuyasha1027.blog.51cto.com/4003695/1132896/ 主机ip:192.168.163.100(hostname: node0) ssh无密码登陆的远 ...

  5. [WebException: The underlying connection was closed: The message length limit was exceeded.]解决方法

    [WebException: The underlying connection was closed: The message length limit was exceeded.]   Syste ...

  6. [Docker][Hadoop]基于Docker1.12.3 搭建Hadoop 2.7.2 集群以及简单分析

    一 Hadoop简介 Hadoop 2.7.2 Doc refer to http://hadoop.apache.org/docs/r2.7.2/ HDFS (The following is a ...

  7. Web Server 使用WebClient 发送https请求 The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel

    使用WebClient 发送https请求 使用WebClient发送请求时,并且是以https协议: WebClient webClient = new WebClient(); string re ...

  8. [bug]The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

    写在前面 在模拟请求的时候,如果url为https的,会报这个错误.大概错误就是:基础连接已关闭:无法建立信任关系的SSL / TLS的安全通道. The underlying connection ...

  9. windows xp .net framework 4.0 HttpWebRequest 报The underlying connection was closed,基础连接已关闭

    windows xp .net framework 4.0 HttpWebRequest 报The underlying connection was closed,基础连接已关闭,错误的解决方法 在 ...

随机推荐

  1. VIM编辑器的常用命令及使用!

    在热门Linux操作系统中都会默认安装一款超好用的文本编辑器——名字叫“vim”,vim是vi编辑器的升级版. Vim能够得到这么多厂商与用户的认可,原因就是在Vim编辑器中有三种模式——命令模式.末 ...

  2. 大数据之路day01_3--JAVA语言基础(1)

    从这里开始,正式进入正轨 1.关键字  2.main main是关键字吗? 不是,他只是一个标识符,只不过有点特殊,虚拟机可以识别. main(主函数)的作用 1:可以保证程序的独立运行 2:是程序的 ...

  3. Css3动画-@keyframes与animation

    一.@keyframe 定义和用法 @keyframes是用来创建帧动画的,我们通过这个属性可以用纯css来实现一些动画效果. 一般格式是: @keyframes 动画名称{ 0%{ 动画开始时的样式 ...

  4. C语言程序设计100例之(4):水仙花数

    例4    水仙花数 题目描述 一个三位整数(100-999),若各位数的立方和等于该数自身,则称其为“水仙花数”(如:153=13+53+33),找出所有的这种数. 输入格式 没有输入 输出格式 若 ...

  5. Linux 项目 shell 自动获取报告本机IP (1) | 通过shell 自动获取报告本机IP

    由于电脑设置静态IP经常出现链接不上网络,动态IP又非常不方便,故有了这个想法并实现 原理: Linux,包含PC机器,树莓派等,通过shell 自动获取报告本机IP  | 通过 Mutt+Msmtp ...

  6. Linux基础命令(二)

    6.cp copy 作用:复制文件 选项: -a 复制目录时使用并且可以保持属性不变,属性:属主,属组,权限 -r 复制目录时使用但是不可以保持属性不变 -p 保持属性不变 注意:其实只需要记一个-a ...

  7. 2、linux基础-面试题

    自己写的答案 1.1GB 2.4 3.ubuntu.dbian.Fedora 4.系统.硬件.clock -w 5.文件 6.uname -a 7.centos是redhat的社区版,redhat是商 ...

  8. 创建基于OData的Web API - Knowledge Builder API, Part II:Project Setup

    本篇为Part II:Project Setup 查看第一篇<Part I:  Business Scenario> 第一步,准备步骤. 准备步骤一,下载.NET Core 2.2 SDK ...

  9. Linux 搭建 WIKI

    转自:http://blog.csdn.net/chy800/article/details/6906090 由于公司需要一个知识共享的系统,选择wiki来实现.经过准备决定使用Linux+xampp ...

  10. objc里的伪指针TaggedPointer

    如果你看过我前面两篇objc函数枢纽msgSend和你印象中的NSString是这样吗,相信已经多次看过它的身影了,到底它是何物何作用,我今日就来揭开谜团.我之所为称呼它为伪指针,是因为它像幽灵一样, ...