MongoDB service management

韦睿
2023-12-01
---------------------------stop mongoDB service--------------------------------------------------------------

$ ./mongo

MongoDB shell version: 1.5.4
connecting to: test

> use admin
switched to db admin

> db.shutdownServer()
Sat Jul 24 23:11:36 query failed : admin.$cmd { shutdown: 1.0 } to: 127.0.0.1
server should be down...
Sat Jul 24 23:11:36 trying reconnect to 127.0.0.1
Sat Jul 24 23:11:36 reconnect 127.0.0.1 failed couldn't connect to server {ip: "127.0.0.1", port: 27017}
Sat Jul 24 23:11:36 MessagingPort say send() errno:9 Bad file descriptor 127.0.0.1:27017
Sat Jul 24 23:11:36 Error: error doing query: unknown (anon):1421

> exit
bye

------------------------start MongoDB service------------------------------------------------------------------
root@jason:~ #cd /etc/init.d/
root@jason:/etc/init.d #service mongodb-standalone start

tail -f /var/log/mongodb/mongod.log
 类似资料:

相关阅读

相关文章

相关问答