lithnet / googleapps-managementagent

Google Workspace Management Agent for MIM 2016
MIT License
12 stars 4 forks source link

Update Shared Contacts #60

Closed briuccio closed 3 years ago

briuccio commented 3 years ago

Hello, I have an issue when trying to update an existing shared contact: image

Below you can find the details of the error:

at Google.GData.Client.GDataRequest.Execute() at Google.GData.Client.Service.Query(Uri queryUri, DateTime ifModifiedSince, String etag, Int64& contentLength) at Google.GData.Client.Service.Query(FeedQuery feedQuery) at Google.GData.Client.Service.Get(String entryUri) at Lithnet.GoogleApps.ContactRequestFactory.<>cDisplayClass4_1.b0() at Lithnet.GoogleApps.ApiExtensions.InvokeWithRateLimit[T](Func`1 t, String bucketName, Int32 consumeTokens) at Lithnet.GoogleApps.ContactRequestFactory.GetContact(String id) at Lithnet.GoogleApps.MA.ApiInterfaceContact.GetInstance(CSEntryChange csentry) in D:\dev\git\lithnet\googleapps-managementagent\src\Lithnet.GoogleApps.MA\ApiInterfaces\ApiInterfaceContact.cs:line 54 at Lithnet.GoogleApps.MA.ExportProcessor.PutCSEntryChangeUpdate(CSEntryChange csentry, CSEntryChange deltaCSEntry, MASchemaType maType, SchemaType type, IManagementAgentParameters config) in D:\dev\git\lithnet\googleapps-managementagent\src\Lithnet.GoogleApps.MA\ExportProcessor.cs:line 167 at Lithnet.GoogleApps.MA.ExportProcessor.PutCSEntryChangeObject(CSEntryChange csentry, SchemaType type, IManagementAgentParameters config) in D:\dev\git\lithnet\googleapps-managementagent\src\Lithnet.GoogleApps.MA\ExportProcessor.cs:line 48 at Lithnet.GoogleApps.MA.ExportProcessor.PutCSEntryChange(CSEntryChange csentry, SchemaType type, IManagementAgentParameters config) in D:\dev\git\lithnet\googleapps-managementagent\src\Lithnet.GoogleApps.MA\ExportProcessor.cs:line 17 at Lithnet.GoogleApps.MA.ManagementAgent.<>cDisplayClass32_0.b0(CSEntryChange csentry) in D:\dev\git\lithnet\googleapps-managementagent\src\Lithnet.GoogleApps.MA\ManagementAgent.cs:line 135

Thank you!

ryannewington commented 3 years ago

@briuccio We're just missing the start of this error message. What you pasted shows where the problem happened, but not what the problem was. Can you grab the full message from the ma.log file or it may also be in event viewer

briuccio commented 3 years ago

Hello, here the entire error:

ECMA2 MA export run caused an error.

Error Name: Execution of request failed: https://www.google.com/m8/feeds/contacts/xxxxx/full/abcd Error Detail: at Google.GData.Client.GDataRequest.Execute() at Google.GData.Client.Service.Query(Uri queryUri, DateTime ifModifiedSince, String etag, Int64& contentLength) at Google.GData.Client.Service.Query(FeedQuery feedQuery) at Google.GData.Client.Service.Get(String entryUri) at Lithnet.GoogleApps.ContactRequestFactory.<>cDisplayClass4_1.b0() at Lithnet.GoogleApps.ApiExtensions.InvokeWithRateLimit[T](Func`1 t, String bucketName, Int32 consumeTokens) at Lithnet.GoogleApps.ContactRequestFactory.GetContact(String id) at Lithnet.GoogleApps.MA.ApiInterfaceContact.GetInstance(CSEntryChange csentry) at Lithnet.GoogleApps.MA.ExportProcessor.PutCSEntryChangeUpdate(CSEntryChange csentry, CSEntryChange deltaCSEntry, MASchemaType maType, SchemaType type, IManagementAgentParameters config) at Lithnet.GoogleApps.MA.ExportProcessor.PutCSEntryChangeObject(CSEntryChange csentry, SchemaType type, IManagementAgentParameters config) at Lithnet.GoogleApps.MA.ExportProcessor.PutCSEntryChange(CSEntryChange csentry, SchemaType type, IManagementAgentParameters config) at Lithnet.GoogleApps.MA.ManagementAgent.<>cDisplayClass32_0.b0(CSEntryChange csentry)

I think I got the issue: There is a quota "Queries per minute per user" set at 600 in the Google Cloud Platform (it's a test environment and it's not possible to increase that quota).

It's not clear to me why this quota has been reached even if I try to update/delete less than 600 contacts for each run, I tried to set, in the Export Run Profile the maximum number of object to 250 and on an Export run it gives 245 update/delete done and 5 errors, in another Export run (after more than 1 minute) it gives 5 update/delete done and 245 errors.

ryannewington commented 3 years ago

@briuccio

I'm not sure about this one. If it was a rate-limiting issue, we would see a different error code. There's an inbuilt function to detect, back-off, and retry on rate limit issues.

This is performing a simple GET of the contact object - there is a not a lot that can go wrong with this type of request - it's very simple.

I have seen random API issues with Google where they stop behaving as expected for a period of time and then start working again. Even cases where the API returns an incorrect error code for rate limit issues, which means we cant detect the problem, and then reverts back to the expected behavior.

I think you're best bet is to open a case with Google and see what is going on in your environment. Another thing you can try is to get these contacts with the GAM tool and see if that has the same problem.

If you can send me the full ma.log file to support@lithnet.io I'll take a look first and just make sure there is nothing else in there that may help narrow this issue down.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.