When doing sharding — replica set, I missed a port and wanted to restart one of mongod, but I always reported an error
[ root@centos mongodb]# mongod –port 28018 –shardsvr –replSet shard1 –dbpath=/usr/local/mongodb/shard1_ 3 –logpath=/usr/local/mongodb/shard1_ 3/shard1_ 3.log –logappend –fork
Fri Apr 11 13:24:48.136
Fri Apr 11 13:24:48.136 warning: 32-bit servers don’t have journaling enabled by default. Please use –journal if you want durability.
Fri Apr 11 13:24:48.136
about to fork child process, waiting until server is ready for connections.
all output going to: /usr/local/mongodb/shard1_ 3/shard1_ 3.log
forked process: 5281
ERROR: child process failed, exited with error number 100
I checked online and found that it seems that I used violence to shut down DB before, resulting in data locking.
You need to enter the database directory and delete it mongod.lock Then, restart. That’s it.
In addition, the correct way to close mongodb.
1.kill -2 PID
2.use admin;
db.shutdownServer ()
More attention is paid to the official account “Python column”. The background reply to “Tencent architecture resource 1” gets the big data resources prepared by Tencent architects.
Read More:
- Error report of mongodb startup under Linux
- Mongodb failed to start: child process failed, exited with error number 100
- Window installation of MongoDB exception: connect failed exception
- Mongodb start error: child process failed, exited with error number 1
- [Solved] org.mongodb.driver.cluster – Exception in monitor thread while connecting to server node1:27017
- The mongoDB service failed to start (exception: connect failed)
- Mongodb uses Mongo to report error: could’t connect to server 127.0.0.1:27017, connection attempt failed: socket
- MongoDB Error: Failed to start mongod.service: Unit mongodb.service is masked
- Item exception: failed to get the required ADT version number from the SDK
- socket.error : [errno 10048] and view PID process number and port number
- Springboot startup exception: error creating bean with name ‘permissioncontroller’
- Deploy mongodb fragment combined with replica set to realize distributed storage of MySQL database files (step 10)
- Springboot startup error – classnotfound Exception:EnhancerBySpringCGLIB
- Springboot project startup exception – required a single bean, but 2 were found
- Springboot modifies the reference of the application.yml or. Properties file to report an error after startup
- [Solved] Mac ES Startup Error: Exception in thread “main“ java.nio.file.NotDirectoryException
- Call Excel to report an error (the exception comes from HResult: 0x80010105 (RPC)_ SERVERFAULT))
- Error: child process failed, exited with error number 1
- Mongodb caused 127.0.0.1:27017 unable to connect
- Simple understanding and basic operation of mongodb