我是hadoop的新手并试图在伪分布模式下配置hadoop,当我尝试通过以下命令启动守护进程时
仓/ start-all.sh
我收到以下消息
starting namenode, logging to /data/hadoop/hadoop-0.20.2/bin/../logs/hadoop-waqas-namenode-trinity.out
localhost: starting datanode, logging to /data/hadoop/hadoop-0.20.2/bin/../logs/hadoop-waqas-datanode-trinity.out
localhost: starting secondarynamenode, logging to /data/hadoop/hadoop-0.20.2/bin/../logs/hadoop-waqas-secondarynamenode-trinity.out
localhost: Exception in thread "main" java.lang.NumberFormatException: For input string: "localhost:9000"
localhost: at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
localhost: at java.lang.Integer.parseInt(Integer.java:492)
localhost: at java.lang.Integer.parseInt(Integer.java:527)
localhost: at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:146)
localhost: at org.apache.hadoop.hdfs.server.namenode.NameNode.getAddress(NameNode.java:156)
localhost: at org.apache.hadoop.hdfs.server.namenode.NameNode.getAddress(NameNode.java:160)
localhost: at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.initialize(SecondaryNameNode.java:131)
localhost: at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.<init>(SecondaryNameNode.java:115)
localhost: at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.main(SecondaryNameNode.java:469)
starting jobtracker, logging to /data/hadoop/hadoop-0.20.2/bin/../logs/hadoop-waqas-jobtracker-trinity.out
localhost: starting tasktracker, logging to /data/hadoop/hadoop-0.20.2/bin/../logs/hadoop-waqas-tasktracker-trinity.out
答案 0 :(得分:0)
检查dfs.namenode.secondary.http-address
中的hdfs-site.xml
媒体资源。设置为:localhost:50090
时,我遇到了同样的错误。除非存在端口冲突,否则可以将其保留为默认值0.0.0.0:50090
。