hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Shi <s...@gopivotal.com>
Subject Re: 答复: hdfsConnect always success
Date Fri, 25 Apr 2014 07:51:13 GMT
NoRouteToHost, please check your network setting

Regards,
*Stanley Shi,*



On Fri, Apr 18, 2014 at 3:42 PM, <tdhkx@126.com> wrote:

> Hi,
>
>
>
> No errors in hdfsConnect().
>
> But if I call hdfsCreateDirectory() after hdfsConnect() , got errors as
> followed:
>
>
>
> hdfsCreateDirectory(/tmp/root/00000629/): FileSystem#mkdirs error:
>
> java.net.NoRouteToHostException: No Route to Host from  Mas2/172.16.19.22to
> 172.16.19.121:8020 failed on socket timeout exception:
> java.net.NoRouteToHostException: No route to host; For more details see:
> http://wiki.apache.org/hadoop/NoRouteToHost
>
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
>
>         at
> org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:783)
>
>         at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:756)
>
>         at org.apache.hadoop.ipc.Client.call(Client.java:1351)
>
>         at org.apache.hadoop.ipc.Client.call(Client.java:1300)
>
>         at
> org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
>
>         at com.sun.proxy.$Proxy9.mkdirs(Unknown Source)
>
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>         at java.lang.reflect.Method.invoke(Method.java:601)
>
>         at
> org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)
>
>         at
> org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
>
>         at com.sun.proxy.$Proxy9.mkdirs(Unknown Source)
>
>         at
> org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.mkdirs(ClientNamenodeProtocolTranslatorPB.java:467)
>
>         at
> org.apache.hadoop.hdfs.DFSClient.primitiveMkdir(DFSClient.java:2394)
>
>         at org.apache.hadoop.hdfs.DFSClient.mkdirs(DFSClient.java:2365)
>
>         at
> org.apache.hadoop.hdfs.DistributedFileSystem$16.doCall(DistributedFileSystem.java:817)
>
>         at
> org.apache.hadoop.hdfs.DistributedFileSystem$16.doCall(DistributedFileSystem.java:813)
>
>         at
> org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
>
>         at
> org.apache.hadoop.hdfs.DistributedFileSystem.mkdirsInternal(DistributedFileSystem.java:813)
>
>         at
> org.apache.hadoop.hdfs.DistributedFileSystem.mkdirs(DistributedFileSystem.java:806)
>
>         at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:1933)
>
> Caused by: java.net.NoRouteToHostException: No route to host
>
>         at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>
>         at
> sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692)
>
>         at
> org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
>
>         at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
>
>         at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
>
>         at
> org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:547)
>
>         at
> org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:642)
>
>         at
> org.apache.hadoop.ipc.Client$Connection.access$2600(Client.java:314)
>
>         at org.apache.hadoop.ipc.Client.getConnection(Client.java:1399)
>
>         at org.apache.hadoop.ipc.Client.call(Client.java:1318)
>
>         ... 19 more
>
>
>
> It seems lazy connected.
>
>
>
> Thanks
>
>
>
> *发件人:* user-return-15069-tdhkx=126.com@hadoop.apache.org [mailto:
> user-return-15069-tdhkx=126.com@hadoop.apache.org] *代表 *Gordon Wang
> *发送时间:* 2014年4月18日 14:14
> *收件人:* user@hadoop.apache.org
> *主题:* Re: hdfsConnect always success
>
>
>
> Do you got any error message in your log ?
>
>
>
>
>
> 2014-04-18 10:07 GMT+08:00 <tdhkx@126.com>:
>
> Hi,
>
>
>
> When I run program as followed,connect to a remote host not existed,
> always return “HDFS connect OK.”
>
>
>
>
>
> int main()
>
> {
>
>          hdfsFS fs = NULL;
>
>          fs = hdfsConnect("172.16.19.28", 8020);
>
>          if (fs == NULL)
>
>          {
>
>                    printf("HDFS connect error.\n");
>
>                    return -1;
>
>          }
>
>          else
>
>          {
>
>                    printf("HDFS connect OK.\n");
>
>                    return 0;
>
>          }
>
> }
>
>
>
>
>
> --
>
> Regards
>
> Gordon Wang
>
> [image: 提示图标]邮件带有附件预览链接,若您转发或回复此邮件时不希望对方预览附件,建议您手动删除链接。
>
> 共有 *1* 个附件
>
> *image001.jpg*(4K)
>
> 极速下载<http://preview.mail.126.com/xdownload?filename=image001.jpg&mid=1tbiLRRxdE6AXM88-wABsj&part=3&sign=770757874cad07c0ce182c79e5a1903c&time=1397801906&uid=tdhkx%40126.com>
> 在线预览<http://preview.mail.126.com/preview?mid=1tbiLRRxdE6AXM88-wABsj&part=3&sign=770757874cad07c0ce182c79e5a1903c&time=1397801906&uid=tdhkx%40126.com>
>

Mime
View raw message