
# mongo
MongoDB shell version v3.6.8
connecting to: mongodb://127.0.0.1:27017
2022-04-08T13:16:33.543-0700 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2022-04-08T13:16:33.544-0700 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:257:13
@(connect):1:6
exception: connect failed
Reason:
The most common reason for Connection refused error when running the mongo command is that your mongod server is not running.
Solution:Run the mongod command to start the mongoDB server and then try the mongo command,
# mongod
2022-04-08T13:15:56.482-0700 I CONTROL [initandlisten] MongoDB starting : pid=5171 port=27017 dbpath=/data/db 64-bit host=b2391b608026
2022-04-08T13:15:56.482-0700 I CONTROL [initandlisten] db version v3.6.8
2022-04-08T13:15:56.482-0700 I CONTROL [initandlisten] git version: 8e540c0b6db93ce994cc548f000900bdc740f80a
2022-04-08T13:15:56.482-0700 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
..
..
2022-04-08T13:36:31.974-0700 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2022-04-08T13:36:31.975-0700 I NETWORK [initandlisten] waiting for connections on port 27017
# mongo
MongoDB shell version v3.6.8
connecting to: mongodb://127.0.0.1:27017
Implicit session: session { "id" : UUID("0e4156ce-070c-49a5-8bb9-fd43aae91bb1") }
MongoDB server version: 3.6.8
- Fix NVIDIA GeForce Experience ERROR CODE 0x0003
- How to convert byte array to String [Kotlin]
- Unzip a Zip file from Terminal Command
- How to write hello world different languages syntax
- [Error] zsh: command not found: mvn
- How to know the version of OpenSSL
- [Solution] IDEA IntelliJ System.out.println function shortcut (sysout alternative for eclipse IDE)
- The default username and password for RabbitMQ
- ChatGPT Outage: Hmm...something seems to have gone wrong. Maybe try me again in a little bit.
- How to check the version of NodeJS installed
- Gmail Unable to upload because it is a folder or a package (like an application bundle or RTFD document)
- How to remove password from pdf file
- BSNL Broadband upgrades speed to minimum 2MBps for all users 512Kbps 1Mbps
- MongoDB: Failed to connect to 127.0.0.1:27017 reason: Connection refused
- Turn off Focus Mode on Mac
- Steps to Delete or Deactivate Instagram Account
- [IRCTC] Indian railways official eRail API 1.1 for developers to get train info
- CentOS Cannot find a valid baseurl for repo base7x86_64 yum
- Why I see Download pre-built shared indexes in IntelliJ
- Copy file from a remote server to current local directory system using SCP command
- [Fix] Minecraft Error: A JNI error has occurred, please check your installation and try again
- How to install Zsh shell
- Merge multiple zip files without unzipping (extracting)
- How to find someone on Instagram
- How to get an embed code from Vimeo?
- How to enable line numbers in IntelliJ - HowTos
- Get HTTP Request Response Headers Safari Browser - MacOS
- Android SecurityException: Need BLUETOOTH ADMIN permissicacheNameAndAddresson: Neither user 10123 nor current process has android.permission.BLUETOOTH_ADMIN - Android
- How to Add Brew to PATH M1/M2 Mac - MacOS
- Program 8: Multiply Two Numbers - 1000+ Python Programs - Python-Programs
- How to Gzip a file directory on Mac OS X using Terminal Command - Mac-OS-X
- Multiple line editing in Notepad++ - NotepadPlusPlus
- Get HTML table td, tr or th inner content value with id or name attribute - Html