locked
Mirroring Error: The server network address "TCP://<ServerB>:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational. (.Net SqlClient Data Provider) RRS feed

  • Question

  • Hi All.

    Any help on this issue would be greatly appreciated!

    Mirroring is able to setup properly but when I try to start it, I receive the following error:

    The server network address "TCP://<ServerB>:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational. (.Net SqlClient Data Provider)

    Please note:  We have successfully setup cross country mirroring in our lab environment and it works perfectly.

    I have performed the following troubleshooting steps:

    • Made sure that on Mirror Server the database is restored with NO RECOVERY option.
    • Made sure Windows was same version on <ServerA> & <ServerB>.
    • Referenced servers by IP Address and DNS name in multiple efforts to make this work.
    • Made sure SQL was same version on <ServerA> & <ServerB>

    -      Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)   Apr  2 2010 15:48:46   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)

    • Made sure that from Principal the latest LOG backup is restored to mirror server.
    • Was able to telnet to ports 5022 from <ServerA> to  <ServerB> using command TELNET  <ServerB> 5022
    • Was able to telnet to ports 5022 from <ServerB> to  <ServerA> using command TELNET  <ServerA> 5022
    • Made sure firewall is turned off on <ServerA> & <ServerB>
    • Made sure that both servers are using the same SQL service accounts (localhost) and made sure that account is listed as a SysAdmin on the database server instance.  (We are not setup on a domain.)
    • Verified that the endpoints are started on the partners by using the state or state_desc column the of the sys.database_mirroring_endpoints catalog view. You can start end point by executing an ALTER ENDPOINT statement.
    • Try the following command as one of the last options. GRANT CONNECT ON ENDPOINT::Mirroring TO ALL
    • Deleted and re-setup mirroring endpoints between <ServerA> & <ServerB>.  Had same problem when I tried to start mirroring.
    • Moved <ServerB> to a new host server.  I took down and re-setup mirroring again and we got same problem.
    • Moved <ServerA> to a new host server.  I took down and re-setup mirroring again and we got same problem.
    • Took down mirroring and setup mirroring between <ServerA> & <ServerC> (local network).  Had same problem when I tried to start mirroring.
    • Checked listening ports on source and target servers:

    SELECT e.name, e.protocol_desc, e.type_desc, e.role_desc, e.state_desc,

           t.port, e.is_encryption_enabled, e.encryption_algorithm_desc,

           e.connection_auth_desc

    FROM   sys.database_mirroring_endpoints e JOIN sys.tcp_endpoints t

    ON     e.endpoint_id = t.endpoint_id;

    Results <ServerA>:

    name

    protocol_desc

    type_desc

    role_desc

    state_desc

    port

    is_encryption_enabled

    encryption_algorithm_desc

    connection_auth_desc

    Mirroring

    TCP

    DATABASE_MIRRORING

    PARTNER

    STARTED

    5022

    1

    RC4

    NEGOTIATE

    Results <ServerB>:

    name

    protocol_desc

    type_desc

    role_desc

    state_desc

    port

    is_encryption_enabled

    encryption_algorithm_desc

    connection_auth_desc

    Mirroring

    TCP

    DATABASE_MIRRORING

    PARTNER

    STARTED

    5022

    1

    RC4

    NEGOTIATE

    Results <ServerC>:

    name

    protocol_desc

    type_desc

    role_desc

    state_desc

    port

    is_encryption_enabled

    encryption_algorithm_desc

    connection_auth_desc

    Mirroring

    TCP

    DATABASE_MIRRORING

    PARTNER

    STARTED

    5022

    1

    RC4

    NEGOTIATE


    Don't just dream it, become it!



    • Edited by Wizgang Thursday, February 12, 2015 11:27 PM Clarification
    Thursday, February 12, 2015 10:48 PM

Answers

  • Hello,

    Because you are not within a domain and you left your SQL Server service account to be local acounts, neither of the engines cannot establish connection (authenticate) using the default setup endpoints. You have couple of options:

    - Option 1: Setup mirroring Using certificates (MSDN article)

    - Option 2: Use a local user for service account for the two SQL engines (use the same name and same password) and setup the mirroring endpoints to be able to authenticate through that account. 

    Now, I would recommend option 1, as it is tested, verified and supported. The second one is a trick behind the scenes, that might not always do the job. 


    Ivan Donev MCT and MCSE Data Platform

    • Marked as answer by Wizgang Friday, February 13, 2015 12:03 AM
    Thursday, February 12, 2015 11:00 PM

All replies

  • Hello,

    Because you are not within a domain and you left your SQL Server service account to be local acounts, neither of the engines cannot establish connection (authenticate) using the default setup endpoints. You have couple of options:

    - Option 1: Setup mirroring Using certificates (MSDN article)

    - Option 2: Use a local user for service account for the two SQL engines (use the same name and same password) and setup the mirroring endpoints to be able to authenticate through that account. 

    Now, I would recommend option 1, as it is tested, verified and supported. The second one is a trick behind the scenes, that might not always do the job. 


    Ivan Donev MCT and MCSE Data Platform

    • Marked as answer by Wizgang Friday, February 13, 2015 12:03 AM
    Thursday, February 12, 2015 11:00 PM
  • OMG!  It worked!  Thank you very much!  I owe you a beer!



    Don&#39;t just dream it, become it!

    Friday, February 13, 2015 12:03 AM