I have setup squidex and mongodb on docker(only http).
i am unable to setup squidex identity server.
i have cloned git repo on my docker node.
after that i have edited appsettings.json
{
/*
* Define the logging configuration.
*
* Read More: https://docs.microsoft.com/en-US/aspnet/core/fundamentals/logging/?view=aspnetcore-2.1
*/
"logging": {
"includeScopes": false,
"logLevel": {
"default": "Warning"
}
},
"store": {
/*
* Define the type of the read store.
*
* Supported: MongoDb
*/
"type": "MongoDb",
"mongoDb": {
/*
* The connection string to your Mongo Server.
*
* Read More: https://docs.mongodb.com/manual/reference/connection-string/
*/
"configuration": "mongodb://localhost:27017",
/*
* The database for all your other read collections.
*/
"database": "Squidex_Identity"
}
},
"defaultSettings": {
"emailConfirmationSubject": "[Squidex] Confirm your email address",
"emailConfirmationText": "Please click <a href=\"{URL}\">here</a> to confirm your email-address.",
"emailPasswordResetSubject": "[Squidex] Reset your password",
"emailPasswordResetText": "Please click <a href=\"{URL}\">here</a> to reset your password.",
"smtpServer": "in-v3.mailjet.com",
"smtpUsername": "",
"smtpPassword": "",
"smtpSender": "hello@squidex.io",
"siteName": "Squidex Identity"
},
"app": {
/*
* The url to your squidex server.
*/
"url": "http://squidex.centralus.cloudapp.azure.com",
/*
* The name of your app.
*/
"appName": "hcfg-fanapp",
/*
* Your client id.
*/
"clientId": "hcfg-fanapp:default",
/*
* Your client secret.
*/
"clientSecret": "e2rmrywifwxmithcey9pqpc6obocp5wk66xzlaghrxkx",
/*
* Comma separated list of cultures.
*/
"cultures": "en"
}
===========================================================
What should i do after this…??
root@squidex:~/squidex-identity# docker logs 4649e7d8504e
fail: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[48]
An error occurred while reading the key ring.
System.TimeoutException: A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "Automatic", Type : "Unknown", State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "Unspecified/squidex.centralus.cloudapp.azure.com:27017" }", EndPoint: "Unspecified/squidex.centralus.cloudapp.azure.com:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: Connection refused 13.86.112.188:27017
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.<>c.<ConnectAsync>b__271_0(IAsyncResult iar)
--- End of stack trace from previous location where exception was thrown ---
at MongoDB.Driver.Core.Connections.TcpStreamFactory.ConnectAsync(Socket socket, EndPoint endPoint, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Connections.TcpStreamFactory.CreateStreamAsync(EndPoint endPoint, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Connections.BinaryConnection.OpenHelperAsync(CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at MongoDB.Driver.Core.Connections.BinaryConnection.OpenHelperAsync(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Servers.ServerMonitor.HeartbeatAsync(CancellationToken cancellationToken)" }] }.
at MongoDB.Driver.Core.Clusters.Cluster.ThrowTimeoutException(IServerSelector selector, ClusterDescription description)
at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChangedHelper.HandleCompletedTask(Task completedTask)
at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChanged(IServerSelector selector, ClusterDescription description, Task descriptionChangedTask, TimeSpan timeout, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Clusters.Cluster.SelectServer(IServerSelector selector, CancellationToken cancellationToken)
at MongoDB.Driver.MongoClient.AreSessionsSupportedAfterServerSelection(CancellationToken cancellationToken)
at MongoDB.Driver.MongoClient.AreSessionsSupported(CancellationToken cancellationToken)
at MongoDB.Driver.OperationExecutor.StartImplicitSession(CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.UsingImplicitSession[TResult](Func`2 func, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.FindSync[TProjection](FilterDefinition`1 filter, FindOptions`2 options, CancellationToken cancellationToken)
at MongoDB.Driver.FindFluent`2.ToCursor(CancellationToken cancellationToken)
at MongoDB.Driver.IAsyncCursorSourceExtensions.ToList[TDocument](IAsyncCursorSource`1 source, CancellationToken cancellationToken)
at Squidex.Identity.Stores.MongoDb.MongoXmlRepository.GetAllElements() in /src/Squidex.Identity/Stores/MongoDb/MongoXmlRepository.cs:line 29
at Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.GetAllKeys()
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.CreateCacheableKeyRingCore(DateTimeOffset now, IKey keyJustAdded)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow)
Hi,
Please use code formatting for logs and configuration files.
Right know you also need a local MongoDB installation for identity server project and it cannot establish a connection to a localhost.27017
You can deploy identity in a similar way to squidex or just copy and paste the dockerfile and add squidex identity there and then adjust the connection string: