Data nodes have not been found

Before you post: Your responses to these questions will help the community help you. Please complete this template if you’re asking a support question.
Don’t forget to select tags to help index your topic!

1. Describe your incident:
I have a fresh install of Graylog on Ubuntu 24. When I sign in for the preflight, “No data nodes have been found”, is being displayed.

2. Describe your environment:

  • OS Information: Ubuntu 24.04.2 LTS

  • Package Version: 6.3

  • Service logs, configurations, and environment variables:

2025-05-13T12:09:48.359-05:00 ERROR [CmdLineTool] Startup error:
com.google.inject.CreationException: Unable to create injector, see the following errors:

  1. [Guice/ErrorInjectingConstructor]: MongoTimeoutException: Timed out while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:2717, type=UNKNOWN, state=CONNECTING, exception={MongoSocketOpenException: Exception opening socket}, caused by {ConnectException: Connection refused}}]
    at MongoConnectionProvider.(MongoConnectionProvider.java:33)
    while locating MongoConnectionProvider
    at ClusterConfigServiceImpl.(ClusterConfigServiceImpl.java:65)
    _ for 2nd parameter
    while locating ClusterConfigServiceImpl
    at PreflightClusterConfigurationModule.configure(PreflightClusterConfigurationModule.java:37)
    while locating ClusterConfigService

Learn more:
ERROR_INJECTING_CONSTRUCTOR · google/guice Wiki · GitHub
Caused by: MongoTimeoutException: Timed out while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:2717, type=UNKNOWN, state=CONNECTING, exception={MongoSocketOpenException: Exception opening socket}, caused by {ConnectException: Connection refused}}]
at BaseCluster.logAndThrowTimeoutException(BaseCluster.java:427)
at BaseCluster.lambda$selectServer$0(BaseCluster.java:154)
at Timeout.lambda$onExistsAndExpired$16(Timeout.java:236)
at Timeout.lambda$run$10(Timeout.java:201)
at TimePoint.checkedCall(TimePoint.java:99)
at Timeout.call(Timeout.java:174)
at Timeout.run(Timeout.java:194)
at Timeout.onExistsAndExpired(Timeout.java:233)
at Timeout.onExpired(Timeout.java:226)
at BaseCluster.selectServer(BaseCluster.java:153)
at SingleServerCluster.selectServer(SingleServerCluster.java:47)
at ClusterBinding.getReadConnectionSource(ClusterBinding.java:82)
at ClientSessionBinding.getConnectionSource(ClientSessionBinding.java:108)
at ClientSessionBinding.getReadConnectionSource(ClientSessionBinding.java:88)
at SyncOperationHelper.withSuppliedResource(SyncOperationHelper.java:148)
at SyncOperationHelper.withSourceAndConnection(SyncOperationHelper.java:129)
at SyncOperationHelper.lambda$executeRetryableRead$4(SyncOperationHelper.java:195)
at SyncOperationHelper.lambda$decorateReadWithRetries$13(SyncOperationHelper.java:317)
at RetryingSyncSupplier.get(RetryingSyncSupplier.java:67)
at SyncOperationHelper.executeRetryableRead(SyncOperationHelper.java:201)
at SyncOperationHelper.executeRetryableRead(SyncOperationHelper.java:180)
at CommandReadOperation.execute(CommandReadOperation.java:52)
at MongoClusterImpl$OperationExecutorImpl.execute(MongoClusterImpl.java:424)
at DB.executeCommand(DB.java:523)
at DB.command(DB.java:455)
at DB.command(DB.java:471)
at DB.command(DB.java:413)
at MongoConnectionImpl.connect(MongoConnectionImpl.java:78)
at MongoConnectionProvider.(MongoConnectionProvider.java:38)
at MongoConnectionProvider$$FastClassByGuice$$1428305.GUICE$TRAMPOLINE()
at MongoConnectionProvider$$FastClassByGuice$$1428305.apply()
at DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
at ConstructorInjector.provision(ConstructorInjector.java:114)
at ConstructorInjector.construct(ConstructorInjector.java:91)
at ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
at BoundProviderFactory.get(BoundProviderFactory.java:58)
at SingleParameterInjector.inject(SingleParameterInjector.java:40)
at SingleParameterInjector.getAll(SingleParameterInjector.java:60)
at ConstructorInjector.provision(ConstructorInjector.java:113)
at ConstructorInjector.construct(ConstructorInjector.java:91)
at ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
at FactoryProxy.get(FactoryProxy.java:60)
at ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at SingletonScope$1.get(SingletonScope.java:169)
at InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:213)
at InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:186)
at InternalInjectorCreator.build(InternalInjectorCreator.java:113)
at Guice.createInjector(Guice.java:87)
at Guice.createInjector(Guice.java:69)
at Guice.createInjector(Guice.java:59)
at DatanodeBootstrap.getPreflightInjector(DatanodeBootstrap.java:86)
at DatanodeBootstrap.runPreFlightChecks(DatanodeBootstrap.java:82)
at DatanodeBootstrap.beforeInjectorCreation(DatanodeBootstrap.java:70)
at CmdLineTool.doRun(CmdLineTool.java:362)
at CmdLineTool.run(CmdLineTool.java:287)
at Main.main(Main.java:59)

  1. [Guice/ErrorInjectingConstructor]: MongoTimeoutException: Timed out while waiting for a server that matches WritableServerSelector. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:2717, type=UNKNOWN, state=CONNECTING, exception={MongoSocketOpenException: Exception opening socket}, caused by {ConnectException: Connection refused}}]
    at CertificateExchangeImpl.(CertificateExchangeImpl.java:78)
    while locating CertificateExchangeImpl
    at CsrRequesterImpl.(CsrRequesterImpl.java:55)
    _ for 4th parameter
    while locating CsrRequesterImpl
    at PreflightChecksBindings.configure(PreflightChecksBindings.java:51)
    while locating CsrRequester

L

3. What steps have you already taken to try and solve the problem?

I have restarted the system, restarted mongo, restarted graylog.

4. How can the community help?
Offer guidance on how to get my data node connected to graylog

Helpful Posting Tips: Tips for Posting Questions that Get Answers [Hold down CTRL and link on link to open tips documents in a separate tab]

Hey @fireball
Datanodes are registering itself via mongodb. From your stacktraces it seems that the connection to mongodb is misconfigured:

Timed out while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:2717, type=UNKNOWN, state=CONNECTING, exception={MongoSocketOpenException: Exception opening socket}, caused by {ConnectException: Connection refused}}]

Port 2717 seems like a typo. The default port is 27017. Please check both your datanode.conf and graylog.conf files and the mongodb connection string in them. If you are running all mongo, graylog-server and data node on one machine, fixing the port could be enough to get you running.

Be aware that it’s not a recommended setup to run all of these on one machine. The services will compete for resources, there is no failover, no clustering. It may be fine for initial testing and proof of concept, but in production environments you should have a cluster of 3+ mongo nodes, 3+ data nodes and 2+ server nodes.

Best regards,
Tomas

I appreciate the response and feedback. That was misconfigured along with something else. I eventually just started all the way back over and have it going now. Being a one-man team at a k12 school, I’m just utilizing hardware that is on hand and not in use. Eventually I will get the data-node service running on a separate machine. Thanks.

1 Like

Hey @fireball,
Nice to hear that everything is running for you now! Let me know if there is anything else problematic for your usage.

Best regards,
Tomas

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.