After encountering some naming errors, I decided to upgrade my MongoDB server from version 3.2 to 3.6. The 3.2 version was working perfectly fine for me until then.
I downloaded MongoDB 3.6 from https://www.mongodb.com/download-center/community, installed it using the package manager (sudo dpkg -i mongodb-org-server_3.6.12_amd64.deb), and verified the update by running mongod --version.
According to my knowledge, the system starts up without any issues, but when I try to run mongo or sudo mongo, I receive the following output:
MongoDB shell version: 3.2.22
connecting to: test
2019-05-14T13:28:09.049-0400 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: errno:111 Connection refused
2019-05-14T13:28:09.049-0400 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6
exception: connect failed
I have attempted to resolve this issue by restarting the service and even the entire Ubuntu 16.04 server where it's hosted, to no avail. Unfortunately, none of the solutions I found online were successful either. If you have a possible solution to this problem, please share it with me. Thank you!