Check firebird.log [no messages found for interval when this test was running]
Jump to: output_first_mismatch    outcomes_full_history    elapsed_time_chart
Show cross-report outcomes.

Annotation type Annotation details
2 @message
Network / firewall ?

firebird.driver.types.DatabaseError: Unable to complete network request to host "localhost".
-Failed to establish a connection.

LOG DETAILS:

2025-02-25 13:12:01.083
2025-02-25 13:12:01.083 act_db_main = <firebird.qa.plugin.Action object at [hex]>
2025-02-25 13:12:01.083 act_db_repl = <firebird.qa.plugin.Action object at [hex]>
2025-02-25 13:12:01.083 db_nbk0 = WindowsPath('H:/QA/temp/qa2024.tmp/fbqa/test_12116/gh_8324_tmp.nbk0')
2025-02-25 13:12:01.083 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2025-02-25 13:12:01.083
2025-02-25 13:12:01.083     @pytest.mark.replication
2025-02-25 13:12:01.083     @pytest.mark.version('>=4.0.6')
2025-02-25 13:12:01.083     def test_1(act_db_main: Action,  act_db_repl: Action, db_nbk0: Path, capsys):
2025-02-25 13:12:01.083
2025-02-25 13:12:01.083         FLD_WIDTH = 500
2025-02-25 13:12:01.083         ADD_ROWS_INIT = 100
2025-02-25 13:12:01.083         ADD_ROWS_IN_OAT = 30000
2025-02-25 13:12:01.083         TEST2_VALUE = -2147483648
2025-02-25 13:12:01.083
2025-02-25 13:12:01.083         # Map for storing mnemonas and details for every FAILED step:
2025-02-25 13:12:01.084         run_errors_map = {}
2025-02-25 13:12:01.084
2025-02-25 13:12:01.084         # Obtain full path + filename for DB_MAIN and DB_REPL aliases.
2025-02-25 13:12:01.084         # NOTE: we must NOT use 'a.db.db_path' for ALIASED databases!
2025-02-25 13:12:01.084         # It will return '.' rather than full path+filename.
2025-02-25 13:12:01.084         # Use only con.info.name for that!
2025-02-25 13:12:01.084         #
2025-02-25 13:12:01.084         db_info = {}
2025-02-25 13:12:01.084         for a in (act_db_main, act_db_repl):
2025-02-25 13:12:01.084 >           with a.db.connect() as con:
2025-02-25 13:12:01.084
2025-02-25 13:12:01.084 tests\functional\replication\test_make_async_reinit_reliable.py:450:
2025-02-25 13:12:01.084 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2025-02-25 13:12:01.084
2025-02-25 13:12:01.084 database = 'db_main_alias'
2025-02-25 13:12:01.084
2025-02-25 13:12:01.084     def connect(database: str, *, user: str=None, password: str=None, role: str=None,
2025-02-25 13:12:01.084                 no_gc: bool=None, no_db_triggers: bool=None, dbkey_scope: DBKeyScope=None,
2025-02-25 13:12:01.084                 crypt_callback: iCryptKeyCallbackImpl=None, charset: str=None,
2025-02-25 13:12:01.084                 auth_plugin_list: str=None, session_time_zone: str=None) -> Connection:
2025-02-25 13:12:01.085         """Establishes a connection to the database.
2025-02-25 13:12:01.085
2025-02-25 13:12:01.085         Arguments:
2025-02-25 13:12:01.085             database: DSN or Database configuration name.
2025-02-25 13:12:01.085             user: User name.
2025-02-25 13:12:01.085             password: User password.
2025-02-25 13:12:01.085             role: User role.
2025-02-25 13:12:01.085             no_gc: Do not perform garbage collection for this connection.
2025-02-25 13:12:01.085             no_db_triggers: Do not execute database triggers for this connection.
2025-02-25 13:12:01.085             dbkey_scope: DBKEY scope override for connection.
2025-02-25 13:12:01.085             crypt_callback: Callback that provides encryption key for the database.
2025-02-25 13:12:01.085             charset: Character set for connection.
2025-02-25 13:12:01.085             auth_plugin_list: List of authentication plugins override
2025-02-25 13:12:01.085             session_time_zone: Session time zone [Firebird 4]
2025-02-25 13:12:01.085
2025-02-25 13:12:01.085         Hooks:
2025-02-25 13:12:01.085             Event `.ConnectionHook.ATTACH_REQUEST`: Executed after all parameters
2025-02-25 13:12:01.085             are preprocessed and before `Connection` is created. Hook
2025-02-25 13:12:01.085             must have signature::
2025-02-25 13:12:01.085
2025-02-25 13:12:01.085                 hook_func(dsn: str, dpb: bytes) -> Optional[Connection]
2025-02-25 13:12:01.086
2025-02-25 13:12:01.086             Hook may return `Connection` instance or None.
2025-02-25 13:12:01.086             First instance returned by any hook will become the return value
2025-02-25 13:12:01.086             of this function and other hooks are not called.
2025-02-25 13:12:01.086
2025-02-25 13:12:01.086             Event `.ConnectionHook.ATTACHED`: Executed before `Connection` instance is
2025-02-25 13:12:01.086             returned. Hook must have signature::
2025-02-25 13:12:01.086
2025-02-25 13:12:01.086                 hook_func(connection: Connection) -> None
2025-02-25 13:12:01.086
2025-02-25 13:12:01.086             Any value returned by hook is ignored.
2025-02-25 13:12:01.086         """
2025-02-25 13:12:01.086         db_config = driver_config.get_database(database)
2025-02-25 13:12:01.086         if db_config is None:
2025-02-25 13:12:01.086             db_config = driver_config.db_defaults
2025-02-25 13:12:01.086         else:
2025-02-25 13:12:01.086             database = db_config.database.value
2025-02-25 13:12:01.086         if db_config.server.value is None:
2025-02-25 13:12:01.086             srv_config = driver_config.server_defaults
2025-02-25 13:12:01.086         else:
2025-02-25 13:12:01.086             srv_config = driver_config.get_server(db_config.server.value)
2025-02-25 13:12:01.086             if srv_config is None:
2025-02-25 13:12:01.087                 raise ValueError(f"Configuration for server '{db_config.server.value}' not found")
2025-02-25 13:12:01.087         if user is None:
2025-02-25 13:12:01.087             user = db_config.user.value
2025-02-25 13:12:01.087             if user is None:
2025-02-25 13:12:01.087                 user = srv_config.user.value
2025-02-25 13:12:01.087         if password is None:
2025-02-25 13:12:01.087             password = db_config.password.value
2025-02-25 13:12:01.087             if password is None:
2025-02-25 13:12:01.087                 password = srv_config.password.value
2025-02-25 13:12:01.087         if role is None:
2025-02-25 13:12:01.087             role = db_config.role.value
2025-02-25 13:12:01.087         if charset is None:
2025-02-25 13:12:01.087             charset = db_config.charset.value
2025-02-25 13:12:01.087         if charset:
2025-02-25 13:12:01.087             charset = charset.upper()
2025-02-25 13:12:01.087         if auth_plugin_list is None:
2025-02-25 13:12:01.087             auth_plugin_list = db_config.auth_plugin_list.value
2025-02-25 13:12:01.087         if session_time_zone is None:
2025-02-25 13:12:01.087             session_time_zone = db_config.session_time_zone.value
2025-02-25 13:12:01.087         dsn = _connect_helper(db_config.dsn.value, srv_config.host.value, srv_config.port.value,
2025-02-25 13:12:01.088                               database, db_config.protocol.value)
2025-02-25 13:12:01.088         dpb = DPB(user=user, password=password, role=role, trusted_auth=db_config.trusted_auth.value,
2025-02-25 13:12:01.088                   sql_dialect=db_config.sql_dialect.value, timeout=db_config.timeout.value,
2025-02-25 13:12:01.088                   charset=charset, cache_size=db_config.cache_size.value,
2025-02-25 13:12:01.088                   no_linger=db_config.no_linger.value, utf8filename=db_config.utf8filename.value,
2025-02-25 13:12:01.088                   no_gc=no_gc, no_db_triggers=no_db_triggers, dbkey_scope=dbkey_scope,
2025-02-25 13:12:01.088                   dummy_packet_interval=db_config.dummy_packet_interval.value,
2025-02-25 13:12:01.088                   config=db_config.config.value, auth_plugin_list=auth_plugin_list,
2025-02-25 13:12:01.088                   session_time_zone=session_time_zone, set_bind=db_config.set_bind.value,
2025-02-25 13:12:01.088                   decfloat_round=db_config.decfloat_round.value,
2025-02-25 13:12:01.088                   decfloat_traps=db_config.decfloat_traps.value,
2025-02-25 13:12:01.088                   parallel_workers=db_config.parallel_workers.value)
2025-02-25 13:12:01.088 >       return __make_connection(False, dsn, db_config.utf8filename.value, dpb.get_buffer(),
2025-02-25 13:12:01.088                                  db_config.sql_dialect.value, charset, crypt_callback)
2025-02-25 13:12:01.088
2025-02-25 13:12:01.088 C:\Python3x\Lib\site-packages\firebird\driver\core.py:2149:
2025-02-25 13:12:01.088 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2025-02-25 13:12:01.088
2025-02-25 13:12:01.088 create = False, dsn = 'localhost/33337:db_main_alias', utf8filename = False
2025-02-25 13:12:01.089 dpb = b'\x01\x1c\x06SYSDBA\x1d\tmasterkey?\x04\x03\x00\x00\x00', sql_dialect = 3
2025-02-25 13:12:01.089 charset = None, crypt_callback = None
2025-02-25 13:12:01.089
2025-02-25 13:12:01.089     def __make_connection(create: bool, dsn: str, utf8filename: bool, dpb: bytes,
2025-02-25 13:12:01.089                           sql_dialect: int, charset: str,
2025-02-25 13:12:01.089                           crypt_callback: iCryptKeyCallbackImpl) -> Connection:
2025-02-25 13:12:01.089         with a.get_api().master.get_dispatcher() as provider:
2025-02-25 13:12:01.089             if crypt_callback is not None:
2025-02-25 13:12:01.089                 provider.set_dbcrypt_callback(crypt_callback)
2025-02-25 13:12:01.089             if create:
2025-02-25 13:12:01.089                 att = provider.create_database(dsn, dpb, 'utf-8' if utf8filename else FS_ENCODING)
2025-02-25 13:12:01.089                 con = Connection(att, dsn, dpb, sql_dialect, charset)
2025-02-25 13:12:01.089             else:
2025-02-25 13:12:01.089                 con = None
2025-02-25 13:12:01.089                 for hook in get_callbacks(ConnectionHook.ATTACH_REQUEST, Connection):
2025-02-25 13:12:01.089                     try:
2025-02-25 13:12:01.089                         con = hook(dsn, dpb)
2025-02-25 13:12:01.089                     except Exception as e:
2025-02-25 13:12:01.089                         raise InterfaceError("Error in DATABASE_ATTACH_REQUEST hook.", *e.args) from e
2025-02-25 13:12:01.090                     if con is not None:
2025-02-25 13:12:01.090                         break
2025-02-25 13:12:01.090                 if con is None:
2025-02-25 13:12:01.090 >                   att = provider.attach_database(dsn, dpb, 'utf-8' if utf8filename else FS_ENCODING)
2025-02-25 13:12:01.090
2025-02-25 13:12:01.090 C:\Python3x\Lib\site-packages\firebird\driver\core.py:2064:
2025-02-25 13:12:01.090 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2025-02-25 13:12:01.090
2025-02-25 13:12:01.090 self = <firebird.driver.interfaces.iProvider object at [hex]>
2025-02-25 13:12:01.090 filename = 'localhost/33337:db_main_alias'
2025-02-25 13:12:01.090 dpb = b'\x01\x1c\x06SYSDBA\x1d\tmasterkey?\x04\x03\x00\x00\x00'
2025-02-25 13:12:01.090 encoding = 'utf-8'
2025-02-25 13:12:01.090
2025-02-25 13:12:01.090     def attach_database(self, filename: str, dpb: Optional[bytes] = None, encoding: str = 'ascii') -> iAttachment:
2025-02-25 13:12:01.090         "Replaces `isc_attach_database()`"
2025-02-25 13:12:01.090         result = self.vtable.attachDatabase(self, self.status, filename.encode(encoding),
2025-02-25 13:12:01.090                                             0 if dpb is None else len(dpb), dpb)
2025-02-25 13:12:01.090 >       self._check()
2025-02-25 13:12:01.090
2025-02-25 13:12:01.090 C:\Python3x\Lib\site-packages\firebird\driver\interfaces.py:1295:
2025-02-25 13:12:01.091 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2025-02-25 13:12:01.091
2025-02-25 13:12:01.091 self = <firebird.driver.interfaces.iProvider object at [hex]>
2025-02-25 13:12:01.091
2025-02-25 13:12:01.091     def _check(self) -> None:
2025-02-25 13:12:01.091         state = self.status.get_state()
2025-02-25 13:12:01.091         if StateFlag.ERRORS in state:
2025-02-25 13:12:01.091 >           raise self.__report(DatabaseError, self.status.get_errors())
2025-02-25 13:12:01.091 E           firebird.driver.types.DatabaseError: Unable to complete network request to host "localhost".
2025-02-25 13:12:01.091 E           -Failed to establish a connection.
2025-02-25 13:12:01.091
2025-02-25 13:12:01.091 C:\Python3x\Lib\site-packages\firebird\driver\interfaces.py:113: DatabaseError
3 #text
act_db_main = <firebird.qa.plugin.Action pytest object at [hex]>
act_db_repl = <firebird.qa.plugin.Action pytest object at [hex]>
db_nbk0 = WindowsPath('H:/QA/temp/qa2024.tmp/fbqa/test_12116/gh_8324_tmp.nbk0')
capsys = <_pytest.capture.CaptureFixture pytest object at [hex]>

    @pytest.mark.replication
    @pytest.mark.version('>=4.0.6')
    def test_1(act_db_main: Action,  act_db_repl: Action, db_nbk0: Path, capsys):
    
        FLD_WIDTH = 500
        ADD_ROWS_INIT = 100
        ADD_ROWS_IN_OAT = 30000
        TEST2_VALUE = -2147483648
    
        # Map for storing mnemonas and details for every FAILED step:
        run_errors_map = {}
    
        # Obtain full path + filename for DB_MAIN and DB_REPL aliases.
        # NOTE: we must NOT use 'a.db.db_path' for ALIASED databases!
        # It will return '.' rather than full path+filename.
        # Use only con.info.name for that!
        #
        db_info = {}
        for a in (act_db_main, act_db_repl):
>           with a.db.connect() as con:

tests\functional\replication\test_make_async_reinit_reliable.py:450: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

database = 'db_main_alias'

    def connect(database: str, *, user: str=None, password: str=None, role: str=None,
                no_gc: bool=None, no_db_triggers: bool=None, dbkey_scope: DBKeyScope=None,
                crypt_callback: iCryptKeyCallbackImpl=None, charset: str=None,
                auth_plugin_list: str=None, session_time_zone: str=None) -> Connection:
        """Establishes a connection to the database.
    
        Arguments:
            database: DSN or Database configuration name.
            user: User name.
            password: User password.
            role: User role.
            no_gc: Do not perform garbage collection for this connection.
            no_db_triggers: Do not execute database triggers for this connection.
            dbkey_scope: DBKEY scope override for connection.
            crypt_callback: Callback that provides encryption key for the database.
            charset: Character set for connection.
            auth_plugin_list: List of authentication plugins override
            session_time_zone: Session time zone [Firebird 4]
    
        Hooks:
            Event `.ConnectionHook.ATTACH_REQUEST`: Executed after all parameters
            are preprocessed and before `Connection` is created. Hook
            must have signature::
    
                hook_func(dsn: str, dpb: bytes) -> Optional[Connection]
    
            Hook may return `Connection` instance or None.
            First instance returned by any hook will become the return value
            of this function and other hooks are not called.
    
            Event `.ConnectionHook.ATTACHED`: Executed before `Connection` instance is
            returned. Hook must have signature::
    
                hook_func(connection: Connection) -> None
    
            Any value returned by hook is ignored.
        """
        db_config = driver_config.get_database(database)
        if db_config is None:
            db_config = driver_config.db_defaults
        else:
            database = db_config.database.value
        if db_config.server.value is None:
            srv_config = driver_config.server_defaults
        else:
            srv_config = driver_config.get_server(db_config.server.value)
            if srv_config is None:
                raise ValueError(f"Configuration for server '{db_config.server.value}' not found")
        if user is None:
            user = db_config.user.value
            if user is None:
                user = srv_config.user.value
        if password is None:
            password = db_config.password.value
            if password is None:
                password = srv_config.password.value
        if role is None:
            role = db_config.role.value
        if charset is None:
            charset = db_config.charset.value
        if charset:
            charset = charset.upper()
        if auth_plugin_list is None:
            auth_plugin_list = db_config.auth_plugin_list.value
        if session_time_zone is None:
            session_time_zone = db_config.session_time_zone.value
        dsn = _connect_helper(db_config.dsn.value, srv_config.host.value, srv_config.port.value,
                              database, db_config.protocol.value)
        dpb = DPB(user=user, password=password, role=role, trusted_auth=db_config.trusted_auth.value,
                  sql_dialect=db_config.sql_dialect.value, timeout=db_config.timeout.value,
                  charset=charset, cache_size=db_config.cache_size.value,
                  no_linger=db_config.no_linger.value, utf8filename=db_config.utf8filename.value,
                  no_gc=no_gc, no_db_triggers=no_db_triggers, dbkey_scope=dbkey_scope,
                  dummy_packet_interval=db_config.dummy_packet_interval.value,
                  config=db_config.config.value, auth_plugin_list=auth_plugin_list,
                  session_time_zone=session_time_zone, set_bind=db_config.set_bind.value,
                  decfloat_round=db_config.decfloat_round.value,
                  decfloat_traps=db_config.decfloat_traps.value,
                  parallel_workers=db_config.parallel_workers.value)
>       return __make_connection(False, dsn, db_config.utf8filename.value, dpb.get_buffer(),
                                 db_config.sql_dialect.value, charset, crypt_callback)

C:\Python3x\Lib\site-packages\firebird\driver\core.py:2149: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

create = False, dsn = 'localhost/33337:db_main_alias', utf8filename = False
dpb = b'\x01\x1c\x06SYSDBA\x1d\tmasterkey?\x04\x03\x00\x00\x00', sql_dialect = 3
charset = None, crypt_callback = None

    def __make_connection(create: bool, dsn: str, utf8filename: bool, dpb: bytes,
                          sql_dialect: int, charset: str,
                          crypt_callback: iCryptKeyCallbackImpl) -> Connection:
        with a.get_api().master.get_dispatcher() as provider:
            if crypt_callback is not None:
                provider.set_dbcrypt_callback(crypt_callback)
            if create:
                att = provider.create_database(dsn, dpb, 'utf-8' if utf8filename else FS_ENCODING)
                con = Connection(att, dsn, dpb, sql_dialect, charset)
            else:
                con = None
                for hook in get_callbacks(ConnectionHook.ATTACH_REQUEST, Connection):
                    try:
                        con = hook(dsn, dpb)
                    except Exception as e:
                        raise InterfaceError("Error in DATABASE_ATTACH_REQUEST hook.", *e.args) from e
                    if con is not None:
                        break
                if con is None:
>                   att = provider.attach_database(dsn, dpb, 'utf-8' if utf8filename else FS_ENCODING)

C:\Python3x\Lib\site-packages\firebird\driver\core.py:2064: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <firebird.driver.interfaces.iProvider pytest object at [hex]>
filename = 'localhost/33337:db_main_alias'
dpb = b'\x01\x1c\x06SYSDBA\x1d\tmasterkey?\x04\x03\x00\x00\x00'
encoding = 'utf-8'

    def attach_database(self, filename: str, dpb: Optional[bytes] = None, encoding: str = 'ascii') -> iAttachment:
        "Replaces `isc_attach_database()`"
        result = self.vtable.attachDatabase(self, self.status, filename.encode(encoding),
                                            0 if dpb is None else len(dpb), dpb)
>       self._check()

C:\Python3x\Lib\site-packages\firebird\driver\interfaces.py:1295: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <firebird.driver.interfaces.iProvider pytest object at [hex]>

    def _check(self) -> None:
        state = self.status.get_state()
        if StateFlag.ERRORS in state:
>           raise self.__report(DatabaseError, self.status.get_errors())
E           firebird.driver.types.DatabaseError: Unable to complete network request to host "localhost".
E           -Failed to establish a connection.

C:\Python3x\Lib\site-packages\firebird\driver\interfaces.py:113: DatabaseError
Full history of outcomes and elapsed time, ms:
NN SNAP_INFO CS_outcome SS_outcome CS_run_time SS_run_time CS_run_beg CS_run_end SS_run_beg SS_run_end
1 4.0.6.3189 2025.02.25 1a1a5 F F 52292 50352 2025.06.26 13:40:30.928 2025.06.26 13:41:23.220 2025.06.26 12:39:33.464 2025.06.26 12:40:23.816
2 4.0.6.3184 2025.02.24 9388c F F 52401 2369 2025.02.25 11:07:13.982 2025.02.25 11:08:06.383 2025.02.25 10:03:27.403 2025.02.25 10:03:29.772
3 4.0.6.3183 2025.02.17 e4762 F F 49866 49287 2025.02.24 11:39:20.895 2025.02.24 11:40:10.761 2025.02.24 10:38:24.445 2025.02.24 10:39:13.732
4 4.0.6.3169 2024.12.13 42cc1 F F 49944 50704 2025.02.14 08:27:04.455 2025.02.14 08:27:54.399 2025.02.14 07:26:00.361 2025.02.14 07:26:51.065
5 4.0.6.3169 2024.12.08 50eb6 F F 50289 52836 2024.12.11 11:23:32.489 2024.12.11 11:24:22.778 2024.12.11 10:22:53.138 2024.12.11 10:23:45.974

Elapsed time, ms. Chart for last 5 runs:

Last commits information (all timestamps in UTC):