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

Weiwei Yang commented on HDFS-12489:
------------------------------------

With this patch, when client call fails with {{OzoneException}}, it prints the 
stack trace to stderr like

{noformat}
[wwei@15oz1 hadoop-3.1.0-SNAPSHOT]$ bin/hdfs oz -listBucket  
http://15oz1.fyre.ibm.com:9864/vol-0-84022 -user wwei
Command Failed : {"httpCode":0,"shortMessage":"Read timed 
out","resource":null,"message":"Read timed 
out","requestID":null,"hostName":null}
org.apache.hadoop.ozone.web.client.OzoneRestClientException: Read timed out
        at 
org.apache.hadoop.ozone.web.client.OzoneVolume.listBuckets(OzoneVolume.java:468)
        at 
org.apache.hadoop.ozone.web.ozShell.bucket.ListBucketHandler.execute(ListBucketHandler.java:105)
        at org.apache.hadoop.ozone.web.ozShell.Shell.dispatch(Shell.java:392)
        at org.apache.hadoop.ozone.web.ozShell.Shell.run(Shell.java:132)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
        at org.apache.hadoop.ozone.web.ozShell.Shell.main(Shell.java:111)
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
        at java.net.SocketInputStream.read(SocketInputStream.java:170)
        at java.net.SocketInputStream.read(SocketInputStream.java:141)
        at 
org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
        at 
org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
        at 
org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
        at 
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
        at 
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
        at 
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
        at 
org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
        at 
org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
        at 
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
        at 
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
        at 
org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
        at 
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
        at 
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
        at 
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
        at 
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at 
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
        at 
org.apache.hadoop.ozone.web.client.OzoneVolume.executeListBuckets(OzoneVolume.java:491)
        at 
org.apache.hadoop.ozone.web.client.OzoneVolume.listBuckets(OzoneVolume.java:465)
        ... 6 more
{noformat}

> Ozone: OzoneRestClientException swallows exceptions which makes client hard 
> to debug failures 
> ----------------------------------------------------------------------------------------------
>
>                 Key: HDFS-12489
>                 URL: https://issues.apache.org/jira/browse/HDFS-12489
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>            Reporter: Weiwei Yang
>            Assignee: Weiwei Yang
>              Labels: ozoneMerge
>         Attachments: HDFS-12489-HDFS-7240.001.patch
>
>
> There are multiple try-catch places swallow exceptions when transforming some 
> other exception to {{OzoneRestClientException}}. As a result, when client 
> runs into such code paths, they lose track of what was going on which makes 
> the debug extremely difficult. See below example
> {code}
> bin/hdfs oz -listBucket  http://15oz1.fyre.ibm.com:9864/vol-0-84022 -user wwei
> Command Failed : {"httpCode":0,"shortMessage":"Read timed 
> out","resource":null,"message":"Read timed 
> out","requestID":null,"hostName":null}
> {code}
> the returned message doesn't help much on debugging where and how it reads 
> timed out.



--
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