SocketException: Address already in use MONGODB

You already have a process running in the port 27017 which is used by mongodb. So either you need to stop the process in that port or try with different port number.

Try mongod --port 27018

You can change the port number of your choice.

EDIT:

You can also just stop all the running instances of mongo server using sudo killall mongod as mentioned by @Dassi Orleando in the comments. And run mongod

Leave a Comment