Fix Error 1418: The server network address cannot be reached or does not exist.
We got error 1418 while configuring Database Mirroring on one of the SQL Server database instance. The error details are given below:
The server network address “TCP://ServerName.abc.local:5022″ cannot be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational. (Microsoft SQL Server, Error: 1418)
Reason behind Error 1418
Main reason behind database mirroring error 1418 is because the specified server network address cannot be reached or does not exist. The server network address cannot be reached because of multiple reasons. Some of them are given below.
- Principal, Mirror and Witness servers are not talking to each other.
- Wrong network address name, mirror server instance name or port number.
- Mirror database is not ready for mirroring.
- Principal or mirror server instance is behind a firewall.
- You are using local system account to run SQL Server services and not using certificates for authentication.
- SQL Server services are running with different domain accounts on Principal and Mirror server and service accounts don’t have enough permission on endpoints.
- Different endpoint encryption value set on Principal, Mirror and Witness server.
- Endpoints are not started on the partner servers.
- Principal server instance is not listening on the port assigned to its database mirroring endpoint.
We need to verify each option mentioned above carefully to fix this error.
The solution of this issue may vary case to case depending on the nature of issue. To fix this issue we need to find out the main root cause behind error 1418. The root cause may be anything that is given in above section. Here I will describe each probable reason given above and its solution to fix this issue. Make sure to go through with each point given in this article.
Principal, Mirror and Witness Servers Should be Accessible
Make sure that SQL Server Instances installed on Principal, Mirror & Witness servers are accessible to each other. If remote login for any SQL Server instance is not enabled then you might get this issue. You can enable remote connectivity by enabling TCP/IP and Named Pipes protocols in SQL Server Configuration Manager. Each system must access the ports of the other SQL Server instances over TCP. You can try telnet the SQL Server ports of other partners.
Verify Correct System Details
Sometimes we entered wrong details that end up with throwing errors. Make sure to verify the network address name, mirror server instance name and its port numbers are correct. You can recheck all the details whether you have entered them correctly or not.
Mirror Database Preparation
Verify that the mirror database is ready for database mirroring. We should prepare mirror database before configuring or during configuring database mirroring. It is suggested to keep identical drive path for mirror database files. Below are the steps you should take care for preparing your mirroring database.
- Run full backup and subsequent transactional log backup of the Principal database and copy it to the Mirror server.
- Restore database with same name in norecovery state on Mirror server with the copied backup files from above step. You must ensure that restored database on mirror server should be in restoring mode before starting database mirroring configuration.
One of the probable reason to get error 1418 is partner servers are behind firewall. Make sure that the principal server instance and destination mirror server instance is not behind a firewall and they should talk to each other. Principal server, Mirror server and witness server should be accessible to each other.
Verify that SQL Server port and endpoint ports are enabled and accessible via telnet. If not or you are not able to telnet any of the partner instance from any server participating in mirroring then you should ask your network admins to open these ports to establish the connectivity over given port.
Make sure that endpoint has been created on principal, mirror and witness servers. Verify that the endpoints are started on each partner server instances. You can check endpoint status by running below T-SQL query on each instance.
SELECT state_desc FROM sys.database_mirroring_endpoints
If either endpoint is not started, execute below ALTER ENDPOINT statement to start it.
#Change the name of your endpoints. Here endpoint name is Mirroring ALTER ENDPOINT Mirroring STATE = STARTED AS TCP (LISTENER_PORT = <port_number>) FOR database_mirroring (ROLE = ALL); GO
Recheck that the principal server instance is listening on the port assigned to its database mirroring endpoint and the mirror server instance is listening on its port. If a partner is not listening on its assigned port, modify the database mirroring endpoint to listen on a different port.
Sometimes this issue got fixed by dropping the existing endpoint and recreate it again on partner servers.
Do not use local system account to run SQL Server services. If you don’t have any choice and want to use local system then ensure to use certificates for authentications.
Make sure that service accounts that you are using to run SQL Server services must have CONNECT permission to mirroring endpoints. Also, if you are configuring database mirroring between two domains then the login of one account must be created in master database on the other computer, and that login must be granted CONNECT permissions on the endpoint.
It’s always advisable to use same service accounts to run SQL Server services on all three Instances on Principal, Mirror and Witness server.
You can comment us your experience about fixing this issue. We will update this article with your solution that you have used to fix this issue.
- Fix Error 15141: The server principal owns one or more endpoints and cannot be dropped
- Fix AOAG Error 35250: Joining database on Secondary Replica resulted in an error
- How to Upgrade or Patch Availability Group Instances?
- SQL Server Always On Interview Questions and Answers
Latest posts by Manvendra Deo Singh (see all)
- Understanding Hybrid Buffer Pool in SQL Server - December 30, 2018
- Fix:VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’ - August 30, 2018
- SQL Server Error 5184: Cannot use file ‘I:\Path\Techyaz.mdf’ for clustered server - August 29, 2018