Cannot start due to mongodb error
See original GitHub issue"MongoDbTemplateRepository",
"MongoDbTopicRepository",
"MongoDbUserNotificationRepository",
"MongoDbUserRepository",
"MongoDbUserStore",
"MongoDbXmlRepository",
"MongoGridFsAssetStore",
"SchedulingConsumer\u00602",
"SchedulingConsumer\u00602",
"SchedulingProducer\u00601",
"SchedulingProducer\u00601",
"TimerScheduler(messaging)",
"TimerScheduler(mobilepush)",
"TimerScheduler(UserNotifications)",
"TimerScheduler(webhook)",
"TimerScheduler(webpush)",
"Providers(messaging)",
"Providers(mobilepush)",
"Providers(webhook)",
"Providers(webpush)",
"UserCreator",
"UserNotificationService"
], “timestamp”: “2022-01-19T06:20:59Z”, “severity”: “INFO” }
{ “logLevel”: “Information”, “initializedSystem”: “ValidationInitializer”, “timestamp”: “2022-01-19T06:20:59Z”, “severity”: “INFO” }
{ “logLevel”: “Information”, “initializedSystem”: “IntegrationManager”, “timestamp”: “2022-01-19T06:20:59Z”, “severity”: “INFO” }
Unhandled exception. Squidex.Hosting.Configuration.ConfigurationException: MongoDb connection failed to connect to database Notifications.
—> System.TimeoutException: A timeout occurred 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”, Type : “Unknown”, State : “Disconnected”, Servers : [{ ServerId: “{ ClusterId : 1, EndPoint : “Unspecified/localhost:27017” }”, EndPoint: “Unspecified/localhost:27017”, ReasonChanged: “Heartbeat”, State: “Disconnected”, ServerVersion: , TopologyVersion: , Type: “Unknown”, HeartbeatException: “MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server.
—> System.Net.Sockets.SocketException (99): Cannot assign requested address
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.CreateException(SocketError error, Boolean forAsyncThrow)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ConnectAsync(Socket socket)
at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP)
at MongoDB.Driver.Core.Connections.TcpStreamFactory.ConnectAsync(Socket socket, EndPoint endPoint, CancellationToken cancellationToken)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
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 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox
1.MoveNext(Thread threadPoolThread)
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task.FinishSlow(Boolean userDelegateExecute)
at System.Threading.Tasks.Task.TrySetException(Object exceptionObject)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.SetException(Exception exception, Task
1& taskField)
at MongoDB.Driver.Core.Connections.TcpStreamFactory.ConnectAsync(Socket socket, EndPoint endPoint, CancellationToken cancellationToken)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox
1.MoveNext(Thread threadPoolThread)
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task.FinishSlow(Boolean userDelegateExecute)
at System.Threading.Tasks.Task.TrySetException(Object exceptionObject)
at System.Threading.Tasks.ValueTask.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.InvokeContinuation(Action1 continuation, Object state, Boolean forceAsync, Boolean requiresExecutionContextFlow) at System.Net.Sockets.SocketAsyncContext.OperationQueue
1.ProcessSyncEventOrGetAsyncEvent(SocketAsyncContext context, Boolean skipAsyncEvents, Boolean processAsyncEvents)
at System.Net.Sockets.SocketAsyncContext.HandleEvents(SocketEvents events)
at System.Net.Sockets.SocketAsyncEngine.System.Threading.IThreadPoolWorkItem.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
— End of stack trace from previous location —
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.InitializeConnectionAsync(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Servers.ServerMonitor.HeartbeatAsync(CancellationToken cancellationToken)”, LastHeartbeatTimestamp: “2022-01-19T06:21:29.1065330Z”, LastUpdateTimestamp: “2022-01-19T06:21:29.1065334Z” }] }.
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.WaitForDescriptionChangedAsync(IServerSelector selector, ClusterDescription description, Task descriptionChangedTask, TimeSpan timeout, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Clusters.Cluster.SelectServerAsync(IServerSelector selector, CancellationToken cancellationToken)
at MongoDB.Driver.MongoClient.AreSessionsSupportedAfterSeverSelctionAsync(CancellationToken cancellationToken)
at MongoDB.Driver.MongoClient.AreSessionsSupportedAsync(CancellationToken cancellationToken)
at MongoDB.Driver.MongoClient.StartImplicitSessionAsync(CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl1.UsingImplicitSessionAsync[TResult](Func
2 funcAsync, CancellationToken cancellationToken)
at MongoDB.Driver.MongoIndexManagerBase1.CreateOneAsync(CreateIndexModel
1 model, CreateOneIndexOptions options, CancellationToken cancellationToken)
at Notifo.Domain.Apps.MongoDb.MongoDbAppRepository.SetupCollectionAsync(IMongoCollection1 collection, CancellationToken ct) in /src/src/Notifo.Domain/Apps/MongoDb/MongoDbAppRepository.cs:line 46 at Notifo.Infrastructure.MongoDb.MongoDbRepository
1.InitializeAsync(CancellationToken ct) in /src/src/Notifo.Infrastructure/MongoDb/MongoDbRepository.cs:line 96
— End of inner exception stack trace —
at Notifo.Infrastructure.MongoDb.MongoDbRepository`1.InitializeAsync(CancellationToken ct) in /src/src/Notifo.Infrastructure/MongoDb/MongoDbRepository.cs:line 102
at Squidex.Hosting.InitializerHost.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Notifo.Program.Main(String[] args) in /src/src/Notifo/Program.cs:line 19
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top GitHub Comments
yep works thanks
This one is correct: https://github.com/notifo-io/notifo/blob/main/deployment/docker-compose/docker-compose.yml
The env variable for mongodb should be: STORAGE__MONGODB__CONNECTIONSTRING