java.lang.Exception: java.net.SocketTimeoutException: Read timed out

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Mirth 2.1 inbound ftp connector, (tested here on localhost ftp server) is able to pool messages on a directory containing up to 10 000 1KB message files (present in the directory at a given time) without problem, however beyond this limit, (in our case 72800 message files) the polling no bring any message. In Mirth log, the folowing error: -- [2011-06-20 19:11:07,558] FATAL (org.mule.impl.DefaultComponentExceptionStrategy:84): The error is: java.net.SocketTimeoutException: Read timed out java.lang.Exception: java.net.SocketTimeoutException: Read timed out at com.mirth.connect.connectors.file.FileMessageReceiver.poll(FileMessageReceiver.java:124) at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:97) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Unknown Source)Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at sun.nio.cs.StreamDecoder.readBytes(Unknown Source) at sun.nio.cs.StreamDecoder.implRead(Unknown Source) at sun.nio.cs.StreamDecoder.read(Unknown Source) at java.io.InputStreamReader.read(Unknown Source) at java.io.BufferedReader.fill(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:294) at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:490) at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534) at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:509) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2296) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2269) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2046) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2093) at com.mirth.connect.connectors.file.filesystems.FtpConnection.listFiles(FtpConnection.java:137) at com.mirth.connect.connectors.file.FileMessageReceiver.listFiles(FileMessageReceiver.java:416) at com.mirth.connect.connectors.file.FileMessageReceiver.poll(FileMessageReceiver.java:104) -- (of course, ftp server state was checked in parallel during this test) Best regards,
    via by Bruno MARTIN,
  • Mirth 2.1 inbound ftp connector, (tested here on localhost ftp server) is able to pool messages on a directory containing up to 10 000 1KB message files (present in the directory at a given time) without problem, however beyond this limit, (in our case 72800 message files) the polling no bring any message. In Mirth log, the folowing error: -- [2011-06-20 19:11:07,558] FATAL (org.mule.impl.DefaultComponentExceptionStrategy:84): The error is: java.net.SocketTimeoutException: Read timed out java.lang.Exception: java.net.SocketTimeoutException: Read timed out at com.mirth.connect.connectors.file.FileMessageReceiver.poll(FileMessageReceiver.java:124) at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:97) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Unknown Source)Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at sun.nio.cs.StreamDecoder.readBytes(Unknown Source) at sun.nio.cs.StreamDecoder.implRead(Unknown Source) at sun.nio.cs.StreamDecoder.read(Unknown Source) at java.io.InputStreamReader.read(Unknown Source) at java.io.BufferedReader.fill(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:294) at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:490) at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534) at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:509) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2296) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2269) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2046) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2093) at com.mirth.connect.connectors.file.filesystems.FtpConnection.listFiles(FtpConnection.java:137) at com.mirth.connect.connectors.file.FileMessageReceiver.listFiles(FileMessageReceiver.java:416) at com.mirth.connect.connectors.file.FileMessageReceiver.poll(FileMessageReceiver.java:104) -- (of course, ftp server state was checked in parallel during this test) Best regards,
    via by Bruno MARTIN,
  • FTP client hangs with the following error. Here is the truss output. The client hangs indefinitely and no work is being done other than this error when you truss the process. I use Java 1.5 to run this. We wrote a long-running ftp daemon and this happens after 20-23 hours of continuous running. Here is the code to pull files from the ftp server. This one lists files that are received after this particular "incal" time (currently it lists but the intention is to implement an incremental download). We initially thought doing periodic noop would keep the client alive by sending dummy commands to the server. But we found this probelm still occurs. public void ListIncrementalFiles (String directory, Calendar incal) { try { FTPFile[] files = listFiles(directory); int total_files = 0; System.out.println("FileName\tFileSize\t\tDate Time Stamp"); for (int i = 0; i < files.length; i++) { FTPFile file = files[i]; if ((i % 1000) == 0) { System.out.println("noop occurred at this instance---> " + i + "\n"); noop(); } if (file.isFile()) { Calendar c = file.getTimestamp(); if (c.after(incal) || c.equals(incal)) { System.out.println(file.getName() + "\t" + file.getSize() + "\t\t" + c.getTime()); total_files++; } } } System.out.println("Total Files in the listing ----> " + total_files); } catch (Exception e) { System.out.println("FTP Getfiles exception occured"); e.printStackTrace(); } } ---------------------------------------------------------------------------------------------------------------------------------Truss output begins-------------------------------------------------------- /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /6: lwp_cond_wait(0x00035F08, 0x00035EF0, 0xB477FBE0, 0) Err#62 ETIME /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /9: lwp_park(0x00000000, 0) (sleeping...) /3: lwp_cond_wait(0x000B77C0, 0x000B77A8, 0x00000000, 0) (sleeping...) /8: lwp_cond_wait(0x0014A908, 0x0014A8F0, 0x00000000, 0) (sleeping...) /10: lwp_cond_wait(0x000366E8, 0x000366D0, 0x00000000, 0) (sleeping...) /1: pollsys(0x00000000, 0, 0xFFBFEB60, 0x00000000) (sleeping...) /11: lwp_cond_wait(0x00036778, 0x00036760, 0x00000000, 0) (sleeping...) /4: lwp_cond_wait(0x000B77C0, 0x000B77A8, 0x00000000, 0) (sleeping...) /12: lwp_cond_wait(0x00036778, 0x00036760, 0x00000000, 0) (sleeping...) /2: lwp_cond_wait(0x000B77C0, 0x000B77A8, 0x00000000, 0) (sleeping...) /7: lwp_cond_wait(0x00149F98, 0x00149F80, 0x00000000, 0) (sleeping...) /5: lwp_cond_wait(0x000B77C0, 0x000B77A8, 0x00000000, 0) (sleeping...) /13: lwp_cond_wait(0x00034958, 0x00034940, 0x00000000, 0) (sleeping...) /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /6: lwp_cond_wait(0x00035F08, 0x00035EF0, 0xB477FBE0, 0) Err#62 ETIME /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /6: lwp_cond_wait(0x00035F08, 0x00035EF0, 0xB477FBE0, 0) Err#62 ETIME /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /6: lwp_cond_wait(0x00035F08, 0x00035EF0, 0xB477FBE0, 0) Err#62 ETIME /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /6: lwp_cond_wait(0x00035F08, 0x00035EF0, 0xB477FBE0, 0) Err#62 ETIME /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /6: lwp_cond_wait(0x00035F08, 0x00035EF0, 0xB477FBE0, 0) Err#62 ETIME /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /6: lwp_cond_wait(0x00035F08, 0x00035EF0, 0xB477FBE0, 0) Err#62 ETIME /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 /14: pollsys(0x00000000, 0, 0xB3F7FC10, 0x00000000) = 0 ------------------------------------------------------------------------------------------Truss output ends-------------------------------------------------------------------------------------------
    via by Lvenkataraman,
  • Hibernate error
    via by Pratik Parekh,
  • I can't catch SocketTimeoutException()
    via Stack Overflow by Matty265
    ,
    • java.lang.Exception: java.net.SocketTimeoutException: Read timed out at com.mirth.connect.connectors.file.FileMessageReceiver.poll(FileMessageReceiver.java:124) at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:97) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Unknown Source) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at sun.nio.cs.StreamDecoder.readBytes(Unknown Source) at sun.nio.cs.StreamDecoder.implRead(Unknown Source) at sun.nio.cs.StreamDecoder.read(Unknown Source) at java.io.InputStreamReader.read(Unknown Source) at java.io.BufferedReader.fill(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:294) at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:490) at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534) at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:509) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2296) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2269) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2046) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2093) at com.mirth.connect.connectors.file.filesystems.FtpConnection.listFiles(FtpConnection.java:137) at com.mirth.connect.connectors.file.FileMessageReceiver.listFiles(FileMessageReceiver.java:416) at com.mirth.connect.connectors.file.FileMessageReceiver.poll(FileMessageReceiver.java:104)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown User
    Unknown User4 times, last one,
    Unknown visitor3 times, last one,
    tvrmsmith
    tvrmsmith2 times, last one,
    147 more bugmates