You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by td...@126.com on 2014/04/18 09:42:02 UTC
答复: hdfsConnect always success
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.22 to
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(NativeConstructorAcces
sorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.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.jav
a: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(RetryInvocati
onHandler.java:186)
at
org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHand
ler.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.j
ava:81)
at
org.apache.hadoop.hdfs.DistributedFileSystem.mkdirsInternal(DistributedFileS
ystem.java:813)
at
org.apache.hadoop.hdfs.DistributedFileSystem.mkdirs(DistributedFileSystem.ja
va: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:2
06)
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 <td...@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
提示图标 <http://mimg.127.net/xm/all/attpreview/img/ico_notice.gif> 邮件带
有附件预览链接,若您转发或回复此邮件时不希望对方预览附件,建议您手动删除链
接。
共有 1 个附件
image001.jpg(4K)
<http://preview.mail.126.com/xdownload?filename=image001.jpg&mid=1tbiLRRxdE6
AXM88-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> 在线预
览
答复: 答复: hdfsConnect always success
Posted by td...@126.com.
Hi, Stanley Shi
What I want to say is hdfsConnect should return NULL or error, but it doesn’t.
Not the same as the declaration in hdfs.h.
Thanks.
发件人: user-return-15164-tdhkx=126.com@hadoop.apache.org [mailto:user-return-15164-tdhkx=126.com@hadoop.apache.org] 代表 Stanley Shi
发送时间: 2014年4月25日 15:51
收件人: user@hadoop.apache.org
主题: Re: 答复: hdfsConnect always success
NoRouteToHost, please check your network setting
Regards,
Stanley Shi,
<http://www.gopivotal.com/files/media/logos/pivotal-logo-email-signature.png>
On Fri, Apr 18, 2014 at 3:42 PM, <td...@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.22 to 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 <td...@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
提示图标 <http://mimg.127.net/xm/all/attpreview/img/ico_notice.gif> 邮件带有附件预览链接,若您转发或回复此邮件时不希望对方预览附件,建议您手动删除链接。
共有 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> 在线预览
答复: 答复: hdfsConnect always success
Posted by td...@126.com.
Hi, Stanley Shi
What I want to say is hdfsConnect should return NULL or error, but it doesn’t.
Not the same as the declaration in hdfs.h.
Thanks.
发件人: user-return-15164-tdhkx=126.com@hadoop.apache.org [mailto:user-return-15164-tdhkx=126.com@hadoop.apache.org] 代表 Stanley Shi
发送时间: 2014年4月25日 15:51
收件人: user@hadoop.apache.org
主题: Re: 答复: hdfsConnect always success
NoRouteToHost, please check your network setting
Regards,
Stanley Shi,
<http://www.gopivotal.com/files/media/logos/pivotal-logo-email-signature.png>
On Fri, Apr 18, 2014 at 3:42 PM, <td...@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.22 to 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 <td...@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
提示图标 <http://mimg.127.net/xm/all/attpreview/img/ico_notice.gif> 邮件带有附件预览链接,若您转发或回复此邮件时不希望对方预览附件,建议您手动删除链接。
共有 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> 在线预览
答复: 答复: hdfsConnect always success
Posted by td...@126.com.
Hi, Stanley Shi
What I want to say is hdfsConnect should return NULL or error, but it doesn’t.
Not the same as the declaration in hdfs.h.
Thanks.
发件人: user-return-15164-tdhkx=126.com@hadoop.apache.org [mailto:user-return-15164-tdhkx=126.com@hadoop.apache.org] 代表 Stanley Shi
发送时间: 2014年4月25日 15:51
收件人: user@hadoop.apache.org
主题: Re: 答复: hdfsConnect always success
NoRouteToHost, please check your network setting
Regards,
Stanley Shi,
<http://www.gopivotal.com/files/media/logos/pivotal-logo-email-signature.png>
On Fri, Apr 18, 2014 at 3:42 PM, <td...@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.22 to 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 <td...@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
提示图标 <http://mimg.127.net/xm/all/attpreview/img/ico_notice.gif> 邮件带有附件预览链接,若您转发或回复此邮件时不希望对方预览附件,建议您手动删除链接。
共有 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> 在线预览
答复: 答复: hdfsConnect always success
Posted by td...@126.com.
Hi, Stanley Shi
What I want to say is hdfsConnect should return NULL or error, but it doesn’t.
Not the same as the declaration in hdfs.h.
Thanks.
发件人: user-return-15164-tdhkx=126.com@hadoop.apache.org [mailto:user-return-15164-tdhkx=126.com@hadoop.apache.org] 代表 Stanley Shi
发送时间: 2014年4月25日 15:51
收件人: user@hadoop.apache.org
主题: Re: 答复: hdfsConnect always success
NoRouteToHost, please check your network setting
Regards,
Stanley Shi,
<http://www.gopivotal.com/files/media/logos/pivotal-logo-email-signature.png>
On Fri, Apr 18, 2014 at 3:42 PM, <td...@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.22 to 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 <td...@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
提示图标 <http://mimg.127.net/xm/all/attpreview/img/ico_notice.gif> 邮件带有附件预览链接,若您转发或回复此邮件时不希望对方预览附件,建议您手动删除链接。
共有 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> 在线预览
Re: 答复: hdfsConnect always success
Posted by Stanley Shi <ss...@gopivotal.com>.
NoRouteToHost, please check your network setting
Regards,
*Stanley Shi,*
On Fri, Apr 18, 2014 at 3:42 PM, <td...@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 <td...@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>
>
Re: 答复: hdfsConnect always success
Posted by Stanley Shi <ss...@gopivotal.com>.
NoRouteToHost, please check your network setting
Regards,
*Stanley Shi,*
On Fri, Apr 18, 2014 at 3:42 PM, <td...@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 <td...@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>
>
Re: 答复: hdfsConnect always success
Posted by Stanley Shi <ss...@gopivotal.com>.
NoRouteToHost, please check your network setting
Regards,
*Stanley Shi,*
On Fri, Apr 18, 2014 at 3:42 PM, <td...@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 <td...@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>
>
Re: 答复: hdfsConnect always success
Posted by Stanley Shi <ss...@gopivotal.com>.
NoRouteToHost, please check your network setting
Regards,
*Stanley Shi,*
On Fri, Apr 18, 2014 at 3:42 PM, <td...@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 <td...@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>
>