TeamCity 9 server setup timeouts

I am trying to setup TeamCity 9 locally to a local SQL Server instance and get the following error.

Could not connect to host localhost named instance (localdb) \ v11.0. Error: "java.net.SocketTimeoutException: Receive timeout". Check the server and instance names and verify that no firewall is blocking UDP traffic on port 1434. For SQL Server 2005 or later, ensure that the SQL Server Browser service is running on the host.

SQL Exception: Could not connect to host localhost named instance (localdb) \ v11.0. Error: "java.net.SocketTimeoutException: Receive timeout". Check the server and instance names and ensure that no firewall is blocking UDP traffic on port 1434. For SQL Server 2005 or later, ensure that the SQL Server Host Service is running on the host.

I have tested the connection through SSMS and the credentials I provide to the TC web settings are the same. The login has rights to the table.

Using sqljdbc41.jar

It should be something simple.

Thank!

+3


source to share


1 answer


It's hard to figure out what might be the problem for your environment, but I can tell you what worked for me. The key element was the use of the JTDS JDBC driver rather than the Microsoft JDBC driver.

Download the latest driver from http://jtds.sourceforge.net/

Unzip the downloaded zip file to% TEAMCITY_DATA_PATH% / config folder

If you are using NTLM authentication (e.g. Windows) to connect to your database, specify the following for the database.properties file :

# Database: Microsoft SQL server (via jtds driver)   
connectionUrl=jdbc:jtds:sqlserver://localhost:1433/TeamCity
#connectionProperties.user=
#connectionProperties.password=

      



NOTE. This requires the Windows TeamCity service to run under the credentials of the account that owns the database. In addition, the ntlmauth.dll file must be copied from the zip folder of the JTDS \ x86 \ SSO file to the TeamCityHome \ bin folder.

If you are using SQL authentication to connect to your database, specify the following for the database.properties file:

# Database: Microsoft SQL server (via jtds driver)   
connectionUrl=jdbc:jtds:sqlserver://localhost:1433/TeamCity
connectionProperties.user=<SQL Login Name>
connectionProperties.password=<SQL Login Password>

      

Since the JTDS driver does not use the default port, you must specify the port in the value specified for connectionUrl.

If you are using a named instance, you can provide the instance name with the following tools:

For example, if the instance name is sqlexpress, then either add instance to the connection url, for example:

connectionUrl=jdbc:jtds:sqlserver://localhost:1433/TeamCity;instance=sqlexpress

Or specify the corresponding property in the database.properties file:

connectionProperties.instance=sqlexpress

See also: http://confluence.jetbrains.com/display/TCD9/Setting+up+an+External+Database

0


source







All Articles