On sending mail for a user using mail.jar of oracle via SMTPTransport.sendMessage(). I am facing the Socket connection exception. Adding the trace log below.
[19:36:17:332]|[05-02-2023]|[SYSERR]|[INFO]|[224]: javax.mail.MessagingException: Exception reading response;
nested exception is:
java.net.SocketException: Software caused connection abort: recv failed|
[19:36:17:332]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2153)|
[19:36:17:332]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2036)|
[19:36:17:332]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1580)|
[19:36:17:332]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1097)|
[19:36:17:332]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at
[19:36:17:332]|[05-02-2023]|[SYSERR]|[INFO]|[224]: Caused by: java.net.SocketException: Software caused connection abort: recv failed|
[19:36:17:333]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at java.net.SocketInputStream.socketRead0(Native Method)|
[19:36:17:333]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)|
[19:36:17:333]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at java.net.SocketInputStream.read(SocketInputStream.java:171)|
[19:36:17:333]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at java.net.SocketInputStream.read(SocketInputStream.java:141)|
[19:36:17:333]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110)|
[19:36:17:333]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)|
[19:36:17:333]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at java.io.BufferedInputStream.read(BufferedInputStream.java:265)|
[19:36:17:333]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:89)|
[19:36:17:333]|[05-02-2023]|[SYSERR]|[INFO]|[224]: at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2131)|
[19:36:17:333]|[05-02-2023]|[SYSERR]|[INFO]|[224]: ... 6 more|
[19:36:17:333]|[05-02-2023]|[sendMailAPILogger]|[INFO]|[224]: The Error occurs in the SendFailedException.|
[19:36:17:334]|[05-02-2023]|[sendMailAPILogger]|[INFO]|[224]: The exception is :Exception reading response|
on Wireshark: There is a No Operation Request from client and The server closes the socet before sending the response.
This occurs randomly 4 out of 5 attempts.
I have refered the other post in this form, found not helpful.If anyone have faced this issue do let you comments, please help to fix this issue
Using java mail.jar api version 1.4.4, HTTP no ssl configured.