[
https://issues.apache.org/jira/browse/HDFS-9905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15241555#comment-15241555
]
Masatake Iwasaki commented on HDFS-9905:
----------------------------------------
Hmm... the stacktrace printed by {{GenericTestUtils.assertExceptionContains}}
does not show the root cause because {{TestWebHdfsTimeouts#runWithRetry}}
recreate SocketTimeoutException to add host address to the message.
I got following stack by commenting out the recreating exception part of
{{TestWebHdfsTimeouts#runWithRetry}}.
[java.net.SocksSocketImpl|http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/file/34c594b52b73/src/share/classes/java/net/SocksSocketImpl.java#l103]
is possible to throw SocketTimeoutException with null message. We seem not to
be able to expect that SocketTimeoutException always contains message such as
"Read timed out" or "connect timed out".
{noformat}
java.lang.AssertionError: Expected to find ': Read timed out' but got
unexpected exception:java.net.SocketTimeoutException
at java.net.SocksSocketImpl.remainingMillis(SocksSocketImpl.java:111)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1169)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:933)
at
org.apache.hadoop.hdfs.web.WebHdfsFileSystem$AbstractRunner.connect(WebHdfsFileSystem.java:684)
at
org.apache.hadoop.hdfs.web.WebHdfsFileSystem$AbstractRunner.connect(WebHdfsFileSystem.java:637)
at
org.apache.hadoop.hdfs.web.WebHdfsFileSystem$AbstractRunner.runWithRetry(WebHdfsFileSystem.java:709)
at
org.apache.hadoop.hdfs.web.WebHdfsFileSystem$AbstractRunner.access$100(WebHdfsFileSystem.java:555)
at
org.apache.hadoop.hdfs.web.WebHdfsFileSystem$AbstractRunner$1.run(WebHdfsFileSystem.java:586)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1742)
at
org.apache.hadoop.hdfs.web.WebHdfsFileSystem$AbstractRunner.run(WebHdfsFileSystem.java:582)
at
org.apache.hadoop.hdfs.web.WebHdfsFileSystem.getDelegationToken(WebHdfsFileSystem.java:1466)
at
org.apache.hadoop.hdfs.web.TestWebHdfsTimeouts.testAuthUrlReadTimeout(TestWebHdfsTimeouts.java:198)
{noformat}
> TestWebHdfsTimeouts fails occasionally
> --------------------------------------
>
> Key: HDFS-9905
> URL: https://issues.apache.org/jira/browse/HDFS-9905
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: test
> Affects Versions: 2.7.3
> Reporter: Kihwal Lee
> Assignee: Wei-Chiu Chuang
> Attachments: HDFS-9905.001.patch
>
>
> When checking for a timeout, it does get {{SocketTimeoutException}}, but the
> message sometimes does not contain "connect timed out". Since the original
> exception is not logged, we do not know details.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)