Trying to set up mirroring problem RRS feed

  • Question

  • Hey there,

    I am trying to set up mirroring on 2 different test servers. I configured the security and chose 5022 as the default for the ports and when I click start mirroring I get this error:

    The server network address TCP://SERVERNAME.DOMAIN:5022 can not be reached or does not exist. Chck the network address name and that the ports for the local and remote endpoints are operational.

    I asked the Network guy and he said that the firewall is not running and we don't block internal ports so he doesn't understand the problem.

    Has anyone run across this that can lend some guidance?

    Thanks in advance!

    Wednesday, November 24, 2010 3:41 PM

All replies

  • Hi!

    Most likely cause is that the user running the endpoint is not authorized to connect to the opposing endpoint. Try "GRANT CONNECT ON ENDPOINT::<endpoint name> TO PUBLIC" on both sides and start mirroring again.

    This is the easy command... If you want a secure way you have to create the endpoint user on the other server and grant connect to that user...


    Wednesday, November 24, 2010 4:25 PM
  • I tried your statement on both databases and the command was successful.

    However, I still received the same error.

    Isn't port 5022 the most common one to use as it should not be in use?

    I don't know what thr problem is???

    Wednesday, November 24, 2010 5:00 PM
  • OK, let's try the next one... Have you tried connecting to the endpoints with telnet? (From one server to the other)

    Also, could you script the endpoints and send me the definition please?

    Wednesday, November 24, 2010 5:12 PM
  • Thanks for your reply!

    I don't know how to connect to the endpoints with telnet :(

    If I do a



    * from sys.tcp_endpoints

    I get this:

    Mirroring 65536 277 2 TCP 4 DATABASE_MIRRORING 0 STARTED 0 5022 0 NULL

    If thats what you mean by sending you the definition.

    Let me know, thanks!

    Wednesday, November 24, 2010 8:27 PM
  • Hi!

    Connecting via Telnet: You log on locally to your server. Then open a command prompt and type "Telnet <name of the other server> 5022" (Be advised that Telnet is a Windows feature that per default is disabled on new OSes.) If the connection works your screen should turn blank and a cursor should be blinking. If not you get a connection error within a few seconds.

    About the endpoint definition: Right click the endpoint in Management Studio and say Script Endpoint As -> Create To -> New Query Editor Window. Copy the script that this generates.


    Thursday, November 25, 2010 6:14 AM
  • Thanks again for your help Lucifer!

    Ok when I am on the server Test, I do a telnet to 5022 on the server Kazoo and it is fine.

    When I am on Kazoo I do a telnet to 5022 on Test and it errors.

    I tried other ports and it still errors. The other ports I tried are listening, not established, as I did a netstat -a on the command prompt.

    As for the endpoint, here is the script from Kazoo.



    ENDPOINT [Mirroring]


    AUTHORIZATION [domain\myusername]












    Thursday, November 25, 2010 3:29 PM
  • Well, there's your problem... If your Telnet throws an error you have a problem with the network connectivity. I would guess there is a firewall blocking you. Have you checked if the windows firewall on the Test server is enabled?


    Friday, November 26, 2010 6:09 AM
  • Hi gmazza88,


    In addition to others, if you are using windows authentication, the principal and mirror server should run under the same domain account, please follow the steps to check the service account for each servers:


    1.         Open SQL Server Configuration Manager, click SQL Server Services.

    2.         On the right panel, right click on the SQL Server(instance_name) and select Properties.

    3.         On the Log On dialog box, check the This account and enter your domain accout, password.

    4.         Click Ok.


    Please feel free to ask if you have any questions.


    Weilin Qiao

    Tuesday, November 30, 2010 11:11 AM
  • Hi WeiLin!

    I am afraid that I can't agree with your comment. The Endpoint has it's own authorization, so the account SQL Server is running under does not have an impact on the mirroring... Although I agree that a domain account should be used I am quite certain that this won't have an impact in that case...


    Tuesday, November 30, 2010 12:07 PM
  • During Mirroring configuration using UI, there is a screen which asks for Service account.

    Service account should have permission to connect to endpoint.

    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Tuesday, November 30, 2010 1:51 PM
  • Hi All,


    the principal and mirror server should run under the same domain account


    I am sorry for this comment.


    Actually they don't need run under the same domain account. If they run under different domain account, just make sure each domain account has been added as a login in the partner server and grant the "CONNECT ON ENDPOINT" permission to this login.


    Weilin Qiao

    Wednesday, December 1, 2010 8:48 AM
  • The Database Engine Service account should have Grant Connect To permission on the Endpoints.

    SKG: Please Marked as Answered, if it resolves your issue.
    Monday, December 20, 2010 11:17 AM