-1

I have Robo 3T-1.3 installed on my ubuntu 16.4 LTS. It is showing me the following error:

`Cannot connect to the MongoDB at localhost:27017.

Error: Network is unreachable. Reason: couldn't connect to server localhost:27017, connection attempt failed: SocketException: Error connecting to localhost:27017 (127.0.0.1:27017) :: caused by :: Connection refused`

How to solve it?

Komal
  • 45
  • 8
  • First check that mongod process is running or not on your system by following command `ps aux | grep mongod`. – krishna Prasad Nov 05 '19 at 05:05
  • @krishnaPrasad , It is showing me this : komal 4923 0.0 0.0 14220 976 pts/4 S+ 10:36 0:00 grep --color=auto mongod – Komal Nov 05 '19 at 05:08
  • 2
    So your mongod process is not running that's why Robo 3T-1.3 is not able to connect with mongo on localhost. You can start mongod as `sudo systemctl start mongod` or you check how to start mongod on localhost. – krishna Prasad Nov 05 '19 at 05:12

1 Answers1

0

Firstly check your mongo status via this command.

sudo systemctl status mongod

OR

You can follow this link. https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04

Ankit Kumar Rajpoot
  • 5,188
  • 2
  • 38
  • 32
  • it is showing this output: mongod.service - MongoDB Database Server Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: https://docs.mongodb.org/manual – Komal Nov 05 '19 at 05:10
  • Hey thank you for help..I started mongod and issue got fixed. – Komal Nov 05 '19 at 05:15