Availability Groups - strange behavior

  • So, some databases in an AG went out of sync for a known reasons, but while trying to re-establish secondaries on host B, the following keeps on occurring:
    The connection to the primary replica is not active. The command cannot be processed.
    Error Number: 35250
    Severity: 16
    State: 7

    Some background. 
    This instance shares a host with another separate instance, also set up for AG, but works fine, no issues. 
    This instance A has another secondary C on a reporting server, and has no issues. 

    Deleting the secondaries on B, and running the setup from Primary A, results in only some databases failing with the error, some succeed. 
    This indicates, that 5022 is open, firewalls are not the issue, connectivity is not an issue, else all DBs would have similar behavior.
    Tested traditional mirroring between these instances on 5022, no issues.
    Endpoints exist and are started on both instances.
    Checked endpoint permissions, this was in place already initially when it was set up. 

    Only other idea is to remove all primary DBs from the AG and rebuild the AG, but that means downtime. 

    Running out of ideas what could be causing this?

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • Do the databases succeed and fail on an AG basis or an individual database basis? Have you checked all the endpoints?

  • Fail on individual basis. 
    Yes, all endpoints double checked.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • Sorry, I meant to say "have you recreated your endpoints", not checked. I saw you'd said you had already.

    So you have Availability Groups in which some databases are replicating correctly and some are not- within the same AG?

    Have you already tried this? (Source: https://blogs.msdn.microsoft.com/alwaysonpro/2013/12/09/create-availability-group-fails-with-error-35250-failed-to-join-the-database/ about half way down)


    select r.replica_server_name, r.endpoint_url,
    rs.connected_state_desc, rs.last_connect_error_description,
    rs.last_connect_error_number, rs.last_connect_error_timestamp
    from sys.dm_hadr_availability_replica_states rs join sys.availability_replicas r
    on rs.replica_id=r.replica_id
    where rs.is_local=1

  • Beatrix Kiddo - Thursday, March 16, 2017 8:35 AM

    Sorry, I meant to say "have you recreated your endpoints", not checked. I saw you'd said you had already.

    So you have Availability Groups in which some databases are replicating correctly and some are not- within the same AG?

    Have you already tried this? (Source: https://blogs.msdn.microsoft.com/alwaysonpro/2013/12/09/create-availability-group-fails-with-error-35250-failed-to-join-the-database/ about half way down)


    select r.replica_server_name, r.endpoint_url,
    rs.connected_state_desc, rs.last_connect_error_description,
    rs.last_connect_error_number, rs.last_connect_error_timestamp
    from sys.dm_hadr_availability_replica_states rs join sys.availability_replicas r
    on rs.replica_id=r.replica_id
    where rs.is_local=1

    yes thanks, and there were none.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply