MongoDB not starting in ubuntu 22.04

I have installed mongodb in my ubuntu 22.04 system by following below steps
wget -qO – https://www.mongodb.org/static/pgp/server-3.6.asc | sudo apt-key add -;

echo “deb [ arch=amd64 ] MongoDB Repositories bionic/mongodb-org/3.6multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list;
apt-get update;
apt-get install -y mongodb-org;

But i am seeing the mongodb service is failed after giving command service mongod status

48 Returned by mongod or mongos when an error prevents a newly started instance from listening for incoming connections.

Do you have mongod running already or another service using port 27017 (or configured port in /etc/mongod.conf ?

1 Like