请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

程序运行时java.net.ConnectException: Connection refused;

cause:java.net.ConnectException: Call From Kirito.local/10.37.129.2 to 192.168.0.233:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
Exception in thread “main” java.net.ConnectException: Call From Kirito.local/10.37.129.2 to 192.168.0.233:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:791)
at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:731)
at org.apache.hadoop.ipc.Client.call(Client.java:1508)
at org.apache.hadoop.ipc.Client.call(Client.java:1441)
at org.apache.hadoop.ipc.ProtobufRpcEngineInvoker.invoke(ProtobufRpcEngine.java:230)atcom.sun.proxy.Invoker.invoke(ProtobufRpcEngine.java:230) at com.sun.proxy.Invoker.invoke(ProtobufRpcEngine.java:230)atcom.sun.proxy.Proxy10.getFileInfo(Unknown Source)
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:788)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:258)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:104)
at com.sun.proxy.$Proxy11.getFileInfo(Unknown Source)
at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:2168)
at org.apache.hadoop.hdfs.DistributedFileSystem$20.doCall(DistributedFileSystem.java:1266)
at org.apache.hadoop.hdfs.DistributedFileSystem$20.doCall(DistributedFileSystem.java:1262)
at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1262)
at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1418)
at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:145)
at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:270)
at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:143)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1307)
at org.apache.hadoop.mapreduce.Job10.run(Job.java:1304)atjava.security.AccessController.doPrivileged(NativeMethod)atjavax.security.auth.Subject.doAs(Subject.java:422)atorg.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1924)atorg.apache.hadoop.mapreduce.Job.submit(Job.java:1304)atorg.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1325)atcom.yww.bigdata.mapreduce.GroupBy.main(GroupBy.java:42)Causedby:java.net.ConnectException:Connectionrefusedatsun.nio.ch.SocketChannelImpl.checkConnect(NativeMethod)atsun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)atorg.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)atorg.apache.hadoop.net.NetUtils.connect(NetUtils.java:530)atorg.apache.hadoop.net.NetUtils.connect(NetUtils.java:494)atorg.apache.hadoop.ipc.Client10.run(Job.java:1304) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1924) at org.apache.hadoop.mapreduce.Job.submit(Job.java:1304) at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1325) at com.yww.bigdata.mapreduce.GroupBy.main(GroupBy.java:42) Caused by: java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206) at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:530) at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:494) at org.apache.hadoop.ipc.Client10.run(Job.java:1304)atjava.security.AccessController.doPrivileged(NativeMethod)atjavax.security.auth.Subject.doAs(Subject.java:422)atorg.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1924)atorg.apache.hadoop.mapreduce.Job.submit(Job.java:1304)atorg.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1325)atcom.yww.bigdata.mapreduce.GroupBy.main(GroupBy.java:42)Causedby:java.net.ConnectException:Connectionrefusedatsun.nio.ch.SocketChannelImpl.checkConnect(NativeMethod)atsun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)atorg.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)atorg.apache.hadoop.net.NetUtils.connect(NetUtils.java:530)atorg.apache.hadoop.net.NetUtils.connect(NetUtils.java:494)atorg.apache.hadoop.ipc.ClientConnection.setupConnection(Client.java:648)
at org.apache.hadoop.ipc.ClientConnection.setupIOstreams(Client.java:744)atorg.apache.hadoop.ipc.ClientConnection.setupIOstreams(Client.java:744) at org.apache.hadoop.ipc.ClientConnection.setupIOstreams(Client.java:744)atorg.apache.hadoop.ipc.ClientConnection.access$3000(Client.java:396)
at org.apache.hadoop.ipc.Client.getConnection(Client.java:1557)
at org.apache.hadoop.ipc.Client.call(Client.java:1480)
… 28 more

** 百度了很久,一直没搞定。。。**

正在回答 回答被采纳积分+3

1回答

Michael_PK 2019-03-24 20:49:03

HDFS正常吗?看到连不上8020,就应该要想到HDFS

0 回复 有任何疑惑可以回复我~
  • 提问者 KiritoH #1
    hdfs正常
    回复 有任何疑惑可以回复我~ 2019-03-31 15:39:07
  • Michael_PK 回复 提问者 KiritoH #2
    肯定不正常,正常不可能报错连不上8020端口的
    回复 有任何疑惑可以回复我~ 2019-03-31 21:03:43
  • weixin_慕的地9165759 回复 提问者 KiritoH #3
    问题如何解决的?我也遇到同样的问题
    回复 有任何疑惑可以回复我~ 2020-05-20 13:01:30
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信