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. windows下同时装了Python3和Python2,如何区分使用?

    1.前言 想学习Python3,但是暂时又离不开Python2.在Windows上如何让它们共存呢? 目前国内网站经常会让大家把其中一个python.exe改个名字,这样区分开两个可执行文件的名字,但 ...

  2. python接口测试-数据驱动-DDT

    DDT是python的第三方库,全名称为:Data-Driven/Decorated Tests. ddt安装 通过pip安装ddt模块,安装Python后,Python自带pip功能包 切换到Pyt ...

  3. python经典面试算法题1.2:如何从无序链表中移除重复项

    本题目摘自<Python程序员面试算法宝典>,我会每天做一道这本书上的题目,并分享出来,统一放在我博客内,收集在一个分类中. 1.2 如何实现链表的逆序 [蚂蚁金服面试题] 难度系数:⭐⭐ ...

  4. java数组、字符串拼接

    1. 数组实现拼接 int[] arr ={11,22,33,44,55,66}; System.out.print("["); for (int i = 0; i <arr ...

  5. 项目——基于httpd镜像演示Dockerfile所有的指令

    基于httpd镜像演示Dockerfile所有的指令: 第一步:创建Dockerfile工作目录 [root@localhost harbor]# mkdir /test [root@localhos ...

  6. K8S入门系列之集群yum安装(一)

    kubernetes master 节点包含的组件: 1.kube-apiserver :集群核心,集群API接口.集群各个组件通信的中枢:集群安全控制: 2.kube-scheduler: 集群调度 ...

  7. C#winfrom将XML数据保存读取删除

    //创建一个数据集,将其写入xml文件 string name = "1.xml"; System.Data.DataSet ds = new System.Data.DataSe ...

  8. Redis 工具 redis-port 使用

    redis-port 是一个 Redis 工具,通过解析 rdb 文件,实现 Redis 主节点和从节点的数据同步.   摘要: 一个可以将redis主从集群,cluster上的数据实时迁移到 cod ...

  9. poj 3461 Oulipo(KMP)

    Oulipo Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 49378   Accepted: 19617 Descript ...

  10. cocos creator 3D | 拇指射箭

    拇指射箭!你能射中靶心么? 效果预览 配置环境: cocos creator 3d v1.0.0 玩法介绍: 长按屏幕,拖动瞄准,放手发射.风向.重力和距离影响最终结果!越靠近中心得分越高!最高分10 ...