Error: The Driver Received an Unexpected Pre-login Response
Issue
The following error appears in Fivetran:
Unable to connect to database. com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 127.0.0.1, port <port_number> has failed. Error: The driver received an unexpected pre-login response. Verify the connection properties and check that an instance of SQL Server is running on the host.
Environment
Connector: SQL Server
Resolution
To resolve this issue, do the following:
- Confirm that the SQL Server instance is running and accepting connections on the port referenced in the error. Use SQL Server Management Studio (SSMS) or run a Telnet command to verify that the port is open.
- Verify that the SSH tunnel is correctly configured and points to the correct SQL Server instance. Ensure the
autossh
process is running and the tunnel is active. - Check for firewalls or network configurations that may block the connection. Ensure the SQL Server port (usually
1433
) is open. - Ensure your SQL Server instance is configured to allow TCP/IP connections. For more information, see our Allow TCP/IP protocol documentation.
- From the SSH host, run the following command to test connectivity. Replace the relevant placeholders with the host IP and port number.
telnet <host_ip> <port_number>
. - Check for recent changes to the SSH host or SQL Server instance that could impact the connection.
If the issue persists, contact our support team with the full error details.
Cause
This error usually indicates an issue with the TCP/IP connection settings used by SQL Server to connect. This may happen when connection properties are misconfigured or network issues prevent communication with the SQL Server instance.