I have read a number of articles on how to configure mirroring on SQL Server 2012. I went through the steps and everything worked until hitting the final step, which didn't work.

When I run this on the Principal:

> 
> ALTER DATABASE MyDBName SET PARTNER = 'TCP://1.2.3.4:5022';
> 
> 
> 

I get this error:

> 
> The server network address "TCP://1.2.3.4:5022" can not be
>  reached or does not exist.
> 
> 
> 

When I run the counterpart ALTER statement shown above, but on the Mirror, it works fine.

I have tried all the steps in this [troubleshooting article](http://blog.sqlauthority.com/2010/01/11/the-server-network-address-tcpsqlserver5023-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-microso/).

Important points:

1. The Primary and Mirror servers are in different datacenters, not on the same network at all. Not connected by VPN. Completely untrusted by each other.
2. I can connect to the Mirror via SSMS on the Primary and run queries. And vice versa.
3. I configured certificates on each server to establish the trust relationship. Everything worked during the setup and config, no errors.
4. I configured the endpoints on both servers and verified they're active/enabled.
5. I opened port 5022 on both servers by configuring incoming and outgoing windows firewall rules. I can telnet to the Mirror from the Principal and vice versa - ports appear open, no problems.
6. In the troubleshooting guide mentioned above, I tried steps 1-6. I didn't try 7, deleting the endpoints and re-creating, because they look perfectly valid and active to me.

Looking for some ideas on this one.