[root@localhost bin]# ./mongo
MongoDB shell version v3.4.5
connecting to: mongodb://127.0.0.1:27017
2017-11-20T11:10:49.895+0800 W NETWORK [thread1] Failed to connect to 127.0.0.1 :27017, in(checking socket for error after poll), reason: Connection refused
2017-11-20T11:10:49.896+0800 E QUERY [thread1] Error: couldn't connect to ser ver 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:237:13
@(connect):1:6
exception: connect failed
The reason is that the database location is not specified
./mongod --dbpath /data/db
If your database directory is not /data/db, you can use the -dbpath to specify
. Start service
join
Read More:
- MongoDB Error: Failed to start mongod.service: Unit mongodb.service is masked
- Window installation of MongoDB exception: connect failed exception
- MongoDB Error: Failed to start mongod.service: Unit mongod.service is not loaded properly
- Mongodb uses Mongo to report error: could’t connect to server 127.0.0.1:27017, connection attempt failed: socket
- Mongodb failed to start: child process failed, exited with error number 100
- 【MongoDB】 Failed to connect to 127.0.0.1:27017, reason: Connection refused
- Centos7 executes the command service mysqld start and prompts Failed to start mysqld.service: Unit mysqld.service not loaded
- Net start mongodb failed to start: system error 5 has occurred. Access is denied
- Mongodb caused 127.0.0.1:27017 unable to connect
- Tdengine failed to start, start request repeated too quickly for taosd.service
- Mongodb start error: child process failed, exited with error number 1
- MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect EC
- How to Fix Failed to start service jboss.deployment.unit.”jboss-as-bmt.war”.INSTALL: org.jboss.msc.service.S
- MySQL uses net start MySQL startup prompt (failed to start, the service did not report any error)
- Tomcat service failed to start
- Failed to start Remote desktop service (VNC)
- Error: could’t connect to server 127.0.0.1:27017, connection attempt failed
- Failed to start docker.service : unit not found
- MySQL error set: failed to start mysql.service : Unit mysql.service is masked.
- [Solved] org.mongodb.driver.cluster – Exception in monitor thread while connecting to server node1:27017