Mongodb Server Inactive autometically

Hello All,

i have installed mongo server on my computer, started the server, it shows ‘Active’, i have developed a spring boot project where i used Mongodb as database, i connected mongodb server from my projrct. i set
spring.data.mongodb.host=localhost
spring.data.mongodb.port=27017
spring.data.mongodb.database=mvdb
but when i run this the project from my computer, there EOF error occured.

please help me to resolve it

Hi @Alauddin_Tuhin and welcome in the MongoDB Community :muscle: !

First thing to determine before running into the Java code is: is the MongoDB server running correctly and can you connect to it using mongosh or the mongo shell?

If not, please try to find why and share the mongodb logs if you can’t find the issue.

If it’s all running fine and the issue comes from the Java + Spring Boot project, then have a look to this repo and try to compare because mine is connecting just fine. :slight_smile:

Cheers,
Maxime.

1 Like