You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from pymongo_inmemory import MongoClient
import os
os.environ["PYMONGOIM__DOWNLOAD_URL"] = "https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-6.0.0.zip"
client = MongoClient() # No need to provide host
db = client['testdb']
collection = db['test-collection']
# etc., etc.
client.close()
This fails:
from pymongo_inmemory import MongoClient
import os
os.environ["PYMONGOIM__DOWNLOAD_URL"] = "https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-7.0.3.zip"
client = MongoClient() # No need to provide host
db = client['testdb']
collection = db['test-collection']
# etc., etc.
client.close()
Expected behavior
Expected the example code from instructions to run without errors.
Logs
File "C:\testmongo\minimal.py", line 6, in <module>
client = MongoClient() # No need to provide host
File "C:\testmongo\.venv\lib\site-packages\pymongo_inmemory\_pim.py", line 15, in __init__
self._mongod.start()
File "C:\testmongo\.venv\lib\site-packages\pymongo_inmemory\mongod.py", line 144, in start
while not self.is_healthy:
File "C:\testmongo\.venv\lib\site-packages\pymongo_inmemory\mongod.py", line 184, in is_healthy
status = db.command("serverStatus")
File "C:\testmongo\.venv\lib\site-packages\pymongo\_csot.py", line 107, in csot_wrapper
return func(self, *args, **kwargs)
File "C:\testmongo\.venv\lib\site-packages\pymongo\database.py", line 890, in command
with self.__client._conn_for_reads(read_preference, session) as (
File "C:\testmongo\.venv\lib\site-packages\pymongo\mongo_client.py", line 1346, in _conn_for_reads
server = self._select_server(read_preference, session)
File "C:\testmongo\.venv\lib\site-packages\pymongo\mongo_client.py", line 1303, in _select_server
server = topology.select_server(server_selector)
File "C:\testmongo\.venv\lib\site-packages\pymongo\topology.py", line 302, in select_server
server = self._select_server(selector, server_selection_timeout, address)
File "C:\testmongo\.venv\lib\site-packages\pymongo\topology.py", line 286, in _select_server
servers = self.select_servers(selector, server_selection_timeout, address)
File "C:\testmongo\.venv\lib\site-packages\pymongo\topology.py", line 237, in select_servers
server_descriptions = self._select_servers_loop(selector, server_timeout, address)
File "C:\testmongo\.venv\lib\site-packages\pymongo\topology.py", line 259, in _select_servers_loop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: 127.0.0.1:27017: [WinError 10061] No connection could be made because the target machine actively refused it (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms), Timeout: 30s, Topology Description: <TopologyDescription id: 655f3dee8b6bb45d6b5a77e7, topology_type: Unknown, servers: [<ServerDescription ('127.0.0.1', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('127.0.0.1:27017: [WinError 10061] No connection could be made because the target machine actively refused it (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms)')>]>
Context:
OS: Windows 11
Version of pymongo_inmemory: 0.4.0
Version of mongo you are downloading: 6.1.0, 7.0.3
The text was updated successfully, but these errors were encountered:
Hi @juho-workfellow thank you for the report. I am aware of this behaviour. However I didn't have time to investigate further. With this report I'll try to prioritize it. That being said, I don't have a clear answer to why this is happening. Probably I'm missing some start up configuration.
Describe the bug
Starting MongoDB fails on versions later than 6.1.0 due to removal of
ephemeralForTest
engine: https://jira.mongodb.org/browse/SERVER-65151To Reproduce
This works:
This fails:
Changing
self.engine
to "wiredTiger" here seems to fix the issue: https://github.com/kaizendorks/pymongo_inmemory/blob/master/pymongo_inmemory/mongod.py#L54Expected behavior
Expected the example code from instructions to run without errors.
Logs
Context:
The text was updated successfully, but these errors were encountered: