配置Hadoop中的HDFS 问题:java.net.BindException: Problem binding to [bi java.net.BindException: Cannot assi

2017-07-29 15:16:21,778 FATAL org.apache.hadoop.hdfs.server.namenode.NameNode: Exception in namenode join
java.net.BindException: Problem binding to [bigdata-trianing01.com:8020] java.net.BindException: Cannot assign requested address; For more details see:  htption
at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.
at org.apache.hadoop.ipc.Server.bind(Server.
at org.apache.hadoop.ipc.Server$Listener.(Server.
at org.apache.hadoop.ipc.Server.(Server.
at org.apache.hadoop.ipc.RPC$Server.(RPC.
at org.apache.hadoop.ipc.ProtobufRpcEngine$Server.(ProtobufRpcEngine.
at org.apache.hadoop.ipc.ProtobufRpcEngine.getServer(ProtobufRpcEngine.
at org.apache.hadoop.ipc.RPC$Builder.build(RPC.
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.(NameNodeRpcServer.
at org.apache.hadoop.hdfs.server.namenode.NameNode.createRpcServer(NameNode.
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.
at org.apache.hadoop.hdfs.server.namenode.NameNode.(NameNode.
at org.apache.hadoop.hdfs.server.namenode.NameNode.(NameNode.
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.
2017-07-29 15:16:21,784 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 1
2017-07-29 15:16:21,791 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: SHUTDOWN_MSG: 
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at bigdata-trianing01.com/220.250.64.225


这种问题 :端口占用
解决方式
一 首先确认自己的几个配置文件正确了 如  slaves     core   等等
防火墙,selinux需要关闭
用 sudo  netstat -atunlp  查看下端口  ,如果占用 直接 kill   就可以了

lz我出现了这个问题  端口却并没有占用
查看了 datanode的日志,发现 是ip地址没解析出来  如下
2017-07-29 15:16:24,037 INFO org.apache.hadoop.ipc.Server: IPC Server Responder: starting
2017-07-29 15:16:24,041 INFO org.apache.hadoop.ipc.Server: IPC Server listener on 50020: starting
2017-07-29 15:16:44,284 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 0 time(s);
2017-07-29 15:17:04,312 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 1 time(s);
2017-07-29 15:17:24,323 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 2 time(s);
2017-07-29 15:17:44,348 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 3 time(s);
2017-07-29 15:18:04,381 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 4 time(s);
2017-07-29 15:18:24,412 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 5 time(s);
2017-07-29 15:18:44,438 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 6 time(s);
2017-07-29 15:19:04,468 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 7 time(s);
2017-07-29 15:19:24,476 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 8 time(s);
2017-07-29 15:19:44,517 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 9 time(s);
2017-07-29 15:20:04,543 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 10 time(s)
2017-07-29 15:20:24,585 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 11 time(s)
2017-07-29 15:20:44,607 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 12 time(s)
2017-07-29 15:21:04,624 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 13 time(s)
2017-07-29 15:21:24,650 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 14 time(s)
2017-07-29 15:21:44,689 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 15 time(s)
2017-07-29 15:22:04,699 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 16 time(s)
2017-07-29 15:22:24,733 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:8020. Already tried 17 time(s)
2017-07-29 15:22:44,744 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: bigdata-trianing01.com/220.250.64.225:

根据ip地址解析 没解析出来
所以 需要在 core-site.xml配置文件  中  把主机名改为ip地址 
保存下 启动服务就可以 
jps查看

还有注意下:
不能能用root权限登录来进行hadoop相关的操作
否则也会出错
如果用root权限登录 了 
好了 你可以gg了  卸载重新搭建了 ,
哎 ,昨天我也是这样的。搞得我连远程工具都慎用,
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值