Unable to connect On-prem SQL server outside the local server getting connection timeout expired

Arun Singh 1 Reputation point
2022-12-26T18:54:29.91+00:00

Hi Team

I´m facing a problem without solution

Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed, or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=1107; handshake=29721; (Microsoft SQL Server, Error: -2)

I am not able to connect SQL server from other than local machine. SQL Services are up and running.

I checked firewall settings, and everything seems ok from another machine.

Note: Both machines are in different domain.274152-image.png

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,492 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2022-12-26T19:44:00.177+00:00

    Note: Both machines are in different domain.

    That may be the issue. For cross-domain login to work with Windows authentication, there needs to be trust between the domains. And maybe a few more stars have to align,

    Is the other SQL Server instance configured for mixed-mode authentication? If so, can yo create an SQL login and test with that login?

    Also, can you test with a completely bogus server name in the other domain? This should obviously result in an error, but which error message? The same as above, or a different one? (I expect a different one, but I'd like to verify.)

    0 comments No comments

  2. jose de jesus 141 Reputation points
    2022-12-27T04:31:45.777+00:00

    Somebody might have modified the service account that sql server is using and kerberos authentication starts failing
    if you can use SQL server from within the SQLHost then it is defineitely a kerberos problem

    You can use this free tool from MS to analyze -- Microsoft® Kerberos Configuration Manager for SQL Server®
    link is below

    https://www.microsoft.com/en-us/download/details.aspx?id=39046

    If you want to resolve it without the wizard you need to configure the SPN for sql server yourself.
    https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/register-a-service-principal-name-for-kerberos-connections?view=sql-server-ver16

    0 comments No comments

  3. Seeya Xi-MSFT 16,586 Reputation points
    2022-12-27T06:32:01.753+00:00

    Hi @Arun Singh ,

    Have you tried logging in with your SQL account? If there is no problem with SQL account, then the problem is due to the fact that you have not set up mutual trust between different domains.

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.