Version:MongoDB 5.0.3
1. Use the configuration file to start the error 1:
View log:
The reason is an error in the configuration file:
#mongod.conf
net:
bindIp: localhost,172.20.10.9 # 172.20.10.9 LAN IP for host computer
After 172.20.10.9 of bindip is deleted, it can be started successfully, but the host cannot connect to mongodb. At this time, by changing bindip to bindipall: true, it means that all IPS are allowed to connect to this mongodb
If you want to configure multiple IP addresses but do not want all IP addresses to be accessible, the above instructions are used, and the partition cannot be started. Query the network and learn that it is configured through [IP1, IP2], and the result is also an error:
Conclusion: If it is only accessed locally, you can configure localhost in bindip,
If other IPS want to access, they can only configure bindip: 0.0.0.0 or bindipall: true
2. Use the configuration file to start error 2:
Problem cause: caused by abnormal shutdown
Solution: delete the. Lock file under the data directory, and then specify the data directory to start by — dbpaht or add the — repair parameter. After successful startup, start it by using the configuration file method
3. Add in replica set No response when arbitrating nodes
Problem: by executing the shell in the master node, rs.addarb (host: port) does not respond, and the arbitration node cannot be added. At this time, the version is 5.0.3
Solution: reduce the version to 4.0.1
Read More:
- Mongodb — startup exception, error report ERROR:NUMBER 100
- Mongodb uses Mongo to report error: could’t connect to server 127.0.0.1:27017, connection attempt failed: socket
- Alpine Linux executable file crash report error / lib / x86 not found_ 64 Linux GNU / libc.so solution
- MongoDB Error: Failed to start mongod.service: Unit mongodb.service is masked
- Troubleshooting of samba error in Linux configuration startup
- Linux7 hardware time occasionally encounter nonsense Powerpath startup error
- Node.js Using port 80 to report errors in Linux
- The remote port occupation of Linux startup jar package script reports an error
- Linux uses open source Yum to report error performing checksums
- Springboot modifies the reference of the application.yml or. Properties file to report an error after startup
- Linux environment setup – Update https://apt.repos.intel.com report errors
- Using openfeign to remotely call the startup program to report an error
- Error report on startup of rabbitmq in MAC installation error:epmd error for host xiongmindeMacBook-Pro: timeout
- Prompt when executing sh file in Linux: nohup: unable to run command “. / startup. Sh”: insufficient permissions
- MySQL uses net start MySQL startup prompt (failed to start, the service did not report any error)
- Mongodb connection authentication auth failed solution
- MongoDB:Failed: error connecting to db server: no reachable servers
- PHP under linux uses pdo-dblib to connect to mssql to report an error solution. Error message: SQLSTATE[01002] Adaptive Server connection failed (severity 9)
- Mongodb encountered an error: connect econnreused 127.0.0.1:27017
- [Solved] MongoDB Insert Data Error: OperationFailure: Authentication failed…