Darren
Darren

Reputation: 792

embedded mongodb not starting with springboot?

While following a tutorial, I am using SPRING INITIALIZR https://start.spring.io/ to generate a project with reactiveMongoDB using springboot 2.0.2.

The gradle file lists: compile('org.springframework.boot:spring-boot-starter-data-mongodb-reactive')

I was able to import the project into eclipse, and the main class is using autoconfiguration.

The problem is that upon startup, I see the following (for some reason there are two log entries)

2018-05-25 13:26:29.624 INFO 4300 --- [ main] org.mongodb.driver.cluster : Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500} 2018-05-25 13:26:30.093 INFO 4300 --- [ main] org.mongodb.driver.cluster : Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}

but later, it fails to connect:

Connection refused: no further information: localhost/127.0.0.1:27017

Using a network tool, I see that the server never started up? I do not have a firewall running.

Can anyone suggest ways to troubleshoot this?

Upvotes: 1

Views: 664

Answers (1)

Darren
Darren

Reputation: 792

I figured it out - needed to add "Embedded MongoDB" to the list of packages.

Upvotes: 1

Related Questions