EDC8121I Connection reset. (errno2=0x76650446) issue while trying to send mail using MS Graph API (java)

B Jayachithra 1 Reputation point

Hello Team,

Application to send mail via MS Graph API (written in java) is deployed on websphere server and while trying to connect Microsoft site login.microsoftonline.com:443 via proxy server ,it fails with below error message.

"Caused by: java.io.IOException: java.util.concurrent.ExecutionException: com.microsoft.aad.msal4j.MsalClientException: reactor.core.Exceptions$ReactiveException: io.netty.handler.proxy.ProxyConnectException: http, none, httppxgot.xxx.xxxxx.com/xxxxxxx => login.microsoftonline.com:443, java.io.IOException: EDC8121I Connection reset. (errno2=0x76650446)"

This issue happens randomly when multiple http post request to send mail placed within short period to connect Microsoft site

Please let us know how to fix issue



Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,091 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Antonio 250 Reputation points Microsoft Vendor

    Hi B Jayachithra,

    Thanks for posting on Q&A forum. The error code given was returned to JAVA from the WebSphere server connection to login.microsoftonline.com:443.

    Upon researching that error (EDC8121I Connection reset. (errno2=0x76650446)) on the IBM documentation it was noted as caused by "The connection was forcibly closed by the peer"

    Upon looking further into the JAVA errors (java.util.concurrent.ExecutionException & io.netty.handler.proxy.HttpProxyHandler.HttpProxyConnectException) indicates that an error code was thrown via code executed in in Future that wasn't handled.

    To capture more information from the exception, create launderThrowable method that take care of unwrapping generic ExecutionExceptions. See here for more details with JAVA code.

    Also, as this seems to relate more to the connection/proxy/server setup. It would also be good to review a tcpdump/Wireshark. You can also do this via JAVA parser code.

    Due to being mentioned as this is occurring when multiple POST requests for (sendMail) are placed in a short period of time. Further the HTTPS error 500 indicates more of an internal server error and review:

    We recommend using JSON batching implemented with try...catch logic to mitigate potential throttling issues (if applicable). See this learning path for a real-world training example using NET Core and JAVA Tutorial showing listing of an inbox with catch...try logic.

    Also, to review the email sending limits of the email server in question.

    One last item for consideration is a new preview product Microsoft Graph Developer Proxy v0.7 which allows you to simulate behaviors on any API. using a list of API URLs to simulate errors (including throttling & server issues).

    Finally, if a further review/analysis of Proxy/Network/API setup is required.

    Please redirect with all details on specific 3rd party server setup or for Azure support.

    Open a support request with IBM WebSphere

    Open a support request with Azure Support

    --please don't forget to upvote and Accept as answer if the reply is helpful--