Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

EWS Java Connection Getting Refused Intermittently  #573

@anshukpal

Description

@anshukpal

Hi - We have a email client which connects to Exchange Server. The email client has been designed to be in-sync with exchange using ews-java-api 2.0. The email is connected to shared folder inbox. We do not find any major issue as per normal behaviour.

It is so happening sometimes, once-twice a day, the connection is getting refused with exchange. Not sure why is this happening.

We initially thought, it might any exchange confiiguration issue, but treid and tested. The exchange is always 100% up, it is a organization wide used via clients like outlook, and don't find any connections issue and there is no issue in that.

Sharing the code snippet which is used to connect to exchange sahred folder:

if (strSharedFolderStatus.equals("t")){
//Data fetching from Inbox folder of Shared mailbox
String strSharedMailBoxCredential=propEmailConfiguration.getProperty("shared-mailbox-credential");
Mailbox sharemailbox = new Mailbox(strSharedMailBoxCredential);
itemsChanged = eService.syncFolderItems(new FolderId(WellKnownFolderName.Inbox,sharemailbox), PropertySet.FirstClassProperties, null, 1, SyncFolderItemsScope.NormalItems, sSyncState);
}
else{
//Data fetching from normal inbox folder
itemsChanged = eService.syncFolderItems(new FolderId(WellKnownFolderName.Inbox), PropertySet.FirstClassProperties, null, 1, SyncFolderItemsScope.NormalItems, sSyncState);
}

Sharing the exception message:

2016-11-03 11:35:15,505 [pool-1-thread-7] DEBUG (BasicHttpClientConnectionManager.java:288) - Releasing connection [Not bound]
2016-11-03 11:35:15,505 [pool-1-thread-7] DEBUG (ConnectionHolder.java:144) - Cancelling request execution
2016-11-03 11:35:15,506 [pool-1-thread-7] INFO (EmailSynchronizer.java:839) - -->> Error message: The request failed. The request failed. Read timed out

Is this similar kind of issue faced by any other users, when sometimes in between, connection gets refused when it is already connected?

Any workarounds would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions