java.net.SocketTimeoutException: Read timed out

Apache's JIRA Issue Tracker | Carl Steinbach | 2 years ago
  1. 0

    HDFS-2538 disabled status reporting for the fsck command (it can optionally be enabled with the -showprogress option). We have observed that without status reporting the client will abort with read timeout: {noformat} [hdfs@lva1-hcl0030 ~]$ hdfs fsck / Connecting to namenode via http://lva1-tarocknn01.grid.linkedin.com:50070 14/09/30 06:03:41 WARN security.UserGroupInformation: PriviledgedActionException as:hdfs@GRID.LINKEDIN.COM (auth:KERBEROS) cause:java.net.SocketTimeoutException: Read timed out Exception in thread "main" java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:152) at java.net.SocketInputStream.read(SocketInputStream.java:122) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read1(BufferedInputStream.java:275) at java.io.BufferedInputStream.read(BufferedInputStream.java:334) at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323) at org.apache.hadoop.hdfs.tools.DFSck.doWork(DFSck.java:312) at org.apache.hadoop.hdfs.tools.DFSck.access$000(DFSck.java:72) at org.apache.hadoop.hdfs.tools.DFSck$1.run(DFSck.java:149) at org.apache.hadoop.hdfs.tools.DFSck$1.run(DFSck.java:146) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548) at org.apache.hadoop.hdfs.tools.DFSck.run(DFSck.java:145) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) at org.apache.hadoop.hdfs.tools.DFSck.main(DFSck.java:346) {noformat} Since there's nothing for the client to read it will abort if the time required to complete the fsck operation is longer than the client's read timeout setting. I can think of a couple ways to fix this: # Set an infinite read timeout on the client side (not a good idea!). # Have the server-side write (and flush) zeros to the wire and instruct the client to ignore these characters instead of echoing them. # It's possible that flushing an empty buffer on the server-side will trigger an HTTP response with a zero length payload. This may be enough to keep the client from hanging up.

    Apache's JIRA Issue Tracker | 2 years ago | Carl Steinbach
    java.net.SocketTimeoutException: Read timed out
  2. 0

    HDFS-2538 disabled status reporting for the fsck command (it can optionally be enabled with the -showprogress option). We have observed that without status reporting the client will abort with read timeout: {noformat} [hdfs@lva1-hcl0030 ~]$ hdfs fsck / Connecting to namenode via http://lva1-tarocknn01.grid.linkedin.com:50070 14/09/30 06:03:41 WARN security.UserGroupInformation: PriviledgedActionException as:hdfs@GRID.LINKEDIN.COM (auth:KERBEROS) cause:java.net.SocketTimeoutException: Read timed out Exception in thread "main" java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:152) at java.net.SocketInputStream.read(SocketInputStream.java:122) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read1(BufferedInputStream.java:275) at java.io.BufferedInputStream.read(BufferedInputStream.java:334) at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323) at org.apache.hadoop.hdfs.tools.DFSck.doWork(DFSck.java:312) at org.apache.hadoop.hdfs.tools.DFSck.access$000(DFSck.java:72) at org.apache.hadoop.hdfs.tools.DFSck$1.run(DFSck.java:149) at org.apache.hadoop.hdfs.tools.DFSck$1.run(DFSck.java:146) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548) at org.apache.hadoop.hdfs.tools.DFSck.run(DFSck.java:145) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) at org.apache.hadoop.hdfs.tools.DFSck.main(DFSck.java:346) {noformat} Since there's nothing for the client to read it will abort if the time required to complete the fsck operation is longer than the client's read timeout setting. I can think of a couple ways to fix this: # Set an infinite read timeout on the client side (not a good idea!). # Have the server-side write (and flush) zeros to the wire and instruct the client to ignore these characters instead of echoing them. # It's possible that flushing an empty buffer on the server-side will trigger an HTTP response with a zero length payload. This may be enough to keep the client from hanging up.

    Apache's JIRA Issue Tracker | 2 years ago | Carl Steinbach
    java.net.SocketTimeoutException: Read timed out
  3. 0

    SocketError on deploy after build and train

    Google Groups | 2 years ago | Uchenna Anyanwu
    java.net.SocketTimeoutException: Read timed out
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Eclipse Community Forums: Marketplace Client Project ยป MPC in RCP application: Unable to read repository

    eclipse.org | 2 weeks ago
    org.eclipse.core.runtime.CoreException: Unable to read repository at http://marketplace.eclipse.org/catalogs/api/p.
  6. 0

    Windows 10 not working

    GitHub | 6 months ago | jjsainzc
    io.socket.SocketIOException: Error while handshaking

  1. richard77 1 times, last 2 weeks ago
  2. Piz 6 times, last 4 months ago
  3. regisso 7 times, last 5 months ago
  4. vega113 1 times, last 6 months ago
4 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.SocketTimeoutException

    Read timed out

    at java.net.SocketInputStream.socketRead0()
  2. Java RT
    HttpURLConnection.getInputStream
    1. java.net.SocketInputStream.socketRead0(Native Method)
    2. java.net.SocketInputStream.read(SocketInputStream.java:152)
    3. java.net.SocketInputStream.read(SocketInputStream.java:122)
    4. java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
    5. java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
    6. java.io.BufferedInputStream.read(BufferedInputStream.java:334)
    7. sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
    8. sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
    9. sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
    9 frames
  3. Apache Hadoop HDFS
    DFSck$1.run
    1. org.apache.hadoop.hdfs.tools.DFSck.doWork(DFSck.java:312)
    2. org.apache.hadoop.hdfs.tools.DFSck.access$000(DFSck.java:72)
    3. org.apache.hadoop.hdfs.tools.DFSck$1.run(DFSck.java:149)
    4. org.apache.hadoop.hdfs.tools.DFSck$1.run(DFSck.java:146)
    4 frames
  4. Java RT
    Subject.doAs
    1. java.security.AccessController.doPrivileged(Native Method)
    2. javax.security.auth.Subject.doAs(Subject.java:415)
    2 frames
  5. Hadoop
    UserGroupInformation.doAs
    1. org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
    1 frame
  6. Apache Hadoop HDFS
    DFSck.run
    1. org.apache.hadoop.hdfs.tools.DFSck.run(DFSck.java:145)
    1 frame
  7. Hadoop
    ToolRunner.run
    1. org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    2. org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    2 frames
  8. Apache Hadoop HDFS
    DFSck.main
    1. org.apache.hadoop.hdfs.tools.DFSck.main(DFSck.java:346)
    1 frame