question

JoyceBeck-0263 avatar image
0 Votes"
JoyceBeck-0263 asked KaelYao-MSFT commented

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

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

office-exchange-server-administrationoffice-exchange-server-devoffice-online-server-exchange
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @JoyceBeck-0263

Since this question is related to Exchange development, I have added the tag "office-exchange-server-dev" to it.
Thanks for your understanding.

0 Votes 0 ·

1 Answer

GlenScales-6756 avatar image
0 Votes"
GlenScales-6756 answered

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.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.