Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.io.IOException: Connection reset by peer on asynchronous calls of SQS and SES (Channel closed - SSL handshake failure) #978

Closed
Jahx opened this issue Dec 27, 2018 · 7 comments
Labels
investigating This issue is being investigated and/or work is in progress to resolve the issue.

Comments

@Jahx
Copy link

Jahx commented Dec 27, 2018

We are getting IOException "Connection reset by peer" for asynchronous SQS and SES clients which is caused by SSLException: "Inbound closed before receiving peer's close_notify: possible truncation attack?"
Please check these screenshots from Intellij debug for more detail: https://photos.app.goo.gl/LCnmULCjzx54nbde9

Expected Behavior

Connections are closed properly. No SSL handshake or channel was closed exceptions

Current Behavior

Please check these screenshots for more detail: https://photos.app.goo.gl/LCnmULCjzx54nbde9

Steps to Reproduce (for bugs)

Make asynchronous call using SesAsynchClinet or SqsAsyncClient. From time to time we get the exception (Usually in 1 minute delay after actual call).

Context

One of our services is used for sending emails. We get the errors and cannot handle it.

Your Environment

  • AWS Java SDK version used: 2.2.0
  • JDK version used: java-1.8.0 (8u181-b13)
  • Operating System and version: docker amazonlinux:latest
@Aleksandr-Filichkin
Copy link

Hi, I also see this issue for SES?
Any updates?

@zoewangg zoewangg added the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Jan 9, 2019
@zoewangg
Copy link
Contributor

zoewangg commented Jan 9, 2019

Having trouble reproducing the issue. It would be helpful if you could provide a more specific scenario to reproduce the issue, such as the TPS to trigger the issue or how long it should be running until the exception occurs.

@Aleksandr-Filichkin
Copy link

@zoewangg,
we have some production code that we cannot share. But we will try to write something simple. We will share with you the test app

@baka2010
Copy link

@zoewangg
please take a look at https://github.com/baka2010/ses
Just set EMAIL_ADDRESS_TO and EMAIL_ADDRESS_FROM.
This issue is reproduced when you try to send >100 emails after 1 min timeout.
Stack trace screenshot is in repo.

@Aleksandr-Filichkin
Copy link

@zoewangg did you have a chance to try this code from the previous comment?

@zoewangg
Copy link
Contributor

@Aleksandr-Filichkin Thanks for providing the sample code, but unfortunately I still wasn't able to reproduce the issue on my laptop. Could you provide the JDK version, OS name and version?

One thing I noticed in your stack trace https://raw.githubusercontent.com/baka2010/ses/master/stack_trace.png is that the logs were WARN logs. Did you actually get exceptions that were causing the requests to fail? If not, it looks like a similar issue to #900 (comment)

@Jahx
Copy link
Author

Jahx commented Jan 24, 2019

Hi @zoewangg! Thanks for your help. Since it is duplicate issue for #900 we can close this one.

@Jahx Jahx closed this as completed Jan 24, 2019
aws-sdk-java-automation pushed a commit that referenced this issue Sep 29, 2020
…db54c354

Pull request: release <- staging/e56dd9be-890a-4d5b-8477-9817db54c354
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating This issue is being investigated and/or work is in progress to resolve the issue.
Projects
None yet
Development

No branches or pull requests

4 participants