question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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.AsyncStateMachineBox1.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, Task1& 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.AsyncStateMachineBox1.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.OperationQueue1.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](Func2 funcAsync, CancellationToken cancellationToken) at MongoDB.Driver.MongoIndexManagerBase1.CreateOneAsync(CreateIndexModel1 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.MongoDbRepository1.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:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
heromiyocommented, Jan 19, 2022

yep works thanks

0reactions
SebastianStehlecommented, Jan 19, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR STARTING IN mongoDB SERVICES
This shows the config file that the mongod process will use. You will want to look at the contents of that file (...
Read more >
Cannot start MongoDB as a service
The explanation is that mongod.exe is exiting from a callback thread created by the Windows Service Control Manager when it calls us due...
Read more >
MongoDB service is not starting up - What to do
'MongoDB service is not starting up' problem may arise due to file permission or ownership issues or due to the lock file as...
Read more >
Cannot login with GUI in Unify Controler V1 nor cleanup or ...
I cannot start mongodb with. sudo service mongod start Failed to start mongod.service: Unit mongod.service not found. cloudkey: UCK.mtk7623.v1.1.19.f4a17b0.
Read more >
Rapid Recovery Mongo db does not start - Forum
The first thing I would try after stopping the mongod service would be renaming C:\ProgramData\AppRecovery\EventsDatabase to C:\ProgramData\AppRecovery\ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found