Mongosh service error

mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.5.4

mongod service is running and can connect with mongo ipaddress:27017 but not by mongosh? Why is it?

its working as mongosh ipaddress:27017 not as mongosh 127.0.0.1:27017 ?

What is your bindIp value?
May be you are not allowing it to connect with localhost

HI @Ramachandra_Tummala this was able to fix by deleting the .sock file in /tmp folder. Many thnx