zoukankan      html  css  js  c++  java
  • hadoop 集群启动时 Address already in use 解决方法

        搭建好hadoop集群之后,运行start-all.sh脚本,发现有如下报错

    starting namenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-namenode-we-home-server.out
    homeserver: starting datanode, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-datanode-homeserver.out
    we-home-server: starting secondarynamenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-secondarynamenode-we-home-server.out
    we-home-server: Exception in thread "main" java.net.BindException: Address already in use
    we-home-server:         at sun.nio.ch.Net.bind(Native Method)
    we-home-server:         at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:124)
    we-home-server:         at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
    we-home-server:         at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
    we-home-server:         at org.apache.hadoop.http.HttpServer.start(HttpServer.java:581)
    we-home-server:         at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode$1.run(SecondaryNameNode.java:216)
    we-home-server:         at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode$1.run(SecondaryNameNode.java:190)
    we-home-server:         at java.security.AccessController.doPrivileged(Native Method)
    we-home-server:         at javax.security.auth.Subject.doAs(Subject.java:396)
    starting jobtracker, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-jobtracker-we-home-server.out

    log中说明错误 Address already in use,这是因为有上次的运行datanode的进程没有终止,解决方法,

    netstat -antup

    运行这个命令后,找出占用50030端口的那个进程的PID,然后将其终止

    kill -9 <PID>

    然后,再重新启动hadoop集群,没有报错。

    hadoop@we-home-server:/usr/local/hadoop/bin$ ./start-all.sh
    starting namenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-namenode-we-home-server.out
    homeserver: starting datanode, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-datanode-homeserver.out
    we-home-server: starting secondarynamenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-secondarynamenode-we-home-server.out
    starting jobtracker, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-jobtracker-we-home-server.out
    homeserver: starting tasktracker, logging to /usr/local/hadoop/libexec/../logs/hadoop-hadoop-tasktracker-homeserver.out
    hadoop@we-home-server:/usr/local/hadoop/bin$
  • 相关阅读:
    搭建你的Spring.Net+Nhibernate+Asp.Net Mvc 框架 (五)测试你的成果
    初识Asp.Net MVC2.0
    搭建你的Spring.Net+Nhibernate+Asp.Net Mvc 框架 (四)配置全攻略
    Asp.Net MVC2.0 Url 路由入门
    逝去的2010,期待平静的2011【续】
    搭建你的Spring.Net+Nhibernate+Asp.Net Mvc 框架 (六)写在后面的话
    初识Asp.Net MVC2.0【续】
    Nhibernate入门与demo
    Entity Framework快速入门CodeOnly POCO
    用友面试经历 续【最终遭拒】
  • 原文地址:https://www.cnblogs.com/lxs0731/p/2964913.html
Copyright © 2011-2022 走看看