Sidebar

How to resolve. The TCP/IP connection to the host QIE-SQLServer, port 1433 has failed.

0 votes
1.7K views
asked Nov 18, 2015 by rich-c-2789 (16,180 points)

I get the following error:

The TCP/IP connection to the host QIE-SQLServer, port 1433 has failed. Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".

my connection info looks like this:

-Dconnection.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
-Dconnection.url=jdbc:sqlserver://QIE-SQLServer;instance=QveraInterfaces;databaseName=QIE;
-Dhibernate.dialect=com.qvera.qie.persistence.SQLServer2008UnicodeDialect

1 Answer

0 votes

This error usually means that it is using the wrong port.  The default port for SQL Server is 1433.  Installs with multiple Sql Server instances are the most likely to use a different port (one for each Sql Server instance).

Steps to check/find the correct port:

If you have access to login to the Sql Server via SSMS then you can run this query:

select distinct local_net_address, local_tcp_port 
from sys.dm_exec_connections where local_net_address is not null
You can also find it in Sql Server Configuration Manager
 
What to do with the correct port:
 
Add it to your connection URL:
-Dconnection.url=jdbc:sqlserver://QIE-SQLServer;instance=QveraInterfaces;port=6033;databaseName=QIE;
or if you using the short hand version for your connection string:
-Dconnection.url=jdbc:sqlserver://QIE-SQLServer\QveraInterfaces:6033;databaseName=QIE;
answered Nov 18, 2015 by rich-c-2789 (16,180 points)
...