Mongodb 4.4.14 is intalled in Mac OS Monterey version 12.4.
Connection from Robo 3T installed in Mac itself works. Connection from mongo cli in mac itself also works:
$ mongo
MongoDB shell version v4.4.14
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("ab8018b3-c4f2-4236-8c3b-abef5468bb03") }
MongoDB server version: 4.4.14
---
The server generated these startup warnings when booting:
2022-06-02T15:59:13.574 05:30: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
---
MongoDB Enterprise >
While connecting from Studio 3T installed in Windows Virtual Machine (it is Parallels software, NOT VirtualBox) to this mongodb 4.4, receiving the following error:
Connection failed.
SERVER [192.168.1.2:27017] (Type: UNKNOWN) CONNECTING
Details:
Timed out after 5000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=192.168.1.2:27017, type=UNKNOWN, state=CONNECTING}]
Note that the Mac host IP address is 192.168.1.2. And ping from Windows VM to Mac works fine. Also disabled the firewall in Windows.
C:\Windows\system32>ping 192.168.1.2
Pinging 192.168.1.2 with 32 bytes of data:
Reply from 192.168.1.2: bytes=32 time<1ms TTL=64
Reply from 192.168.1.2: bytes=32 time<1ms TTL=64
Reply from 192.168.1.2: bytes=32 time<1ms TTL=64
Reply from 192.168.1.2: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.1.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Windows\system32>
How to resolve this error?
CodePudding user response:
In the parallels software network configuration, selected "Shared Network (Recommended)" and it worked fine.