[ 
https://issues.apache.org/jira/browse/HDFS-12466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16171758#comment-16171758
 ] 

Nandakumar commented on HDFS-12466:
-----------------------------------

Hi [~cheersyang], find below the stack when {{ozone.ksm.address}} is not 
configured in client and KSM is not running in the same machine.

*Without Patch*
{code}
2017-09-19 17:50:50,745 [main] INFO       - Creating Volume: vol-1, with 
nvadivelu as owner and quota set to 1152921504606846976 bytes.
2017-09-19 17:50:52,069 INFO ipc.Client: Retrying connect to server: 
0.0.0.0/0.0.0.0:9862. Already tried 0 time(s); retry policy is 
RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2017-09-19 17:50:53,077 INFO ipc.Client: Retrying connect to server: 
0.0.0.0/0.0.0.0:9862. Already tried 1 time(s); retry policy is 
RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2017-09-19 17:50:54,079 INFO ipc.Client: Retrying connect to server: 
0.0.0.0/0.0.0.0:9862. Already tried 2 time(s); retry policy is 
RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2017-09-19 17:50:55,082 INFO ipc.Client: Retrying connect to server: 
0.0.0.0/0.0.0.0:9862. Already tried 3 time(s); retry policy is 
RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2017-09-19 17:50:56,086 INFO ipc.Client: Retrying connect to server: 
0.0.0.0/0.0.0.0:9862. Already tried 4 time(s); retry policy is 
RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2017-09-19 17:50:57,088 INFO ipc.Client: Retrying connect to server: 
0.0.0.0/0.0.0.0:9862. Already tried 5 time(s); retry policy is 
RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2017-09-19 17:50:58,090 INFO ipc.Client: Retrying connect to server: 
0.0.0.0/0.0.0.0:9862. Already tried 6 time(s); retry policy is 
RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2017-09-19 17:50:59,095 INFO ipc.Client: Retrying connect to server: 
0.0.0.0/0.0.0.0:9862. Already tried 7 time(s); retry policy is 
RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2017-09-19 17:51:00,096 INFO ipc.Client: Retrying connect to server: 
0.0.0.0/0.0.0.0:9862. Already tried 8 time(s); retry policy is 
RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2017-09-19 17:51:01,102 INFO ipc.Client: Retrying connect to server: 
0.0.0.0/0.0.0.0:9862. Already tried 9 time(s); retry policy is 
RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
Exception in thread "main" java.net.ConnectException: Call From 
HW12726.local/10.200.4.230 to 0.0.0.0:9862 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:815)
        at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:746)
        at org.apache.hadoop.ipc.Client.getRpcResponse(Client.java:1494)
        at org.apache.hadoop.ipc.Client.call(Client.java:1436)
        at org.apache.hadoop.ipc.Client.call(Client.java:1346)
        at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:228)
        at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:116)
        at com.sun.proxy.$Proxy7.createVolume(Unknown Source)
        at 
org.apache.hadoop.ozone.ksm.protocolPB.KeySpaceManagerProtocolClientSideTranslatorPB.createVolume(KeySpaceManagerProtocolClientSideTranslatorPB.java:159)
        at 
org.apache.hadoop.ozone.client.rpc.RpcClient.createVolume(RpcClient.java:196)
        at 
org.apache.hadoop.ozone.client.rpc.RpcClient.createVolume(RpcClient.java:152)
        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.ozone.client.OzoneClientInvocationHandler.invoke(OzoneClientInvocationHandler.java:54)
        at com.sun.proxy.$Proxy8.createVolume(Unknown Source)
        at 
org.apache.hadoop.ozone.client.ObjectStore.createVolume(ObjectStore.java:53)
        at 
com.hortonworks.ozone.OzoneClientDriver.main(OzoneClientDriver.java:30)
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:531)
        at 
org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:684)
        at 
org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:787)
        at org.apache.hadoop.ipc.Client$Connection.access$3500(Client.java:408)
        at org.apache.hadoop.ipc.Client.getConnection(Client.java:1551)
        at org.apache.hadoop.ipc.Client.call(Client.java:1382)
        ... 15 more
{code}

*With Patch v001*
{code}
Exception in thread "main" java.io.IOException: Couldn't create protocol class 
org.apache.hadoop.ozone.client.rpc.RpcClient
        at 
org.apache.hadoop.ozone.client.OzoneClientFactory.getProtocolClass(OzoneClientFactory.java:164)
        at 
org.apache.hadoop.ozone.client.OzoneClientFactory.getClient(OzoneClientFactory.java:106)
        at 
org.apache.hadoop.ozone.client.OzoneClientFactory.getClient(OzoneClientFactory.java:74)
        at 
com.hortonworks.ozone.OzoneClientDriver.main(OzoneClientDriver.java:24)
Caused by: java.lang.reflect.InvocationTargetException
        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.ozone.client.OzoneClientFactory.getProtocolClass(OzoneClientFactory.java:158)
        ... 3 more
Caused by: java.lang.IllegalArgumentException: ozone.ksm.address must be 
defined. See https://wiki.apache.org/hadoop/Ozone#Configuration for details on 
configuring Ozone.
        at 
org.apache.hadoop.ozone.client.OzoneClientUtils.getKsmAddressForClients(OzoneClientUtils.java:336)
        at 
org.apache.hadoop.ozone.client.rpc.RpcClient.<init>(RpcClient.java:111)
        ... 8 more
{code}

> Ozone: KSM: Make "ozone.ksm.address" as mandatory property for client
> ---------------------------------------------------------------------
>
>                 Key: HDFS-12466
>                 URL: https://issues.apache.org/jira/browse/HDFS-12466
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>            Reporter: Nandakumar
>            Assignee: Nandakumar
>            Priority: Minor
>         Attachments: HDFS-12466-HDFS-7240.000.patch, 
> HDFS-12466-HDFS-7240.001.patch
>
>
> This jira makes {{ozone.ksm.address}} as a mandatory property at client side. 
> User has to explicitly configure it now. We should not use default 
> {{0.0.0.0}} if the value is not present, throw exception instead.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to