Facing server error in Lambda(Node.js) after MSSQL package update

0

On updating the MSSQL package from Version6.2.0 to Version9.1.0 in package.json file , we are facing the below error .

Failed to connect to Server1_name - Hostname/IP does not match certificate's altnames: Host: Server1_name is not in the cert's altnames: DNS:Server2_name

The lambda is written in Node.js, lambda connects to mssql server in npm mssql version 6.2.0 but throws the above error in npm mssql version 9.1.1 We upgraded the version for resolving the security vulnerability reported for dependency package (xmldom).

Please guide what can be the ways to resolve the error and the root cause.

  • It would be helpful if you gave the exact library that you're referring to. For .NET code in Lambda, typically people are using either the older System.Data.SqlClient (max version 4.8.5) or the newer and recommended package Microsoft.Data.SqlClient (max version 5.1.0). There's an entity framework core package Microsoft.EntityFrameworkCore.SqlServer (max version 7.0.3) and the older Entity Framework 6 package EntityFramework (max version 6.4.4).

    Since none of these are available in version 9.1.0, it's not clear exactly what library you're using. Are you possibly using the magic.lambda.mssql library? Or something else?

  • Hi , The lambda is written in Node.js and we have package.json file were the packages required and its dependencies mentioned . Based on a security vulnerability reported for dependency package(xmldom) we had to upgrade the MSSQL package in Visual Studio Code from Version 6.2.0 to Version 9.1.1 which is leading to the above error . We dont have the sql server connection error in lambda when the MSSQL version is 6.2.0. The mentioned versions are Npm MSSQL versions

1개 답변
2

According to error, there is a certificate mismatch between the server name and the alternative names listed in the certificate.

To resolve this issue, you can try the following steps:

  1. Check the certificate to make sure it is valid and has the correct alternative names listed.
  2. Ensure that the server name is correct and matches the name listed in the certificate.
  3. If the certificate is not valid or does not have the correct alternative names, update or replace the certificate.
  4. If the server name has changed, update any references to the old name with the new name.
  5. Check the network configuration to ensure that there are no issues with DNS resolution or routing that could be causing the error.
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠