grandnode2 icon indicating copy to clipboard operation
grandnode2 copied to clipboard

Installation script have selection for CosmosDB MongoDB but will not work

Open magnuskarlssonhm opened this issue 2 years ago • 8 comments

Installing with CosmosDB in Azure the OrderBy clauses crashes since indexing is somewhat wrong.

At the moment Serverless CosmosDB does not work with installation script since it default to max 100containers. However, this can be scaled if talking to Microsoft Azure support. Using serverless CosmosDB is the most managed, cloud native soltion available and support for it would be very good. To prevent complexities with asking for more than 100 containers/collections it wold be good if one could rmeove dependencies like blog etc. if one (like us) want to use it as a headless ecom with another CMS and custom checkout built on top of it.

https://grandnode.com/boards/topic/62744741289e440e8c915356/installing-with-azure-documentdb-mongodb

magnuskarlssonhm avatar May 17 '22 08:05 magnuskarlssonhm

@magnuskarlssonhm Maybe the best way will be disable Create table for the installation process with CosmosDB, it would be great if you could try this way.

KrzysztofPajak avatar May 17 '22 17:05 KrzysztofPajak

Removed the CreateTables row in Install and it ends here. Not sure how much I would need to dig into it to undertand. image

magnuskarlssonhm avatar May 17 '22 19:05 magnuskarlssonhm

image Some data created before Permission missing exception seen above.

magnuskarlssonhm avatar May 17 '22 19:05 magnuskarlssonhm

Sorry, forgot to delete the setting cfg file. Above was with the db deleted but file in place. Commenting out CreateTables makes it until pictureservice is called. Removing that (the logo setting) the next item to fail is InstallLocalResources. Same exception. Setup failed: Command aggregate failed: Error=2, Details='Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 4c9014ef-d142-4b20-80bf-c18cddd95509; Reason: (Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 4c9014ef-d142-4b20-80bf-c18cddd95509; Reason: (Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 4c9014ef-d142-4b20-80bf-c18cddd95509; Reason: (Message: {"Errors":["The index path corresponding to the specified order-by item is excluded."]} ActivityId: 4c9014ef-d142-4b20-80bf-c18cddd95509, Request URI: /apps/ae5fc126-95c6-49be-b483-e0bea189043e/services/f4567b76-6d84-4083-b731-df3cd7905294/partitions/4d5ceceb-e730-459c-ba1d-410b6fad170c/replicas/132972936022274522p/, RequestStats: Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum, SDK: Windows/10.0.19041 cosmos-netstandard-sdk/3.18.0);););. I think it is the db calling a OrderBy towards CosmosDB. THere is something about the index setup but not sure since Ihavent looked at the details. Will continue tomorrow.

magnuskarlssonhm avatar May 17 '22 20:05 magnuskarlssonhm

Since the install process fails due to the Mongo/Cosmos DB index issue https://docs.microsoft.com/en-us/answers/questions/258032/the-index-path-corresponding-to-the-specified-orde.html I see no reason to dive deeper into it before solving that. It might actually work with removing only CreateTables when fixing the db issue.

magnuskarlssonhm avatar May 18 '22 06:05 magnuskarlssonhm

Removed the CreateTables row in Install and it ends here. Not sure how much I would need to dig into it to undertand. image

I've got the same issue to trying to run it locally. VS2022 + Docker(MongoDB). It looks like it has been trying to extract some kind of groups roles or something similar from DB but the DB is empty. one gets the impression that there is some kind of scrip or migration that should prefill the database. If it is, please tell me where to find it?

RomanCharnashei avatar Aug 04 '22 20:08 RomanCharnashei

Asked Microsoft Azure team to extend the Cosmos DB MongoDB instance count and then it worked. It took them 3 weeks though.

mkarlsson avatar Jul 31 '23 12:07 mkarlsson

However, maybe a mapping for SQL server and regular Cosmos DB could be something? Feels a bit limited at the time. Or, my favourite apporach, separeate front and backend (CMS and Ecom) and this will work.

mkarlsson avatar Jul 31 '23 12:07 mkarlsson