1. MongoDB error content and solution
This is an error when entering mongo startup
[root@g3dhkzznakmqafv5-1029528 mongodb]# Error: coul-bash: connecting: command not found
.1:27017 :: caused by :: Connection refused :ction attempt failed: SocketException: Error connecting to 127.0.0
[1]+ Exit 127 connecting to: mongodb://127.0.0.1:27017/?compressors=disabled
connect@src/mongo/shell/mongo.js:374:17
@(connect):2:6
exception: connect failed
exiting with code 1
Change the permission of .sock file.
Next, we check the error report of the MongoDB log
"ctx":"SignalHandler","msg":"Shutdown: going to close listening sockets"}
{"t":{"$date":"2021-11-14T21:50:59.901+08:00"},"s":"I", "c":"NETWORK", "id":23017, "ctx":"listener","msg":"removing socket file","attr":{"path":"/tmp/mongodb-27017.sock"}}
{"t":{"$date":"2021-11-14T21:50:59.901+08:00"},"s":"I", "c":"NETWORK", "id":4784905, "ctx":"SignalHandler","msg":"Shutting down the global connection pool"}
Solution:
The above log has said to remove mongodb-27017.sock in the/tmp directory
here, you can switch to the TMP directory to view the mongodb-xxx.sock file
remove the mongodb-27017.sock file, and then restart OK successfully
if you have tried to switch ports, remove all mongodb-xxx.sock files
Read More:
- Error in Linux running file: bash: $’\r’: command not found
- How to Solve Linux Error: -bash: unzip: command not found
- Linux Install Bee and Execute Error: bash: bee: command not found
- -bash: sqlplus: command not found [How to Solve]
- Mac opens Terminal and reports an error -bash:: command not found
- MAC Adb Shell Error: -bash: adb: command not found, adb
- linux Ubuntu Error: No command ‘setenv‘ found
- After Centos installation is complete, ifconfig: command not found
- [Solved] Linux virtual machine startup error: operating system not found
- arm-eabi-gcc: command not found [How to Solve]
- [Solved] websocket error in Linux service: / lib64 / libc. So. 6: version ` glibc_2.17‘ not found
- Git commit – M ‘upload submit times error command “husky run” not found.
- Linux Traceroute Command Examples
- Notes on Linux SCP command using specific port
- [Solved] G++ Error: Command ‘g++‘ not found, but can be installed with:
- Linux Install Docker Error: Failed to restart docker.service: Unit docker.service not found.
- [Solved] ERROR: Subproject directory not found and gst-plugins-base.wrap file not found
- [Solved] ERROR: Linux route delete command failed: external program exited with error status: 2
- Linux system service command error: Failed to allocate directory watch: Too many open files
- Linux Command Error: Redis (error) NOAUTH Authentication required