Because Mongo is abnormally closed, an error message of “error: child process failed, exited with error number 1” may appear when it is started again.
Step 1: delete the lock file
Find Mongo directory and delete mogod lock
Step 2: create a new log file
Find the log file directory of Mongo and delete or modify the original log file name
[because I don’t want to modify Mongo’s configuration file, I modified the file name and added a file with the same name as the original file. I can also take another name and modify Mongo configuration]
Step 3 try to restart
Generally, the restart is successful at this step.
If it still fails, take a look at Mongo’s log file
the errors reported in my log file are as follows:
2021-12-16T11:58:12.810+0800 I CONTROL [main] ***** SERVER RESTARTED *****
2021-12-16T11:58:12.815+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2021-12-16T11:58:12.820+0800 I CONTROL [main] ERROR: Cannot write pid file to /var/run/mongodb/mongod2.pid: No such file or directory
Then go to the prompt “/var/run” directory, create a new mongodb folder, and restart. Start successfully and solve the problem!
Read More:
- Nginx Startup Error: Job for nginx.service failed because the control process exited with error code
- [Solved] docker Startup Error: Job for docker.service failed because the control process exited with error code
- [Solved] Linux Service Start Error: *.service: Main process exited, code=exited, status=203/EXEC
- [Solved] Job for network.service failed because the control process exited with error code. See “systemctl st
- [Solved] FTP Setup Error: Job for vsftpd.service failed because the control process exited with error code…
- [Solved] Job for docker.service failed because the control process exited with error code. After changing the docker configuration
- Virtual machine failed to start network service error: ob for network.service failed because the control process exited with error code
- [Solved] tar (child): bzip2: Cannot exec: No such file or directory tar (child): Error is not recoverable: ex
- [Solved] YarnClientSchedulerBackend: Yarn application has already exited with state FAILED
- Docker Startup Error: standard_init_linux.go:211: exec user process caused “no such file or directory”
- [Solved] prometheus Startup Error: opening storage failed
- [Solved] ERROR: Linux route delete command failed: external program exited with error status: 2
- [Solved] OCI runtime create failed: runc create failed: unable to start container process:
- CDH operation and maintenance: child node cloudera SCM agent starts Error
- [Solved] Window Redis Service Failed to Startup: bind No error
- [Solved] Sshd startup error: Failed at step CGROUP spawning /usr/sbin/sshd: No space left on device
- [Solved] KVM Failed to Startup Error: error: Network not found: no network with matching name ‘default‘
- [Solved] YUM Error: error: rpmdb: BDB0113 Thread/process 11498/140107732375616 failed
- [Solved] Centos7 firewalld startup error: Failed to start firewalld.service: Unit is masked.
- [Solved] Linux Error: ENOSPC: System limit for number of file watchers