Squidex in Azure with CosmosDB

Hi,
I’m trying to setup Squidex in Azure with using CosmosDB but without any success.

I have AppService with running Squidex in a docker container with the following configuration:

[
  {
    "name": "ASSETSTORE__AZUREBLOB__CONNECTIONSTRING",
    "value": "***",
    "slotSetting": false
  },
  {
    "name": "ASSETSTORE__TYPE",
    "value": "AzureBlob",
    "slotSetting": false
  },
  {
    "name": "DOCKER_REGISTRY_SERVER_URL",
    "value": "https://index.docker.io",
    "slotSetting": false
  },
  {
    "name": "EVENTSTORE__COSMOSDB__CONFIGURATION",
    "value": "https://**.documents.azure.com",
    "slotSetting": false
  },
  {
    "name": "EVENTSTORE__COSMOSDB__MASTERKEY",
    "value": "***",
    "slotSetting": false
  },
  {
    "name": "EVENTSTORE__TYPE",
    "value": "CosmosDB",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__ADMINEMAIL",
    "value": "**",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__ADMINPASSWORD",
    "value": "**",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__GITHUBCLIENT",
    "value": "",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__GOOGLECLIENT",
    "value": "",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__MICROSOFTCLIENT",
    "value": "",
    "slotSetting": false
  },
  {
    "name": "STORE__MONGODB__CONFIGURATION",
    "value": "**",
    "slotSetting": false
  },
  {
    "name": "URLS__BASEURL",
    "value": "https://**.azurewebsites.net",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_HTTPLOGGING_RETENTION_DAYS",
    "value": "30",
    "slotSetting": false
  },
  {
    "name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
    "value": "false",
    "slotSetting": false
  }
]

Also I’ve created storage account and cosmosdb resource (Azure Cosmos DB for MongoDB API).
I can run Squidex but when I try to create app I get 500 error.

2019-07-22T11:21:04.772356899Z   "logLevel": "Error",
2019-07-22T11:21:04.772361099Z   "message": "Connection id \"0HLOEIQMHMDB7\", Request id \"0HLOEIQMHMDB7:00000001\": An unhandled exception was thrown by the application.",
2019-07-22T11:21:04.772365099Z   "eventId": {
2019-07-22T11:21:04.772368399Z     "id": 13,
2019-07-22T11:21:04.772371699Z     "name": "ApplicationError"
2019-07-22T11:21:04.772375299Z   },
2019-07-22T11:21:04.772444199Z   "connectionId": "0HLOEIQMHMDB7",
2019-07-22T11:21:04.772451299Z   "traceIdentifier": "0HLOEIQMHMDB7:00000001",
2019-07-22T11:21:04.772454899Z   "exception": {
2019-07-22T11:21:04.772466599Z     "type": "Microsoft.Azure.Documents.DocumentClientException",
2019-07-22T11:21:04.772521700Z     "message": "Sql api is not supported for this database account\r\nActivityId: 6706a8dc-dfcf-412f-851e-eaa21016588f, Microsoft.Azure.Documents.Common/2.4.0.0, Linux/3.8.4 documentdb-netcore-sdk/2.4.0",
2019-07-22T11:21:04.774702614Z     "stackTrace": "   at Microsoft.Azure.Documents.GatewayStoreClient.ParseResponseAsync(HttpResponseMessage responseMessage, JsonSerializerSettings serializerSettings, DocumentServiceRequest request)\n   at Microsoft.Azure.Documents.GatewayStoreClient.InvokeAsync(DocumentServiceRequest request, ResourceType resourceType, Uri physicalAddress, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.GatewayStoreModel.ProcessMessageAsync(DocumentServiceRequest request, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Client.DocumentClient.ProcessRequestAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.ExecuteQueryRequestInternalAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.ExecuteQueryRequestAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.ExecuteOnceAsync(IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.<>c__DisplayClass8_0.<<ExecuteInternalAsync>b__0>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n   at Microsoft.Azure.Documents.BackoffRetryUtility`1.ExecuteRetryAsync(Func`1 callbackMethod, Func`3 callShouldRetry, Func`1 inBackoffAlternateCallbackMethod, TimeSpan minBackoffForInBackoffCallback, CancellationToken cancellationToken, Action`1 preRetryCallback)\n   at Microsoft.Azure.Documents.ShouldRetryResult.ThrowIfDoneTrying(ExceptionDispatchInfo capturedException)\n   at Microsoft.Azure.Documents.BackoffRetryUtility`1.ExecuteRetryAsync(Func`1 callbackMethod, Func`3 callShouldRetry, Func`1 inBackoffAlternateCallbackMethod, TimeSpan minBackoffForInBackoffCallback, CancellationToken cancellationToken, Action`1 preRetryCallback)\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.ExecuteInternalAsync(CancellationToken token)\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.ExecuteNextAsync(CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.ProxyDocumentQueryExecutionContext.ExecuteNextAsync(CancellationToken token)\n   at Microsoft.Azure.Documents.Linq.DocumentQuery`1.ExecuteNextPrivateAsync[TResponse](CancellationToken cancellationToken)\n   at Squidex.Infrastructure.EventSourcing.FilterExtensions.QueryAsync[T](IQueryable`1 queryable, Func`2 handler, CancellationToken ct)\n   at Squidex.Infrastructure.EventSourcing.CosmosDbEventStore.QueryAsync(String streamName, Int64 streamPosition) in /src/src/Squidex.Infrastructure.Azure/EventSourcing/CosmosDbEventStore_Reader.cs:line 75\n   at Squidex.Infrastructure.States.Persistence`2.ReadEventsAsync() in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 106\n   at Squidex.Infrastructure.States.Persistence`2.ReadAsync(Int64 expectedVersion) in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 66\n   at Squidex.Infrastructure.Commands.DomainObjectGrainBase`1.OnActivateAsync(Guid key) in /src/src/Squidex.Infrastructure/Commands/DomainObjectGrainBase.cs:line 61\n   at Orleans.LifecycleSubject.WrapExecution(CancellationToken ct, Func`2 action)\n   at Orleans.LifecycleSubject.OnStart(CancellationToken ct)\n   at Orleans.Runtime.Catalog.CallGrainActivate(ActivationData activation, Dictionary`2 requestContextData)\n   at Orleans.Runtime.Scheduler.AsyncClosureWorkItem.Execute()\n   at Orleans.Runtime.Catalog.InitActivation(ActivationData activation, String grainType, String genericArguments, Dictionary`2 requestContextData)\n   at Orleans.OrleansTaskExtentions.<ToTypedTask>g__ConvertAsync|4_0[T](Task`1 asyncTask)\n   at Squidex.Infrastructure.Commands.GrainCommandMiddleware`2.ExecuteCommandAsync(TCommand typedCommand) in /src/src/Squidex.Infrastructure/Commands/GrainCommandMiddleware.cs:line 41\n   at Squidex.Infrastructure.Commands.GrainCommandMiddleware`2.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Infrastructure/Commands/GrainCommandMiddleware.cs:line 29\n   at Squidex.Domain.Apps.Entities.Apps.Indexes.AppsByNameIndexCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsByNameIndexCommandMiddleware.cs:line 50\n   at Squidex.Domain.Apps.Entities.Apps.Indexes.AppsByNameIndexCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsByNameIndexCommandMiddleware.cs:line 66\n   at Squidex.Infrastructure.Commands.GrainCommandMiddleware`2.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Infrastructure/Commands/GrainCommandMiddleware.cs:line 34\n   at Squidex.Domain.Apps.Entities.Contents.ContentCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Domain.Apps.Entities/Contents/ContentCommandMiddleware.cs:line 33\n   at Squidex.Infrastructure.Commands.GrainCommandMiddleware`2.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Infrastructure/Commands/GrainCommandMiddleware.cs:line 34\n   at Squidex.Domain.Apps.Entities.Assets.AssetCommandMiddleware.HandleCoreAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Domain.Apps.Entities/Assets/AssetCommandMiddleware.cs:line 134\n   at Squidex.Domain.Apps.Entities.Assets.AssetCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Domain.Apps.Entities/Assets/AssetCommandMiddleware.cs:line 124\n   at Squidex.Domain.Apps.Entities.Apps.Invitation.InviteUserCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InviteUserCommandMiddleware.cs:line 47\n   at Squidex.Web.CommandMiddlewares.EnrichWithSchemaIdCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Web/CommandMiddlewares/EnrichWithSchemaIdCommandMiddleware.cs:line 54\n   at Squidex.Web.CommandMiddlewares.ETagCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Web/CommandMiddlewares/ETagCommandMiddleware.cs:line 59\n   at Squidex.Infrastructure.Commands.InMemoryCommandBus.PublishAsync(ICommand command) in /src/src/Squidex.Infrastructure/Commands/InMemoryCommandBus.cs:line 42\n   at Squidex.Areas.Api.Controllers.Apps.AppsController.PostApp(CreateAppDto request) in /src/src/Squidex/Areas/Api/Controllers/Apps/AppsController.cs:line 96\n   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ExceptionContext context)\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()\n   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)\n   at NSwag.AspNetCore.Middlewares.SwaggerDocumentMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)\n   at Squidex.Web.Pipeline.EnforceHttpsMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in /src/src/Squidex.Web/Pipeline/EnforceHttpsMiddleware.cs:line 28\n   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass5_1.<<UseMiddlewareInterface>b__1>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n   at Squidex.Web.Pipeline.LocalCacheMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in /src/src/Squidex.Web/Pipeline/LocalCacheMiddleware.cs:line 30\n   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass5_1.<<UseMiddlewareInterface>b__1>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n   at Squidex.Web.Pipeline.RequestLogPerformanceMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in /src/src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs:line 33\n   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass5_1.<<UseMiddlewareInterface>b__1>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n   at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)"

Also in a CosmosDB I can see only Squidex collection without SquidexContent. Is it normal?

Version of Squidex is 3.0.0.0
Do you have any ideas what can be wrong?

1 Like

I don’t know, because you have not added the full log entry. Have you checked the SQL API support?

First part:

 {
   "logLevel": "Information",
   "message": "Starting IdentityServer4 version 2.4.0.0",
   "version": "2.4.0.0",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:51Z",
   "category": "IdentityServer4.Startup"
 }

 {
   "logLevel": "Information",
   "message": "Using the default authentication scheme Identity.Application for IdentityServer",
   "scheme": "Identity.Application",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:51Z",
   "category": "IdentityServer4.Startup"
 }

 {
   "logLevel": "Information",
   "action": "pluginsLoaded",
   "status": "Completed",
   "errors": [],
   "plugins": [
     "Squidex.Extensions.Samples.AssetStore.MemoryAssetStorePlugin",
     "Squidex.Extensions.Actions.Webhook.WebhookPlugin",
     "Squidex.Extensions.Actions.Twitter.TwitterPlugin",
     "Squidex.Extensions.Actions.Slack.SlackPlugin",
     "Squidex.Extensions.Actions.Prerender.PrerenderPlugin",
     "Squidex.Extensions.Actions.Medium.MediumPlugin",
     "Squidex.Extensions.Actions.Fastly.FastlyPlugin",
     "Squidex.Extensions.Actions.Email.EmailPlugin",
     "Squidex.Extensions.Actions.ElasticSearch.ElasticSearchPlugin",
     "Squidex.Extensions.Actions.Discourse.DiscoursePlugin",
     "Squidex.Extensions.Actions.AzureQueue.AzureQueuePlugin",
     "Squidex.Extensions.Actions.Algolia.AlgoliaPlugin"
   ],
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:51Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "AzureBlobAssetStore",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:52Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "CosmosDbEventStore",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:52Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "LanguagesInitializer",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:52Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "SerializationInitializer",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:52Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "MongoMigrationStatus",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:52Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "MongoUsageRepository",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:52Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "MongoRuleEventRepository",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:53Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "MongoHistoryEventRepository",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:53Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "MongoRoleStore",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:53Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "MongoUserStore",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:53Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "MongoAssetRepository",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:53Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "MongoContentRepository",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:53Z"
 }

 {
   "logLevel": "Information",
   "initializedSystem": "MongoPersistedGrantStore",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:53Z"
 }

 {
   "logLevel": "Information",
   "filters": {
     "costs": 0.0
   },
   "elapsedRequestMs": 166,
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "8a16d1d9-b1f5-428a-9b25-75513ec8658c",
     "requestPath": "/robots933456.txt",
     "requestMethod": "GET"
   },
   "timestamp": "*:53Z"
 }

 {
   "logLevel": "Warning",
   "message": "Task [Id=1, Status=RanToCompletion] in WorkGroup [SystemTarget: S172.22.126.3:11111:301497590*stg/15/0000000f@S0000000f] took elapsed time 0:00:00.2322683 for execution, which is longer than 00:00:00.2000000. Running on thread System.Threading.Thread",
   "eventId": {
     "id": 101215
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:54Z",
   "category": "Orleans.Runtime.Scheduler *stg/15/0000000f.WorkItemGroup"
 }

 {
   "logLevel": "Information",
   "message": "Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryEndpoint for /.well-known/openid-configuration",
   "endpointType": "IdentityServer4.Endpoints.DiscoveryEndpoint",
   "url": "/.well-known/openid-configuration",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "c29a9be5-b0d5-4f60-a6e8-7b44a330f546",
     "requestPath": "/.well-known/openid-configuration",
     "requestMethod": "GET"
   },
   "timestamp": "*:55Z",
   "category": "IdentityServer4.Hosting.IdentityServerMiddleware"
 }

 {
   "logLevel": "Information",
   "filters": {
     "costs": 0.0
   },
   "elapsedRequestMs": 236,
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "c29a9be5-b0d5-4f60-a6e8-7b44a330f546",
     "requestPath": "/identity-server/.well-known/openid-configuration",
     "requestMethod": "GET"
   },
   "timestamp": "*:55Z"
 }

 {
   "logLevel": "Information",
   "message": "Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryKeyEndpoint for /.well-known/openid-configuration/jwks",
   "endpointType": "IdentityServer4.Endpoints.DiscoveryKeyEndpoint",
   "url": "/.well-known/openid-configuration/jwks",
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "fa64e1b3-2d5d-4ee3-9a44-3eaebf393eb2",
     "requestPath": "/.well-known/openid-configuration/jwks",
     "requestMethod": "GET"
   },
   "timestamp": "*:55Z",
   "category": "IdentityServer4.Hosting.IdentityServerMiddleware"
 }


 {
   "logLevel": "Information",
   "filters": {
     "costs": 0.0
   },
   "elapsedRequestMs": 43,
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "fa64e1b3-2d5d-4ee3-9a44-3eaebf393eb2",
     "requestPath": "/identity-server/.well-known/openid-configuration/jwks",
     "requestMethod": "GET"
   },
   "timestamp": "*:55Z"
 }

 {
   "logLevel": "Warning",
   "message": "AllActiveSilos SiloStatusOracle.GetApproximateSiloStatuses empty",
   "eventId": {
     "id": 100506
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "256f0966-3db9-4a2d-9519-cd43553d93f9",
     "requestPath": "/apps",
     "requestMethod": "POST",
     "routeValues": {
       "area": "Api",
       "action": "PostApp",
       "controller": "Apps"
     }
   },
   "timestamp": "*:55Z",
   "category": "Orleans.Runtime.Catalog"
 }

 {
   "logLevel": "Warning",
   "message": "AllActiveSilos SiloStatusOracle.GetApproximateSiloStatuses empty",
   "eventId": {
     "id": 100506
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "256f0966-3db9-4a2d-9519-cd43553d93f9",
     "requestPath": "/apps",
     "requestMethod": "POST",
     "routeValues": {
       "area": "Api",
       "action": "PostApp",
       "controller": "Apps"
     }
   },
   "timestamp": "*:56Z",
   "category": "Orleans.Runtime.Catalog"
 }
{
   "logLevel": "Information",
   "action": "ActivateDomainObject",
   "domainObjectType": "AppGrain",
   "domainObjectKey": "e96e2185-c7ee-4e6a-9752-fc072f8d3c72",
   "elapsedMs": 332,
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "256f0966-3db9-4a2d-9519-cd43553d93f9",
     "requestPath": "/apps",
     "requestMethod": "POST",
     "routeValues": {
       "area": "Api",
       "action": "PostApp",
       "controller": "Apps"
     }
   },
   "timestamp": "*:56Z"
 }

 {
   "logLevel": "Error",
   "message": "Lifecycle start canceled due to errors at stage 2000",
   "eventId": {
     "id": 100450
   },
   "exception": {
     "type": "Microsoft.Azure.Documents.DocumentClientException",
     "message": "Sql api is not supported for this database account\r\nActivityId: db0eb205-bbae-446c-8259-6768c5ed9e5e, Microsoft.Azure.Documents.Common/2.4.0.0, Linux/3.8.4 documentdb-netcore-sdk/2.4.0",
     "stackTrace": "   at Microsoft.Azure.Documents.GatewayStoreClient.ParseResponseAsync(HttpResponseMessage responseMessage, JsonSerializerSettings serializerSettings, DocumentServiceRequest request)\n   at Microsoft.Azure.Documents.GatewayStoreClient.InvokeAsync(DocumentServiceRequest request, ResourceType resourceType, Uri physicalAddress, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.GatewayStoreModel.ProcessMessageAsync(DocumentServiceRequest request, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Client.DocumentClient.ProcessRequestAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.ExecuteQueryRequestInternalAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.ExecuteQueryRequestAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.ExecuteOnceAsync(IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.<>c__DisplayClass8_0.<<ExecuteInternalAsync>b__0>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n   at Microsoft.Azure.Documents.BackoffRetryUtility`1.ExecuteRetryAsync(Func`1 callbackMethod, Func`3 callShouldRetry, Func`1 inBackoffAlternateCallbackMethod, TimeSpan minBackoffForInBackoffCallback, CancellationToken cancellationToken, Action`1 preRetryCallback)\n   at Microsoft.Azure.Documents.ShouldRetryResult.ThrowIfDoneTrying(ExceptionDispatchInfo capturedException)\n   at Microsoft.Azure.Documents.BackoffRetryUtility`1.ExecuteRetryAsync(Func`1 callbackMethod, Func`3 callShouldRetry, Func`1 inBackoffAlternateCallbackMethod, TimeSpan minBackoffForInBackoffCallback, CancellationToken cancellationToken, Action`1 preRetryCallback)\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.ExecuteInternalAsync(CancellationToken token)\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.ExecuteNextAsync(CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.ProxyDocumentQueryExecutionContext.ExecuteNextAsync(CancellationToken token)\n   at Microsoft.Azure.Documents.Linq.DocumentQuery`1.ExecuteNextPrivateAsync[TResponse](CancellationToken cancellationToken)\n   at Squidex.Infrastructure.EventSourcing.FilterExtensions.QueryAsync[T](IQueryable`1 queryable, Func`2 handler, CancellationToken ct)\n   at Squidex.Infrastructure.EventSourcing.CosmosDbEventStore.QueryAsync(String streamName, Int64 streamPosition) in /src/src/Squidex.Infrastructure.Azure/EventSourcing/CosmosDbEventStore_Reader.cs:line 75\n   at Squidex.Infrastructure.States.Persistence`2.ReadEventsAsync() in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 106\n   at Squidex.Infrastructure.States.Persistence`2.ReadAsync(Int64 expectedVersion) in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 66\n   at Squidex.Infrastructure.Commands.DomainObjectGrainBase`1.OnActivateAsync(Guid key) in /src/src/Squidex.Infrastructure/Commands/DomainObjectGrainBase.cs:line 61\n   at Orleans.LifecycleSubject.WrapExecution(CancellationToken ct, Func`2 action)\n   at Orleans.LifecycleSubject.OnStart(CancellationToken ct)"
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "256f0966-3db9-4a2d-9519-cd43553d93f9",
     "requestPath": "/apps",
     "requestMethod": "POST",
     "routeValues": {
       "area": "Api",
       "action": "PostApp",
       "controller": "Apps"
     }
   },
   "timestamp": "*:56Z",
   "category": "Orleans.LifecycleSubject"
 }

 {
   "logLevel": "Error",
   "message": "Error calling grain's OnActivateAsync() method - Grain type = Squidex.Domain.Apps.Entities.Apps.AppGrain Activation = [Activation: S172.22.126.3:11111:301497590*grn/16D28AEC/07fc5297@5e3989b3 #GrainType=Squidex.Domain.Apps.Entities.Apps.AppGrain Placement=RandomPlacement State=Activating]",
   "eventId": {
     "id": 100513
   },
   "exception": {
     "type": "Orleans.Runtime.OrleansLifecycleCanceledException",
     "message": "Lifecycle start canceled due to errors at stage 2000",
     "stackTrace": "   at Orleans.LifecycleSubject.OnStart(CancellationToken ct)\n   at Orleans.Runtime.Catalog.CallGrainActivate(ActivationData activation, Dictionary`2 requestContextData)"
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "256f0966-3db9-4a2d-9519-cd43553d93f9",
     "requestPath": "/apps",
     "requestMethod": "POST",
     "routeValues": {
       "area": "Api",
       "action": "PostApp",
       "controller": "Apps"
     }
   },
   "timestamp": "*:56Z",
   "category": "Orleans.Runtime.Catalog"
 }

 {
   "logLevel": "Warning",
   "message": "Failed to InvokeActivate for [Activation: S172.22.126.3:11111:301497590*grn/16D28AEC/07fc5297@5e3989b3 #GrainType=Squidex.Domain.Apps.Entities.Apps.AppGrain Placement=RandomPlacement State=Invalid].",
   "eventId": {
     "id": 100534
   },
   "exception": {
     "type": "Microsoft.Azure.Documents.DocumentClientException",
     "message": "Sql api is not supported for this database account\r\nActivityId: db0eb205-bbae-446c-8259-6768c5ed9e5e, Microsoft.Azure.Documents.Common/2.4.0.0, Linux/3.8.4 documentdb-netcore-sdk/2.4.0",
     "stackTrace": "   at Microsoft.Azure.Documents.GatewayStoreClient.ParseResponseAsync(HttpResponseMessage responseMessage, JsonSerializerSettings serializerSettings, DocumentServiceRequest request)\n   at Microsoft.Azure.Documents.GatewayStoreClient.InvokeAsync(DocumentServiceRequest request, ResourceType resourceType, Uri physicalAddress, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.GatewayStoreModel.ProcessMessageAsync(DocumentServiceRequest request, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Client.DocumentClient.ProcessRequestAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.ExecuteQueryRequestInternalAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.ExecuteQueryRequestAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.ExecuteOnceAsync(IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.<>c__DisplayClass8_0.<<ExecuteInternalAsync>b__0>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n   at Microsoft.Azure.Documents.BackoffRetryUtility`1.ExecuteRetryAsync(Func`1 callbackMethod, Func`3 callShouldRetry, Func`1 inBackoffAlternateCallbackMethod, TimeSpan minBackoffForInBackoffCallback, CancellationToken cancellationToken, Action`1 preRetryCallback)\n   at Microsoft.Azure.Documents.ShouldRetryResult.ThrowIfDoneTrying(ExceptionDispatchInfo capturedException)\n   at Microsoft.Azure.Documents.BackoffRetryUtility`1.ExecuteRetryAsync(Func`1 callbackMethod, Func`3 callShouldRetry, Func`1 inBackoffAlternateCallbackMethod, TimeSpan minBackoffForInBackoffCallback, CancellationToken cancellationToken, Action`1 preRetryCallback)\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.ExecuteInternalAsync(CancellationToken token)\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.ExecuteNextAsync(CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.ProxyDocumentQueryExecutionContext.ExecuteNextAsync(CancellationToken token)\n   at Microsoft.Azure.Documents.Linq.DocumentQuery`1.ExecuteNextPrivateAsync[TResponse](CancellationToken cancellationToken)\n   at Squidex.Infrastructure.EventSourcing.FilterExtensions.QueryAsync[T](IQueryable`1 queryable, Func`2 handler, CancellationToken ct)\n   at Squidex.Infrastructure.EventSourcing.CosmosDbEventStore.QueryAsync(String streamName, Int64 streamPosition) in /src/src/Squidex.Infrastructure.Azure/EventSourcing/CosmosDbEventStore_Reader.cs:line 75\n   at Squidex.Infrastructure.States.Persistence`2.ReadEventsAsync() in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 106\n   at Squidex.Infrastructure.States.Persistence`2.ReadAsync(Int64 expectedVersion) in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 66\n   at Squidex.Infrastructure.Commands.DomainObjectGrainBase`1.OnActivateAsync(Guid key) in /src/src/Squidex.Infrastructure/Commands/DomainObjectGrainBase.cs:line 61\n   at Orleans.LifecycleSubject.WrapExecution(CancellationToken ct, Func`2 action)\n   at Orleans.LifecycleSubject.OnStart(CancellationToken ct)\n   at Orleans.Runtime.Catalog.CallGrainActivate(ActivationData activation, Dictionary`2 requestContextData)\n   at Orleans.Runtime.Scheduler.AsyncClosureWorkItem.Execute()\n   at Orleans.Runtime.Catalog.InitActivation(ActivationData activation, String grainType, String genericArguments, Dictionary`2 requestContextData)"
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "256f0966-3db9-4a2d-9519-cd43553d93f9",
     "requestPath": "/apps",
     "requestMethod": "POST",
     "routeValues": {
       "area": "Api",
       "action": "PostApp",
       "controller": "Apps"
     }
   },
   "timestamp": "*:56Z",
   "category": "Orleans.Runtime.Catalog"
 }

 {
   "logLevel": "Information",
   "profiler": {
     "ExecuteAction": {
       "elapsedMsTotal": 1000,
       "elapsedMsAvg": 1000,
       "count": 1
     },
     "cosmosDbEventStore/QueryAsync": {
       "elapsedMsTotal": 273,
       "elapsedMsAvg": 273,
       "count": 1
     },
     "mongoSnapshotStore`2/ReadAsync": {
       "elapsedMsTotal": 151,
       "elapsedMsAvg": 75,
       "count": 2
     }
   },
   "filters": {
     "userId": "5d359b1f3d768300016b0a79",
     "clientId": "squidex-frontend",
     "costs": 1.0
   },
   "elapsedRequestMs": 2649,
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "256f0966-3db9-4a2d-9519-cd43553d93f9",
     "requestPath": "/api/apps",
     "requestMethod": "POST"
   },
   "timestamp": "*:56Z"
 }

 {
   "logLevel": "Error",
   "message": "Connection id \"0HLOEKT44G9IR\", Request id \"0HLOEKT44G9IR:00000001\": An unhandled exception was thrown by the application.",
   "eventId": {
     "id": 13,
     "name": "ApplicationError"
   },
   "connectionId": "0HLOEKT44G9IR",
   "traceIdentifier": "0HLOEKT44G9IR:00000001",
   "exception": {
     "type": "Microsoft.Azure.Documents.DocumentClientException",
     "message": "Sql api is not supported for this database account\r\nActivityId: db0eb205-bbae-446c-8259-6768c5ed9e5e, Microsoft.Azure.Documents.Common/2.4.0.0, Linux/3.8.4 documentdb-netcore-sdk/2.4.0",
     "stackTrace": "   at Microsoft.Azure.Documents.GatewayStoreClient.ParseResponseAsync(HttpResponseMessage responseMessage, JsonSerializerSettings serializerSettings, DocumentServiceRequest request)\n   at Microsoft.Azure.Documents.GatewayStoreClient.InvokeAsync(DocumentServiceRequest request, ResourceType resourceType, Uri physicalAddress, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.GatewayStoreModel.ProcessMessageAsync(DocumentServiceRequest request, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Client.DocumentClient.ProcessRequestAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.ExecuteQueryRequestInternalAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.ExecuteQueryRequestAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.ExecuteOnceAsync(IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.<>c__DisplayClass8_0.<<ExecuteInternalAsync>b__0>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n   at Microsoft.Azure.Documents.BackoffRetryUtility`1.ExecuteRetryAsync(Func`1 callbackMethod, Func`3 callShouldRetry, Func`1 inBackoffAlternateCallbackMethod, TimeSpan minBackoffForInBackoffCallback, CancellationToken cancellationToken, Action`1 preRetryCallback)\n   at Microsoft.Azure.Documents.ShouldRetryResult.ThrowIfDoneTrying(ExceptionDispatchInfo capturedException)\n   at Microsoft.Azure.Documents.BackoffRetryUtility`1.ExecuteRetryAsync(Func`1 callbackMethod, Func`3 callShouldRetry, Func`1 inBackoffAlternateCallbackMethod, TimeSpan minBackoffForInBackoffCallback, CancellationToken cancellationToken, Action`1 preRetryCallback)\n   at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.ExecuteInternalAsync(CancellationToken token)\n   at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextBase.ExecuteNextAsync(CancellationToken cancellationToken)\n   at Microsoft.Azure.Documents.Query.ProxyDocumentQueryExecutionContext.ExecuteNextAsync(CancellationToken token)\n   at Microsoft.Azure.Documents.Linq.DocumentQuery`1.ExecuteNextPrivateAsync[TResponse](CancellationToken cancellationToken)\n   at Squidex.Infrastructure.EventSourcing.FilterExtensions.QueryAsync[T](IQueryable`1 queryable, Func`2 handler, CancellationToken ct)\n   at Squidex.Infrastructure.EventSourcing.CosmosDbEventStore.QueryAsync(String streamName, Int64 streamPosition) in /src/src/Squidex.Infrastructure.Azure/EventSourcing/CosmosDbEventStore_Reader.cs:line 75\n   at Squidex.Infrastructure.States.Persistence`2.ReadEventsAsync() in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 106\n   at Squidex.Infrastructure.States.Persistence`2.ReadAsync(Int64 expectedVersion) in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 66\n   at Squidex.Infrastructure.Commands.DomainObjectGrainBase`1.OnActivateAsync(Guid key) in /src/src/Squidex.Infrastructure/Commands/DomainObjectGrainBase.cs:line 61\n   at Orleans.LifecycleSubject.WrapExecution(CancellationToken ct, Func`2 action)\n   at Orleans.LifecycleSubject.OnStart(CancellationToken ct)\n   at Orleans.Runtime.Catalog.CallGrainActivate(ActivationData activation, Dictionary`2 requestContextData)\n   at Orleans.Runtime.Scheduler.AsyncClosureWorkItem.Execute()\n   at Orleans.Runtime.Catalog.InitActivation(ActivationData activation, String grainType, String genericArguments, Dictionary`2 requestContextData)\n   at Orleans.OrleansTaskExtentions.<ToTypedTask>g__ConvertAsync|4_0[T](Task`1 asyncTask)\n   at Squidex.Infrastructure.Commands.GrainCommandMiddleware`2.ExecuteCommandAsync(TCommand typedCommand) in /src/src/Squidex.Infrastructure/Commands/GrainCommandMiddleware.cs:line 41\n   at Squidex.Infrastructure.Commands.GrainCommandMiddleware`2.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Infrastructure/Commands/GrainCommandMiddleware.cs:line 29\n   at Squidex.Domain.Apps.Entities.Apps.Indexes.AppsByNameIndexCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsByNameIndexCommandMiddleware.cs:line 50\n   at Squidex.Domain.Apps.Entities.Apps.Indexes.AppsByNameIndexCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Domain.Apps.Entities/Apps/Indexes/AppsByNameIndexCommandMiddleware.cs:line 66\n   at Squidex.Infrastructure.Commands.GrainCommandMiddleware`2.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Infrastructure/Commands/GrainCommandMiddleware.cs:line 34\n   at Squidex.Domain.Apps.Entities.Contents.ContentCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Domain.Apps.Entities/Contents/ContentCommandMiddleware.cs:line 33\n   at Squidex.Infrastructure.Commands.GrainCommandMiddleware`2.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Infrastructure/Commands/GrainCommandMiddleware.cs:line 34\n   at Squidex.Domain.Apps.Entities.Assets.AssetCommandMiddleware.HandleCoreAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Domain.Apps.Entities/Assets/AssetCommandMiddleware.cs:line 134\n   at Squidex.Domain.Apps.Entities.Assets.AssetCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Domain.Apps.Entities/Assets/AssetCommandMiddleware.cs:line 124\n   at Squidex.Domain.Apps.Entities.Apps.Invitation.InviteUserCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Domain.Apps.Entities/Apps/Invitation/InviteUserCommandMiddleware.cs:line 47\n   at Squidex.Web.CommandMiddlewares.EnrichWithSchemaIdCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Web/CommandMiddlewares/EnrichWithSchemaIdCommandMiddleware.cs:line 54\n   at Squidex.Web.CommandMiddlewares.ETagCommandMiddleware.HandleAsync(CommandContext context, Func`1 next) in /src/src/Squidex.Web/CommandMiddlewares/ETagCommandMiddleware.cs:line 59\n   at Squidex.Infrastructure.Commands.InMemoryCommandBus.PublishAsync(ICommand command) in /src/src/Squidex.Infrastructure/Commands/InMemoryCommandBus.cs:line 42\n   at Squidex.Areas.Api.Controllers.Apps.AppsController.PostApp(CreateAppDto request) in /src/src/Squidex/Areas/Api/Controllers/Apps/AppsController.cs:line 96\n   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ExceptionContext context)\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()\n   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)\n   at NSwag.AspNetCore.Middlewares.SwaggerDocumentMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)\n   at Squidex.Web.Pipeline.EnforceHttpsMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in /src/src/Squidex.Web/Pipeline/EnforceHttpsMiddleware.cs:line 28\n   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass5_1.<<UseMiddlewareInterface>b__1>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n   at Squidex.Web.Pipeline.LocalCacheMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in /src/src/Squidex.Web/Pipeline/LocalCacheMiddleware.cs:line 30\n   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass5_1.<<UseMiddlewareInterface>b__1>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n   at Squidex.Web.Pipeline.RequestLogPerformanceMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in /src/src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs:line 33\n   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass5_1.<<UseMiddlewareInterface>b__1>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n   at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)"
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "web": {
     "requestId": "256f0966-3db9-4a2d-9519-cd43553d93f9",
     "requestPath": "/api/apps",
     "requestMethod": "POST"
   },
   "timestamp": "*:56Z",
   "category": "Microsoft.AspNetCore.Server.Kestrel"
 }

 {
   "logLevel": "Warning",
   "message": "AllActiveSilos SiloStatusOracle.GetApproximateSiloStatuses empty",
   "eventId": {
     "id": 100506
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:57Z",
   "category": "Orleans.Runtime.Catalog"
 }

 {
   "logLevel": "Warning",
   "message": "AllActiveSilos SiloStatusOracle.GetApproximateSiloStatuses empty",
   "eventId": {
     "id": 100506
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:58Z",
   "category": "Orleans.Runtime.Catalog"
 }

 {
   "logLevel": "Error",
   "action": "GrainInvoked",
   "status": "Failed",
   "grain": "Orleans.Runtime.Management.ManagementGrain",
   "grainMethod": "System.Threading.Tasks.Task`1[System.Int32] GetTotalActivationCount()",
   "exception": {
     "type": "System.NullReferenceException",
     "message": "Object reference not set to an instance of an object.",
     "stackTrace": "   at Orleans.Runtime.MembershipService.SystemTargetBasedMembershipTable.ReadAll()\n   at Orleans.Runtime.Management.ManagementGrain.GetHosts(Boolean onlyActive)\n   at Orleans.Runtime.Management.ManagementGrain.GetTotalActivationCount()\n   at Orleans.Runtime.OrleansCodeGenManagementGrainMethodInvoker.Invoke(IAddressable grain, InvokeMethodRequest request)\n   at Orleans.Runtime.GrainMethodInvoker.Invoke()\n   at OrleansDashboard.Metrics.GrainProfiler.Invoke(IIncomingGrainCallContext context)\n   at Orleans.Runtime.GrainMethodInvoker.Invoke()\n   at Squidex.Infrastructure.Orleans.LoggingFilter.Invoke(IIncomingGrainCallContext context) in /src/src/Squidex.Infrastructure/Orleans/LoggingFilter.cs:line 30"
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:58Z"
 }

 {
   "logLevel": "Error",
   "action": "GrainInvoked",
   "status": "Failed",
   "grain": "Orleans.Runtime.Management.ManagementGrain",
   "grainMethod": "System.Threading.Tasks.Task`1[Orleans.Runtime.SimpleGrainStatistic[]] GetSimpleGrainStatistics()",
   "exception": {
     "type": "System.NullReferenceException",
     "message": "Object reference not set to an instance of an object.",
     "stackTrace": "   at Orleans.Runtime.MembershipService.SystemTargetBasedMembershipTable.ReadAll()\n   at Orleans.Runtime.Management.ManagementGrain.GetHosts(Boolean onlyActive)\n   at Orleans.Runtime.Management.ManagementGrain.GetSimpleGrainStatistics()\n   at Orleans.Runtime.OrleansCodeGenManagementGrainMethodInvoker.Invoke(IAddressable grain, InvokeMethodRequest request)\n   at Orleans.Runtime.GrainMethodInvoker.Invoke()\n   at OrleansDashboard.Metrics.GrainProfiler.Invoke(IIncomingGrainCallContext context)\n   at Orleans.Runtime.GrainMethodInvoker.Invoke()\n   at Squidex.Infrastructure.Orleans.LoggingFilter.Invoke(IIncomingGrainCallContext context) in /src/src/Squidex.Infrastructure/Orleans/LoggingFilter.cs:line 30"
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:58Z"
 }

 {
   "logLevel": "Error",
   "action": "GrainInvoked",
   "status": "Failed",
   "grain": "Orleans.Runtime.Management.ManagementGrain",
   "grainMethod": "System.Threading.Tasks.Task`1[Orleans.MembershipEntry[]] GetDetailedHosts(Boolean)",
   "exception": {
     "type": "System.NullReferenceException",
     "message": "Object reference not set to an instance of an object.",
     "stackTrace": "   at Orleans.Runtime.MembershipService.SystemTargetBasedMembershipTable.ReadAll()\n   at Orleans.Runtime.Management.ManagementGrain.GetDetailedHosts(Boolean onlyActive)\n   at Orleans.Runtime.OrleansCodeGenManagementGrainMethodInvoker.Invoke(IAddressable grain, InvokeMethodRequest request)\n   at Orleans.Runtime.GrainMethodInvoker.Invoke()\n   at OrleansDashboard.Metrics.GrainProfiler.Invoke(IIncomingGrainCallContext context)\n   at Orleans.Runtime.GrainMethodInvoker.Invoke()\n   at Squidex.Infrastructure.Orleans.LoggingFilter.Invoke(IIncomingGrainCallContext context) in /src/src/Squidex.Infrastructure/Orleans/LoggingFilter.cs:line 30"
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:58Z"
 }

 {
   "logLevel": "Error",
   "message": "Caught and ignored exception: System.NullReferenceException with message: Object reference not set to an instance of an object. thrown from timer callback GrainTimer. TimerCallbackHandler:OrleansDashboard.DashboardGrain->System.Threading.Tasks.Task Callback(System.Object)",
   "eventId": {
     "id": 101413
   },
   "exception": {
     "type": "System.NullReferenceException",
     "message": "Object reference not set to an instance of an object.",
     "stackTrace": "   at Orleans.Runtime.MembershipService.SystemTargetBasedMembershipTable.ReadAll()\n   at Orleans.Runtime.Management.ManagementGrain.GetHosts(Boolean onlyActive)\n   at Orleans.Runtime.Management.ManagementGrain.GetTotalActivationCount()\n   at Orleans.Runtime.OrleansCodeGenManagementGrainMethodInvoker.Invoke(IAddressable grain, InvokeMethodRequest request)\n   at Orleans.Runtime.GrainMethodInvoker.Invoke()\n   at OrleansDashboard.Metrics.GrainProfiler.Invoke(IIncomingGrainCallContext context)\n   at Orleans.Runtime.GrainMethodInvoker.Invoke()\n   at Squidex.Infrastructure.Orleans.LoggingFilter.Invoke(IIncomingGrainCallContext context) in /src/src/Squidex.Infrastructure/Orleans/LoggingFilter.cs:line 30\n   at Orleans.Runtime.GrainMethodInvoker.Invoke()\n   at Squidex.Infrastructure.Orleans.LocalCacheFilter.Invoke(IIncomingGrainCallContext context) in /src/src/Squidex.Infrastructure/Orleans/LocalCacheFilter.cs:line 37\n   at Orleans.Runtime.GrainMethodInvoker.Invoke()\n   at Orleans.Runtime.InsideRuntimeClient.Invoke(IAddressable target, IInvokable invokable, Message message)\n   at Orleans.OrleansTaskExtentions.<ToTypedTask>g__ConvertAsync|4_0[T](Task`1 asyncTask)\n   at OrleansDashboard.DashboardGrain.Callback(Object _)\n   at Orleans.Runtime.GrainTimer.ForwardToAsyncCallback(Object state)"
   },
   "app": {
     "name": "Squidex",
     "version": "3.0.0.0",
     "sessionId": "bbab448c-6805-4ce3-83b4-19367c17a91d"
   },
   "timestamp": "*:58Z",
   "category": "Orleans.Runtime.GrainTimer"
 }

I also use DocumentDB for the event store and use another API for that.

I’ve tried to setup EVENTSTORE configuration to the same as for STORE__MONGODB__CONFIGURATION property and it has started to work, but with some weird errors in the log (MongoDb connection failed to connect to database Squidex) and restarting the container .
Also, I’ve tried separate CosmosDb database with SQL API for EVENTSTORE. The result is the same: it works with errors (MongoDb connection failed to connect to database Squidex) and restarting the container.

The idea of using CosmosDB (Azure Cosmos DB for MongoDB API) instead of MongoDB is not the best idea I think.

I will have a closer look this afternoon or tomorrow, but I got it working properly and it was relatively easy.

But I agree that CosmosDB might not be the best option, but primarily because of the costs. It is very easy to fuck up the configuration and get a bill for 400€ / months for an empty database. It actually happened twice for me.

But the CosmosDB support was a user request and I also like the idea of having not to care about the database. My own perspective is that with Kubernetes it is very easy to decouple your infrastructure from the cloud provider and I would do this whenever possible.

Hi Guys - Ive just started with squidex and really liking it so far! I created a site in azure using the latest guidelines with a mongo container and that worked really well - however I’m now trying to change this to cosmosDb (a project requirement) and am facing the same issues as above with various errors occuring and the container restarting. This is my config:

[
  {
    "name": "ASSETSTORE__AZUREBLOB__CONNECTIONSTRING",
    "value": "[connection_string]",
    "slotSetting": false
  },
  {
    "name": "ASSETSTORE__AZUREBLOB__CONTAINERNAME",
    "value": "etc-squidex-assets",
    "slotSetting": false
  },
  {
    "name": "ASSETSTORE__TYPE",
    "value": "AzureBlob",
    "slotSetting": false
  },
  {
    "name": "DOCKER_REGISTRY_SERVER_PASSWORD",
    "value": "",
    "slotSetting": false
  },
  {
    "name": "DOCKER_REGISTRY_SERVER_URL",
    "value": "https://index.docker.io",
    "slotSetting": false
  },
  {
    "name": "DOCKER_REGISTRY_SERVER_USERNAME",
    "value": "",
    "slotSetting": false
  },
  {
    "name": "EVENTSTORE__COSMOSDB__CONFIGURATION",
    "value": "https://*.documents.azure.com",
    "slotSetting": false
  },
  {
    "name": "EVENTSTORE__COSMOSDB__MASTERKEY",
    "value": "[master_key]",
    "slotSetting": false
  },
  {
    "name": "EVENTSTORE__COSMOSDB__DATABASE",
    "value": "Squidex",
    "slotSetting": false
  },
  {
    "name": "EVENTSTORE__DATABASE",
    "value": "Squidex",
    "slotSetting": false
  },
  {
    "name": "EVENTSTORE__TYPE",
    "value": "CosmosDb",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__ADMINEMAIL",
    "value": "[admin_email]",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__ADMINPASSWORD",
    "value": "[identity_password]",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__GITHUBCLIENT",
    "value": "",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__GITHUBSECRET",
    "value": "",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__GOOGLECLIENT",
    "value": "",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__GOOGLESECRET",
    "value": "",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__MICROSOFTCLIENT",
    "value": "",
    "slotSetting": false
  },
  {
    "name": "IDENTITY__MICROSOFTSECRET",
    "value": "",
    "slotSetting": false
  },
  {
    "name": "STORE__MONGODB__CONFIGURATION",
    "value": "[cosmos_conn_string]",
    "slotSetting": false
  },
  {
    "name": "STORE__MONGODB__ENGINE",
    "value": "CosmosDb",
    "slotSetting": false
  },
  {
    "name": "URLS__BASEURL",
    "value": "https://[app_name].azurewebsites.net/",
    "slotSetting": false
  },
  {
    "name": "VIRTUAL_HOST",
    "value": "[app_name].azurewebsites.net",
    "slotSetting": false
  },
  {
    "name": "WEBSITE_HTTPLOGGING_RETENTION_DAYS",
    "value": "10",
    "slotSetting": false
  }
]

This is an example of one of the errors I get before it restarts.

If you have any ideas that would be great!

Thanks

Sebastian

Hi,

here is the first iteration of the tutorial. The reason why we have removed the docs for CosmosDB ist that the costs can easily explode and it is not easy to setup CosmosDB correctly.

@Sebastian thanks so much for your time! I really appreciate it. I have followed those instructions exactly (even the squidex version in the doc) and am still getting the same errors unfortunately. Here is the full log if that is helpful.

It is only one log entry, but your instance restarts a lot of times. What you get is that it cannot establish a connection to your cosmos server. Perhaps a networking issue or permission problem. Hard to say.

It’s odd because all the collections are there in cosmos and the login actually works intermittently. Do you think the error relating to the sql API not being available might be related?

Very strange. If you want we can have a session at around 8pm German time today or Monday.

One more detail from my experience:
I’ve tried several versions of squidex.

  • For Squidex 2.0.1 I had connections problems but Squidex and SquidexContent databases had been created.
  • For Squidex 3.0.0 I also had connection problems but only Squidex database had been created.

@Sebastian that would be great on Monday if possible.

1 Like

Yes, 8pm German Time.

We found out together that Microsoft has stopped the support for the Change Feed API for new databases and support for MongoDB is expected to be released in September:

I just thought that you could use a separate storage account for the event store. This should actually work.

I decided not to support CosmosDB at the moment. To keep the costs low the only good options is to define RUs per database. Otherwise each collection would cost around 24€ / month.

But with RUs per database you need a shard key for each collection and this is complicated as you have to change a lot of updates as well.

It would make sense to have an option to enable sharding but this is also a lof of effort and as I do not have a co-maintainer who runs a production system on CosmosDB I cannot guarantee that it will always work.

@Sebastian thanks for your help - makes sense.