org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:7359. Already tried 7

来源:互联网 发布:手绘图片是什么软件 编辑:程序博客网 时间:2024/06/05 03:48

错误 :

org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:7359. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep



2016-11-25 10:25:24,934 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptImpl: appattempt_1479988153262_0002_000001 State change from SCHEDULED to ALLOCATED_SAVING

2016-11-25 10:25:24,934 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptImpl: appattempt_1479988153262_0002_000001 State change from ALLOCATED_SAVING to ALLOCATED

2016-11-25 10:25:24,935 INFO org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher: Launching masterappattempt_1479988153262_0002_000001

2016-11-25 10:25:24,937 INFO org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher: Setting up container Container: [ContainerId: container_1479988153262_0002_01_000001, NodeId: localhost:7359, NodeHttpAddress: localhost:8042, Resource: <memory:2048, vCores:1>, Priority: 0, Token: Token { kind: ContainerToken, service: 127.0.0.1:7359 }, ] for AM appattempt_1479988153262_0002_000001

2016-11-25 10:25:24,938 INFO org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher: Command to launch container container_1479988153262_0002_01_000001 : $JAVA_HOME/bin/java -Djava.io.tmpdir=$PWD/tmp -Dlog4j.configuration=container-log4j.properties -Dyarn.app.container.log.dir=<LOG_DIR> -Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA -Dhadoop.root.logfile=syslog  -Xmx1024m org.apache.hadoop.mapreduce.v2.app.MRAppMaster 1><LOG_DIR>/stdout 2><LOG_DIR>/stderr

2016-11-25 10:25:24,938 INFO org.apache.hadoop.yarn.server.resourcemanager.security.AMRMTokenSecretManager: Create AMRMToken for ApplicationAttempt: appattempt_1479988153262_0002_000001

2016-11-25 10:25:24,938 INFO org.apache.hadoop.yarn.server.resourcemanager.security.AMRMTokenSecretManager: Creating password for appattempt_1479988153262_0002_000001

2016-11-25 10:25:25,939 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:7359. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

2016-11-25 10:25:26,940 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:7359. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

2016-11-25 10:25:27,940 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:7359. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

2016-11-25 10:25:28,941 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:7359. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

2016-11-25 10:25:29,942 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:7359. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

重复......

2016-11-25 10:31:33,264 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:7359. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

2016-11-25 10:31:34,125 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:7359. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

2016-11-25 10:31:34,264 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:7359. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

2016-11-25 10:31:35,126 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/127.0.0.1:7359. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

2016-11-25 10:31:35,128 INFO org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher: Error launching appattempt_1479988153262_0002_000001. Got exception: java.net.ConnectException: Call From vm10-0-0-2.ksc.com/127.0.0.1 to localhost:7359 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused        

at sun.reflect.GeneratedConstructorAccessor39.newInstance(Unknown Source)        

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)        

at java.lang.reflect.Constructor.newInstance(Constructor.java:526)        at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:792)       

 at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:732)        at org.apache.hadoop.ipc.Client.call(Client.java:1479)        

at org.apache.hadoop.ipc.Client.call(Client.java:1412)        at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:229)        

at com.sun.proxy.$Proxy81.startContainers(Unknown Source)        

at org.apache.hadoop.yarn.api.impl.pb.client.ContainerManagementProtocolPBClientImpl.startContainers(ContainerManagementProtocolPBClientImpl.java:96) 

 at org.apache.hadoop.yarn.api.impl.pb.client.ContainerManagementProtocolPBClientImpl.startContainers(ContainerManagementProtocolPBClientImpl.java:96)        

at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)        

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        

at java.lang.reflect.Method.invoke(Method.java:606)       

 at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:191)       

 at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)        

at com.sun.proxy.$Proxy82.startContainers(Unknown Source)       

 at org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.launch(AMLauncher.java:118)        

at org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.run(AMLauncher.java:250)        

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)       

 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)        

at java.lang.Thread.run(Thread.java:745)Caused by: java.net.ConnectException: Connection refused       

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

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

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

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

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

 at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:614)
       

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

  at org.apache.hadoop.ipc.Client$Connection.access$2900(Client.java:375)
      

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

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

    ... 15 more



运行 job 时 发送卡顿,  到  




  时就不动了。 然后查看 yarn-hadoop-resourcemanager-vm10-0-0-0.ksc.com.log 日志,发现上面的问题。

1  修改类配置文件 ,一直不好,甚至重新配置 删除了hadoop 有重新配置了一次也没有好。

网上资料说是: 配置   有关于yarn的  有可能是资源分配不对 , 还有的hadoop/tmp/dir  路径不要配置在  /tmp  的临时文件路径下 ,我的都不是。

2 修改 etc/hosts   和 etc/hostname 文件 

     hostname 文件影响不大, 看情况配置。

     hosts 文件 ,因为我配置的是伪分布式集群,所以  第一行 127.0.01  localhost  是必须有的, 但是真正集群的时候,网上的有的说不需要 。个人可以试试。

    

解决   ,都试过后 看见一个贴子 

http://anyoneking.com/archives/603     hadoop数据节点通信异常


了解到 这个是 连接不到 namenode 节点 , 之前本人也通过判断是这个原因 。

补充一点 :之前只是在运行 job 时 爆出 连接不到的问题 ,其他正常启动 。

最后 看到他在 修改掉近期的 别人修改的hosts 文件(添加 127.0.0.1 localhost 时) ,去除掉 ,没有好, 但是重启后就可以了。

本人也重启了一下 ,然后奇迹般的好了。 这个可能是哪里缓存了一些数据影响到了 环境的配置与修改 。


这里mark一下 。


0 0
原创粉丝点击