error : MongoDB shell version: 2.6.10
connecting connecting to: test
2020-01-06T19:04:40.945+0800 warning: Failed to connect to 127.0.0.1:27017, reason: Errno :111 Connection union 40
2020-01-06 t19:04:40. 946+0800 Error: Couldn ‘t connect to server 127.0.0.1:27017 (127.0.0.1), the connection attempt failed at the SRC/mongo/shell/mongo. Js: 146
I am under a virtual machine, download the mongo, want to get into mongo library, found an error (above), the Internet a lot, according to their way to try many, but is not go, Later, I found that because I did not enter into the docker image (just started to contact the image)
, I learned from docker image , and learned
by virtue of virtual machine
step 1 , switch to su root, check all images under docker images
step 2 , if no mongo, pull mongo through docker pull mongo official website, if you have pulled direct operation step 3
step 3 0, Start container docker run-dit –name mymongodb-p 27017:27017 mongo
step 4 , open container docker exec-it mymongodb bash, enter mongo
appear the pattern in the blue circle, indicating that you have entered mongo, directly enter the command statement to operate
Read More:
- 【MongoDB】 Failed to connect to 127.0.0.1:27017, reason: Connection refused
- curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
- samba Error NT_STATUS_CONNECTION_REFUSED Failed to connect with SMB1 — no workgroup available
- curl: (7) Failed connect to localhost:9200; Connection refused
- [Solved] failed to connect to server, reason: Unable to establish connection
- failed to connect to ‘192.168.199.143:5555‘: Connection refused
- error: \*1035 connect() failed (111: Connection refused) while connecting to upstream, client…..
- Nginx reports 502 error, log connect() failed (111: Connection refused) while connecting to upstream. A personal effective solution
- Solve the MAC terminal download error curl: (7) failed to connect to raw.githubusercontent.com port 443: Connection refused
- 【Synergy】Error:failed to connect to server:Connection was refused
- Failed to connect to 17.0.0.1 port 1080: Connection refused
- How to Fix java.net.ConnectException: Connection refused: connect
- Mongodb uses Mongo to report error: could’t connect to server 127.0.0.1:27017, connection attempt failed: socket
- Java connection SQL error, network error IO Exception:Connection refused :connect
- (20200916 Solved)Docker||redis-cli Could not connect to Redis at 127.0.0.1:6379: Connection refused
- Zookeeper connection timeout problem, and refused to connect to solve the problem
- solve java.net.ConnectException : Connection refused:connect report errors
- JDBC connect to Sql Server to connect to the database–The TCP/IP connection to the host localhost, port 1433 has failed
- Failed to connect to remote VM. Connection reused. Connection reused: Connect
- RTMP_Connect0, failed to connect socket. 110 (Connection timed out)