故障:ERROR:ERROR: child process failed, exited with error number 51
现象:
启动mongodb时报错
分析:
因为这个实例正在运行中导致无法删除
解决:
1、关闭再开启
1 [root@server1 mongodb]# mongod -f /etc/mongod.conf --shutdown
2 killing process with pid: 18256
3 [root@server1 mongodb]# mongod -f /etc/mongod.conf
4 about to fork child process, waiting until server is ready for connections.
5 forked process: 35994
6 child process started successfully, parent exiting
2、杀死进程再开启
1 [root@server1 ~]# netstat -anpt | grep mongod
2 tcp 0 0 0.0.0.0:27019 0.0.0.0:* LISTEN 55285/mongod
3 tcp 0 0 0.0.0.0:27020 0.0.0.0:* LISTEN 55423/mongod
4 tcp 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN 54913/mongod
5 tcp 0 0 0.0.0.0:27018 0.0.0.0:* LISTEN 55124/mongod
6 [root@server1 mongodb]# kill 54913
7 [root@server1 mongodb]# mongod -f /etc/mongod.conf
8 about to fork child process, waiting until server is ready for connections.
9 forked process: 25674
10 child process started successfully, parent exiting
问题解决