导航菜单
路很长,又很短
博主信息
昵   称:Cocodroid ->关于我
Q     Q:2531075716
博文数:346
阅读量:1582688
访问量:191622
至今:
×
云标签 标签球>>
云标签 - Su的技术博客
博文->>首页 博主的更多博文>>
Eclipse连接hadoop时Retrying connect to server: localhost/127.0.0.1:8020. Already tried 1 time(s)
Tags : Eclipse,hadoop发表时间: 2017-09-17 05:06:48
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。
比如: 转自:Su的技术博客  原文地址:

Retrying connect to server: localhost/127.0.0.1:8020. Already tried 1 time(s)

14/11/30 18:28:22 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=

14/11/30 18:28:22 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.

14/11/30 18:28:22 WARN mapred.JobClient: No job jar file set.  User classes may not be found. See JobConf(Class) or JobConf#setJar(String).

14/11/30 18:28:23 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 0 time(s).

14/11/30 18:28:24 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 1 time(s).

14/11/30 18:28:25 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 2 time(s).

14/11/30 18:28:26 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 3 time(s).

14/11/30 18:28:27 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 4 time(s).

14/11/30 18:28:28 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 5 time(s).

14/11/30 18:28:29 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 6 time(s).

14/11/30 18:28:30 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 7 time(s).

14/11/30 18:28:31 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 8 time(s).

14/11/30 18:28:32 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 9 time(s).

Exception in thread "main" java.net.ConnectException: Call to localhost/127.0.0.1:8020 failed on connection exception: java.net.ConnectException: 拒绝连接

at org.apache.hadoop.ipc.Client.wrapException(Client.java:767)

at org.apache.hadoop.ipc.Client.call(Client.java:743)

at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:220)

at com.sun.proxy.$Proxy0.getProtocolVersion(Unknown Source)

at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:359)

at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:106)

at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:207)

at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:170)

at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:82)

at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1378)

at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:66)

at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1390)

at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:196)

at org.apache.hadoop.fs.Path.getFileSystem(Path.java:175)

at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:122)

at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:770)

at org.apache.hadoop.mapreduce.Job.submit(Job.java:432)

at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:447)

at com.verysu.hadoop.HelloDriver.main(HelloDriver.java:39)

Caused by: java.net.ConnectException: 拒绝连接

at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)

at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)

at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:404)

at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:304)

at org.apache.hadoop.ipc.Client$Connection.access$1700(Client.java:176)

at org.apache.hadoop.ipc.Client.getConnection(Client.java:860)

at org.apache.hadoop.ipc.Client.call(Client.java:720)

... 17 more


出现这样的问题:

网上有的人就说是namenode没有启动起来,但是我却不是。

我觉得我这可能:

namenode进程没有启动起来。可以使用Java提供的jps来验证是否已经启动;

②这是我的问题,在使用Eclipse连接hadoop时没有指定端口9000,这也说明他默认的端口是8020,即这个连接不上是理所当然的。

有点的人是加上9000端口也出现上面的问题,只不过把8020端口换为9000端口,我觉得可以用第①方法试试,也许可以解决。

如果你遇到了其他可能的原因,希望你告知一下。一起学习!!

 

 

打赏
打赏
关注公众号
公众号
类别:大数据| 阅读(3674)| 赞 (1)
上一篇 : druid出现InstanceNotFoundExcep
下一篇: 升级需谨慎,开发两行泪!——记一次MySQL驱动包升级引
评论
暂无评论!
发表评论
昵  称:

验证码:

内  容:

    同时赞一个 赞