App Control Fails to Connect to SQL With Prelogin Failure
search cancel

App Control Fails to Connect to SQL With Prelogin Failure

book

Article ID: 402699

calendar_today

Updated On: 06-30-2025

Products

Carbon Black App Control

Issue/Introduction

  • Cannot access the App Control Console because it can't connect to the database
  • TLS errors may appear in the event viewer
  • The serverlog.bt9 file may contain the following errors
    [Microsoft][SQL Server Native Client 11.0]Client unable to establish connection
    [Microsoft][SQL Server Native Client 11.0]Invalid connection string attribute
    [Microsoft][SQL Server Native Client 11.0]Client unable to establish connection due to prelogin failure
    CConnection::Connect: Giving up on trying to reconnect to the database.
    Statement returned error [0]: <<Internal: Unknown>>
     Statement: SET NOCOUNT ON;SELECT key_id, private_key, public_key FROM dbo.communication_keys WITH (NOLOCK) WHERE key_state = 1
    Error: Extra Result Set: 1, SQLMoreResults returns SQL_INVALID_HANDLE, Statement: SET NOCOUNT ON;SELECT key_id, private_key, public_key FROM dbo.communication_keys WITH (NOLOCK) WHERE key_state = 1 
    Connection attempt failed: [Microsoft][SQL Server Native Client 11.0]Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation (memory or maximum allowed connections) on the server.
    [Microsoft][SQL Server Native Client 11.0]TCP Provider: An existing connection was forcibly closed by the remote host.
    
    OR
    
    [Microsoft][SQL Server Native Client 11.0]Client unable to establish connection
    [Microsoft][SQL Server Native Client 11.0]Invalid connection string attribute
    [Microsoft][SQL Server Native Client 11.0]Client unable to establish connection due to prelogin failure
    CConnection::Connect: Giving up on trying to reconnect to the database.
    Statement returned error [0]: <<Internal: Unknown>> Statement: SET NOCOUNT ON;{CALL dbo.InsertCommunicationKey (?,?)}
    Error: Extra Result Set: 1, SQLMoreResults returns SQL_INVALID_HANDLE, Statement: SET NOCOUNT ON;{CALL dbo.InsertCommunicationKey (?,?)}

Environment

  • Two Tier App Control Server: All Supported Versions

Cause

Network, TLS, or SQL connection issue between the App Control and SQL Server

Resolution

  • Make sure the two servers are using the same TLS version
  • Make sure the latest version of TLS is being used
  • Rebooting the SQL server and the App Control server together has been seen to resolve this issue

Additional Information