Failed to install on azure/ checked MongoDB cannot be pulled or connect

Hi Sebestian/

I follow to install Squidex on Azure but I find that the MongoDB instance cannot be created after performing the step 4/ Create the container instance, please find below logs for your information.

thanks for your help.

This just means that your Squidex instance cannot connect to your MongoDB instance. I would check first if MongoDB is running. But as mentioned in other threads: I am not providing concrete support for specific environments.

I am so closed to the completion of hosting on squidex now.
When I access the squidex admin page and click login, it pops up below error that I don’t understand.

and attach below logs I have found in squidex

{
  "logLevel": "Error",
  "message": "Caught and ignored exception: Squidex.Infrastructure.States.InconsistentStateException with message: Requested version 0, but found 42. thrown from timer callback GrainTimer. TimerCallbackHandler:Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain-\u003ESystem.Threading.Tasks.Task \u003COnActivateAsync\u003Eb__5_0(System.Object)",
  "eventId": {
    "id": 101413
  },
  "app": {
    "name": "Squidex",
    "version": "4.5.1.0",
    "sessionId": "2aa7c5c5-e188-4a80-a504-ebcb616d0592"
  },
  "timestamp": "2020-08-04T18:10:55Z",
  "category": "Orleans.Runtime.GrainTimer",
  "exception": {
    "type": "Squidex.Infrastructure.States.InconsistentStateException",
    "message": "Requested version 0, but found 42.",
    "stackTrace": "   at Squidex.Infrastructure.MongoDb.MongoExtensions.UpsertVersionedAsync[TEntity,TKey](IMongoCollection\u00601 collection, TKey key, Int64 oldVersion, Int64 newVersion, Func\u00602 updater) in /src/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoExtensions.cs:line 123\n   at Squidex.Infrastructure.States.MongoSnapshotStore\u00602.WriteAsync(TKey key, T value, Int64 oldVersion, Int64 newVersion) in /src/src/Squidex.Infrastructure.MongoDb/States/MongoSnapshotStore.cs:line 68\n   at Squidex.Infrastructure.States.Persistence\u00602.WriteSnapshotAsync(TSnapshot state) in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 143\n   at Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain.CheckUsagesAsync() in /src/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerGrain.cs:line 107\n   at Orleans.Runtime.GrainTimer.ForwardToAsyncCallback(Object state)"
  }
}

{
  "logLevel": "Error",
  "message": "Caught and ignored exception: Squidex.Infrastructure.States.InconsistentStateException with message: Requested version 0, but found 43. thrown from timer callback GrainTimer. TimerCallbackHandler:Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain-\u003ESystem.Threading.Tasks.Task \u003COnActivateAsync\u003Eb__5_0(System.Object)",
  "eventId": {
    "id": 101413
  },
  "app": {
    "name": "Squidex",
    "version": "4.5.1.0",
    "sessionId": "2aa7c5c5-e188-4a80-a504-ebcb616d0592"
  },
  "timestamp": "2020-08-04T18:20:55Z",
  "category": "Orleans.Runtime.GrainTimer",
  "exception": {
    "type": "Squidex.Infrastructure.States.InconsistentStateException",
    "message": "Requested version 0, but found 43.",
    "stackTrace": "   at Squidex.Infrastructure.MongoDb.MongoExtensions.UpsertVersionedAsync[TEntity,TKey](IMongoCollection\u00601 collection, TKey key, Int64 oldVersion, Int64 newVersion, Func\u00602 updater) in /src/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoExtensions.cs:line 123\n   at Squidex.Infrastructure.States.MongoSnapshotStore\u00602.WriteAsync(TKey key, T value, Int64 oldVersion, Int64 newVersion) in /src/src/Squidex.Infrastructure.MongoDb/States/MongoSnapshotStore.cs:line 68\n   at Squidex.Infrastructure.States.Persistence\u00602.WriteSnapshotAsync(TSnapshot state) in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 143\n   at Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain.CheckUsagesAsync() in /src/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerGrain.cs:line 107\n   at Orleans.Runtime.GrainTimer.ForwardToAsyncCallback(Object state)"
  }
}

{
  "logLevel": "Information",
  "filters": {
    "costs": 0
  },
  "elapsedRequestMs": 3,
  "app": {
    "name": "Squidex",
    "version": "4.5.1.0",
    "sessionId": "2aa7c5c5-e188-4a80-a504-ebcb616d0592"
  },
  "web": {
    "requestId": "|a7c6116e-4b3059eb7428d3de.",
    "requestPath": "/build/index.html",
    "requestMethod": "GET"
  },
  "timestamp": "2020-08-04T18:25:34Z"
}

Please format your logs correctly.

The invalid “redirect_uri” means that your base url config does not point to the used domain / URL.

The other exception means that you have probably deployed multiple nodes but clustering mode is not turned on (there is a setting in appSettings.json)

Thanks for your reply. Ok, so base url config does not point to the used domain/ URL
Do you mean my below variable (URL_BASEURL) doesnt set correctly?
config1
and what are the variables (VIRTUAL_HOST & SQUIDEX_DOMAIN) set for?
config2

The other exception means that you have probably deployed multiple nodes but clustering mode is not turned on (there is a setting in appSettings.json) <— yes, noted. It looks like controlled by environment.

"orleans": {
    /*
     * Define the clustering type.
     * 
     * Supported: MongoDB, Development
     */
    "clustering": "Development",
    /*
     * The port is used to share messages between all cluster members. Must be accessible within your cluster or network.
     */
    "siloPort": "11111",
    /*
     * The ports used by Orleans to connect to external clients. Not used.
     */
    "gatewayPort": "40000",
    /*
     * The advertised IP address. Usually not needed.
     */
    "ipAddress": ""
  },

But honestly, I adopt AKS approach for azure deployment. Like you previously said, I shouldn’t configure inside the Squidex container. How can I manage the configuration of this?? via the YAML deployment descriptor file ?

Have you read this? https://docs.squidex.io/01-getting-started/installation/configuration

And yes, I mean URL_BASEURL

Yes, thanks for your prompt reply.

Actually, I read from your reply of my similar post, you said
“SQUIDEX_DOMAIN must point to the actual domain, e.g. localhost or your custom domain. If localhost:80 is not available you need to map to another port.”

Then I have a question. can I setup like this below if actual domain isn’t available?

If so, is that mean I cannot remote access the Squidex admin portal using domain name. I can access it by the IP address like http://xxx.xxx.xxx.xxx:80/
Btw, what does VIRTUAL_HOST for?

VIRTUAL_HOST is for Nginx and LetsEncrypt containers. You don’t need them in Azure.

  • The lets encrypt sidecar scans all containers with such an environment variable and creates certs for them.
  • The nginx container scans all containers with such an environment variables and creates a proxy mapping to terminate https requests and forward http requests.

SQUIDEX_DOMAIN is not a setting, it is just a placeholder that is used in the combination with .env files.

But URLS__BASEURL must point to the same url where your Squidex installation is hosted. It is also described in the docs.

I used “http://localhost” as value for “URLS_BASEURL” now.
However, I check out the logs of Squidex and find below…

{
  "logLevel": "Error",
  "message": "Caught and ignored exception: Squidex.Infrastructure.States.InconsistentStateException with message: Requested version 120, but found 121. thrown from timer callback GrainTimer. TimerCallbackHandler:Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain-\u003ESystem.Threading.Tasks.Task \u003COnActivateAsync\u003Eb__5_0(System.Object)",
  "eventId": {
    "id": 101413
  },
  "app": {
    "name": "Squidex",
    "version": "4.5.1.0",
    "sessionId": "aaef14e6-9e14-4357-987d-d667664e3c10"
  },
  "timestamp": "2020-08-05T07:12:57Z",
  "category": "Orleans.Runtime.GrainTimer",
  "exception": {
    "type": "Squidex.Infrastructure.States.InconsistentStateException",
    "message": "Requested version 120, but found 121.",
    "stackTrace": "   at Squidex.Infrastructure.MongoDb.MongoExtensions.UpsertVersionedAsync[TEntity,TKey](IMongoCollection\u00601 collection, TKey key, Int64 oldVersion, Int64 newVersion, Func\u00602 updater) in /src/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoExtensions.cs:line 120\n   at Squidex.Infrastructure.States.MongoSnapshotStore\u00602.WriteAsync(TKey key, T value, Int64 oldVersion, Int64 newVersion) in /src/src/Squidex.Infrastructure.MongoDb/States/MongoSnapshotStore.cs:line 66\n   at Squidex.Infrastructure.States.Persistence\u00602.WriteSnapshotAsync(TSnapshot state) in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 139\n   at Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain.CheckUsagesAsync() in /src/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerGrain.cs:line 107\n   at Orleans.Runtime.GrainTimer.ForwardToAsyncCallback(Object state)"
  }
}

{
  "logLevel": "Error",
  "message": "Caught and ignored exception: Squidex.Infrastructure.States.InconsistentStateException with message: Requested version 120, but found 122. thrown from timer callback GrainTimer. TimerCallbackHandler:Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain-\u003ESystem.Threading.Tasks.Task \u003COnActivateAsync\u003Eb__5_0(System.Object)",
  "eventId": {
    "id": 101413
  },
  "app": {
    "name": "Squidex",
    "version": "4.5.1.0",
    "sessionId": "aaef14e6-9e14-4357-987d-d667664e3c10"
  },
  "timestamp": "2020-08-05T07:22:57Z",
  "category": "Orleans.Runtime.GrainTimer",
  "exception": {
    "type": "Squidex.Infrastructure.States.InconsistentStateException",
    "message": "Requested version 120, but found 122.",
    "stackTrace": "   at Squidex.Infrastructure.MongoDb.MongoExtensions.UpsertVersionedAsync[TEntity,TKey](IMongoCollection\u00601 collection, TKey key, Int64 oldVersion, Int64 newVersion, Func\u00602 updater) in /src/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoExtensions.cs:line 120\n   at Squidex.Infrastructure.States.MongoSnapshotStore\u00602.WriteAsync(TKey key, T value, Int64 oldVersion, Int64 newVersion) in /src/src/Squidex.Infrastructure.MongoDb/States/MongoSnapshotStore.cs:line 66\n   at Squidex.Infrastructure.States.Persistence\u00602.WriteSnapshotAsync(TSnapshot state) in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 139\n   at Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain.CheckUsagesAsync() in /src/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerGrain.cs:line 107\n   at Orleans.Runtime.GrainTimer.ForwardToAsyncCallback(Object state)"
  }
}

{
  "logLevel": "Error",
  "message": "Caught and ignored exception: Squidex.Infrastructure.States.InconsistentStateException with message: Requested version 120, but found 123. thrown from timer callback GrainTimer. TimerCallbackHandler:Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain-\u003ESystem.Threading.Tasks.Task \u003COnActivateAsync\u003Eb__5_0(System.Object)",
  "eventId": {
    "id": 101413
  },
  "app": {
    "name": "Squidex",
    "version": "4.5.1.0",
    "sessionId": "aaef14e6-9e14-4357-987d-d667664e3c10"
  },
  "timestamp": "2020-08-05T07:32:57Z",
  "category": "Orleans.Runtime.GrainTimer",
  "exception": {
    "type": "Squidex.Infrastructure.States.InconsistentStateException",
    "message": "Requested version 120, but found 123.",
    "stackTrace": "   at Squidex.Infrastructure.MongoDb.MongoExtensions.UpsertVersionedAsync[TEntity,TKey](IMongoCollection\u00601 collection, TKey key, Int64 oldVersion, Int64 newVersion, Func\u00602 updater) in /src/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoExtensions.cs:line 120\n   at Squidex.Infrastructure.States.MongoSnapshotStore\u00602.WriteAsync(TKey key, T value, Int64 oldVersion, Int64 newVersion) in /src/src/Squidex.Infrastructure.MongoDb/States/MongoSnapshotStore.cs:line 66\n   at Squidex.Infrastructure.States.Persistence\u00602.WriteSnapshotAsync(TSnapshot state) in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 139\n   at Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain.CheckUsagesAsync() in /src/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerGrain.cs:line 107\n   at Orleans.Runtime.GrainTimer.ForwardToAsyncCallback(Object state)"
  }
}

{
  "logLevel": "Information",
  "filters": {
    "costs": 0
  },
  "elapsedRequestMs": 223,
  "app": {
    "name": "Squidex",
    "version": "4.5.1.0",
    "sessionId": "aaef14e6-9e14-4357-987d-d667664e3c10"
  },
  "web": {
    "requestId": "|328d554e-4e7b2b621a37018c.",
    "requestPath": "/build/index.html",
    "requestMethod": "GET"
  },
  "timestamp": "2020-08-05T07:37:03Z"
}

{
  "logLevel": "Error",
  "message": "Caught and ignored exception: Squidex.Infrastructure.States.InconsistentStateException with message: Requested version 120, but found 124. thrown from timer callback GrainTimer. TimerCallbackHandler:Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain-\u003ESystem.Threading.Tasks.Task \u003COnActivateAsync\u003Eb__5_0(System.Object)",
  "eventId": {
    "id": 101413
  },
  "app": {
    "name": "Squidex",
    "version": "4.5.1.0",
    "sessionId": "aaef14e6-9e14-4357-987d-d667664e3c10"
  },
  "timestamp": "2020-08-05T07:42:57Z",
  "category": "Orleans.Runtime.GrainTimer",
  "exception": {
    "type": "Squidex.Infrastructure.States.InconsistentStateException",
    "message": "Requested version 120, but found 124.",
    "stackTrace": "   at Squidex.Infrastructure.MongoDb.MongoExtensions.UpsertVersionedAsync[TEntity,TKey](IMongoCollection\u00601 collection, TKey key, Int64 oldVersion, Int64 newVersion, Func\u00602 updater) in /src/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoExtensions.cs:line 120\n   at Squidex.Infrastructure.States.MongoSnapshotStore\u00602.WriteAsync(TKey key, T value, Int64 oldVersion, Int64 newVersion) in /src/src/Squidex.Infrastructure.MongoDb/States/MongoSnapshotStore.cs:line 66\n   at Squidex.Infrastructure.States.Persistence\u00602.WriteSnapshotAsync(TSnapshot state) in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 139\n   at Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain.CheckUsagesAsync() in /src/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerGrain.cs:line 107\n   at Orleans.Runtime.GrainTimer.ForwardToAsyncCallback(Object state)"
  }
}

{
  "logLevel": "Error",
  "message": "Caught and ignored exception: Squidex.Infrastructure.States.InconsistentStateException with message: Requested version 120, but found 125. thrown from timer callback GrainTimer. TimerCallbackHandler:Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain-\u003ESystem.Threading.Tasks.Task \u003COnActivateAsync\u003Eb__5_0(System.Object)",
  "eventId": {
    "id": 101413
  },
  "app": {
    "name": "Squidex",
    "version": "4.5.1.0",
    "sessionId": "aaef14e6-9e14-4357-987d-d667664e3c10"
  },
  "timestamp": "2020-08-05T07:52:57Z",
  "category": "Orleans.Runtime.GrainTimer",
  "exception": {
    "type": "Squidex.Infrastructure.States.InconsistentStateException",
    "message": "Requested version 120, but found 125.",
    "stackTrace": "   at Squidex.Infrastructure.MongoDb.MongoExtensions.UpsertVersionedAsync[TEntity,TKey](IMongoCollection\u00601 collection, TKey key, Int64 oldVersion, Int64 newVersion, Func\u00602 updater) in /src/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoExtensions.cs:line 120\n   at Squidex.Infrastructure.States.MongoSnapshotStore\u00602.WriteAsync(TKey key, T value, Int64 oldVersion, Int64 newVersion) in /src/src/Squidex.Infrastructure.MongoDb/States/MongoSnapshotStore.cs:line 66\n   at Squidex.Infrastructure.States.Persistence\u00602.WriteSnapshotAsync(TSnapshot state) in /src/src/Squidex.Infrastructure/States/Persistence{TSnapshot,TKey}.cs:line 139\n   at Squidex.Domain.Apps.Entities.Rules.UsageTracking.UsageTrackerGrain.CheckUsagesAsync() in /src/src/Squidex.Domain.Apps.Entities/Rules/UsageTracking/UsageTrackerGrain.cs:line 107\n   at Orleans.Runtime.GrainTimer.ForwardToAsyncCallback(Object state)"
  }
}

May I know what does the error stand for and suggest how do you suggest to fix it?
/ Is it a matter if I don’t use the actual domain (well or actually I do not own one but plan to assign one later) ??

Why localhost? I said it should be the same as your public domain!

Noted, i.e. I must need the public domain which point to the same url where Squidex installation is hosted/ for this case I host on MS AKS, that should be those pubic domain like XXXXXX.onmicrosoft.com.

Yes, but please format your code and logs using code blocks.

I do not understand and can I understand this way that “SQUIDEX_DOMAIN” is the same way that -->
URLS_BASEURL = http://{SQUIDEX_DOMAIN} ??

Yes, exactly, see: https://github.com/Squidex/squidex-docker/blob/master/standalone/docker-compose.yml#L16

I don’t know if it is a proper way to handle. I don’t have the public domain name, so I register a NO-IP address domain name like below, and then update the IP address pointing to that deployed squidex load balancer/


yet, it shows the logs below.

And what is URLS_BASEURL now?

It should be http://sithksh0.ddns.net