Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-3671

Test Failure - Windows replica set test sometimes fails to connect

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.4
    • Affects Version/s: None
    • Component/s: Tests
    • Labels:
      None

      Windows replica set tests are sometimes failing with a ServerSelectionTimeoutError during test suite setup. Perhaps we need to increase the 100ms timeout.

       [2023/04/13 21:23:51.338] Traceback (most recent call last):
       [2023/04/13 21:23:51.338]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\setup.py", line 315, in <module>
       [2023/04/13 21:23:51.338]     setup(
       [2023/04/13 21:23:51.338]   File "C:\python\32\Python310\lib\site-packages\setuptools\__init__.py", line 87, in setup
       [2023/04/13 21:23:51.338]     return distutils.core.setup(**attrs)
       [2023/04/13 21:23:51.338]   File "C:\python\32\Python310\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
       [2023/04/13 21:23:51.338]     return run_commands(dist)
       [2023/04/13 21:23:51.338]   File "C:\python\32\Python310\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
       [2023/04/13 21:23:51.339]     dist.run_commands()
       [2023/04/13 21:23:51.339]   File "C:\python\32\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 968, in run_commands
       [2023/04/13 21:23:51.345]     self.run_command(cmd)
       [2023/04/13 21:23:51.345]   File "C:\python\32\Python310\lib\site-packages\setuptools\dist.py", line 1217, in run_command
       [2023/04/13 21:23:51.345]     super().run_command(command)
       [2023/04/13 21:23:51.345]   File "C:\python\32\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
       [2023/04/13 21:23:51.345]     cmd_obj.run()
       [2023/04/13 21:23:51.345]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\setup.py", line 125, in run
       [2023/04/13 21:23:51.345]     result = runner.run(suite)
       [2023/04/13 21:23:51.345]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\test\__init__.py", line 1248, in run
       [2023/04/13 21:23:51.345]     setup()
       [2023/04/13 21:23:51.345]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\test\__init__.py", line 1157, in setup
       [2023/04/13 21:23:51.345]     client_context.init()
       [2023/04/13 21:23:51.345]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\test\__init__.py", line 493, in init
       [2023/04/13 21:23:51.345]     self._init_client()
       [2023/04/13 21:23:51.345]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\test\__init__.py", line 398, in _init_client
       [2023/04/13 21:23:51.345]     if not self._check_user_provided():
       [2023/04/13 21:23:51.345]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\test\__init__.py", line 544, in _check_user_provided
       [2023/04/13 21:23:51.345]     return db_user in _all_users(client.admin)
       [2023/04/13 21:23:51.345]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\test\__init__.py", line 253, in _all_users
       [2023/04/13 21:23:51.346]     return set(u["user"] for u in db.command("usersInfo").get("users", []))
       [2023/04/13 21:23:51.346]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\pymongo\_csot.py", line 106, in csot_wrapper
       [2023/04/13 21:23:51.347]     return func(self, *args, **kwargs)
       [2023/04/13 21:23:51.347]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\pymongo\database.py", line 819, in command
       [2023/04/13 21:23:51.348]     with self.__client._socket_for_reads(read_preference, session) as (
       [2023/04/13 21:23:51.348]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\pymongo\mongo_client.py", line 1306, in _socket_for_reads
       [2023/04/13 21:23:51.349]     server = self._select_server(read_preference, session)
       [2023/04/13 21:23:51.349]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\pymongo\mongo_client.py", line 1267, in _select_server
       [2023/04/13 21:23:51.351]     server = topology.select_server(server_selector)
       [2023/04/13 21:23:51.351]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\pymongo\topology.py", line 272, in select_server
       [2023/04/13 21:23:51.351]     server = self._select_server(selector, server_selection_timeout, address)
       [2023/04/13 21:23:51.351]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\pymongo\topology.py", line 261, in _select_server
       [2023/04/13 21:23:51.351]     servers = self.select_servers(selector, server_selection_timeout, address)
       [2023/04/13 21:23:51.351]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\pymongo\topology.py", line 223, in select_servers
       [2023/04/13 21:23:51.352]     server_descriptions = self._select_servers_loop(selector, server_timeout, address)
       [2023/04/13 21:23:51.352]   File "C:\data\mci\6b2acfabb9df8b18b255b5b5ac70c5a6\src\pymongo\topology.py", line 238, in _select_servers_loop
       [2023/04/13 21:23:51.352]     raise ServerSelectionTimeoutError(
       [2023/04/13 21:23:51.352] pymongo.errors.ServerSelectionTimeoutError: No replica set members match selector "Primary()", Timeout: 0.1s, Topology Description: <TopologyDescription id: 643872e75d6a396a6fb78336, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('localhost', 27017) server_type: RSSecondary, rtt: 0.0>, <ServerDescription ('localhost', 27018) server_type: Unknown, rtt: None>, <ServerDescription ('localhost', 27019) server_type: RSArbiter, rtt: 0.0>]>
       [2023/04/13 21:23:52.036] Command 'shell.exec' in function 'run tests' failed: shell script encountered problem: exit code 1.
      

      https://evergreen.mongodb.com/task/mongo_python_driver_tests_windows_python_version_32_bit__platform~windows_64_vsMulti_small_auth_ssl~auth_ssl_python_version_windows_32~3.10_test_latest_replica_set_be355e2bea995ad72c8d1fde6dedf9ec7a637352_23_04_13_15_30_54

      and again here:
      https://evergreen.mongodb.com/task/mongo_python_driver_tests_windows_python_version_32_bit__platform~windows_64_vsMulti_small_auth_ssl~auth_ssl_python_version_windows_32~3.10_test_4.4_replica_set_be355e2bea995ad72c8d1fde6dedf9ec7a637352_23_04_13_15_30_54

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: