I am making a connection to mssql using typeorm and getting error

Kasthuri C M 20 Reputation points
2024-07-11T13:58:53.66+00:00

Hi,

I am trying to create connection to my mssql server using typeorm in node 20 application.
I am getting socket hang-up error, the connection gets created if I set encrypt to false. I tried all tls configuration and everything but I am not able to solve this error.
Node version: 20.15.0
mssql: 10.11.0
Please help.

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

Accepted answer
  1. LucyChenMSFT-4874 4,750 Reputation points
    2024-07-12T02:02:57.3366667+00:00

    Hi @Kasthuri C M ,

    Thank you for your reaching out and welcome to Microsoft Q&A!

    You mentioned that:

    I am getting socket hang-up error, the connection gets created if I set encrypt to false.

    Encrypt=false indicates the client does not require encryption, this is the cause of creating successfully. TLS will still use when possible, encrypting login credentials at a minimum. Below is the relevant excerpt from the encryption support.

    User's image

    I am getting socket hang-up error

    Could you please post the detailed error messages here to help us narrow down the issue?

    Thanks for your understanding. Your time and cooperation are much valued by us. We are looking forward to hearing from you to assist further.

    Best regards,

    Lucy Chen


    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.

    https://docs.microsoft.com/en-us/answers/support/email-notifications


0 additional answers

Sort by: Most helpful

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.