版权声明:转载请注明出处。 https://blog.csdn.net/Xin_101/article/details/85530074
1 ssh连接失败
1.0 连接测试
ssh localhost
1.2 问题
ssh: connect to host localhost port 22: Connection refused
1.3 原因
未安装ssh-server.
测试:
# 命令
ps -e | grep ssh
# 结果
1153 ? 00:00:07 ssh-agent
1.4 解决
安装ssh-server
sudo apt-get install openssh-server
1.5 测试效果
# 命令
ps -e | grep ssh
# 结果
764 ? 00:00:00 sshd
1153 ? 00:00:07 ssh-agent
1.6 连接
# 命令
ssh localhost
# 结果
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
2 启动hdfs失败
2.1 启动
./sbin/start-dfs.sh
2.2 报错
Starting namenodes on [localhost]
Starting datanodes
Starting secondary namenodes [xhwl]
2019-01-01 12:21:04,362 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2.3 解决
在hadoop-3.0.2/etc/hadoop/log4j.properties文件中添加
log4j.logger.org.apache.hadoop.util.NativeCodeLoader=ERROR
3 hdfs50070端口无法访问
3.1 原因
- Hadoop3.x版本hdfs端口为9870;
- Hadoop2.x版本hdfs端口为50070;
3.2 解决
对应Hadoop版本,启动后访问对应接口;
[参考文献]
[1]https://www.linuxidc.com/Linux/2015-01/112045.htm
[2]https://blog.csdn.net/qq_36219266/article/details/81232315