GetItem and GetFolder ews api encounters curl(7) CURLE_COULDNT_CONNECT every other day

Joyce Beck 31 Reputation points
2022-02-20T07:16:37.897+00:00

Hi, to whom it may regards,
Recently (eg. 2021/12/07 to now), we've found that GetItem and GetFolder ews api encounters curl(7) CURLE_COULDNT_CONNECT every other day.

We use GetItem to download mime content, and use GetFolder to get the distinguished folder.
(eg. <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2013"/><t:ExchangeImpersonation><t:ConnectingSID><t:PrincipalName>joyceb@our_domain.com</t:PrincipalName></t:ConnectingSID></t:ExchangeImpersonation></soap:Header><soap:Body><m:GetItem><m:ItemShape><t:BaseShape>IdOnly</t:BaseShape><t:IncludeMimeContent>true</t:IncludeMimeContent></m:ItemShape><m:ItemIds><t:ItemId Id="......our_mail_id......"/></m:ItemIds></m:GetItem></soap:Body></soap:Envelope>)

When we've met CURLE_COULDNT_CONNECT for an user, we've always retried for 13 times in 30 minutes, however, it all fails.

And we have to wait for hours or even tomorrow for the issue to be solved. (eg. and it happens once to twice in a week)

We've used the same curl instance to send ews api to GetItem or GetFolder from different users (eg.UserPrincipalName), and the same curl instance may meet curl(7) for a user but success for another one (eg. it seems like an ews api issue which affects certain users from time to time).

Is this a known issue, or has anyone encountered the same issues?

Thank you,

Best regards,
Joyce Beck

Microsoft Office Online Server
Microsoft Office Online Server
Microsoft on-premises server product that runs Office Online. Previously known as Office Web Apps Server.
585 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
508 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,349 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Glen Scales 4,431 Reputation points
    2022-02-20T23:47:22.3+00:00

    CURLE_COULDNT_CONNECT

    This error itself is being generated on the client side so your client for whatever reason can't connect to the server, so this means its not a Server API issue (eg you would be getting a 500 or 400 type error in that instance) and it also not related to throttling which would give you a 200 response with a specific error code. EWS (and nearly everything else) are enforcing TLS 1.2 so if for whatever reason your code was dropping the encryption level. I'd also be careful with any proxies that are in the network path that might break it eg one expired SSL certificate in a load balanced array etc.

    The place to start would be looking at the client network path so when your getting the error in your code try to access Office365 from another client or application eg if it a Windows machine try the EWS Editor https://github.com/dseph/EwsEditor/releases.

    0 comments No comments