Closed windxnd closed 4 months ago
If the certificate is self-signed, you'll get this error. You'll either need to trust the certificate, or you'll need to get a certificate issued for it by a trusted CA.
@dhensby When setting up MSSQL and EC2, I did not use any certificates.
i also tried creating a certificate on EC2 and using it on the SQL service, but when setting trustServerCertificate: false, I still received an error message.
Receiving an error for self signed certificates is expected when you have not set it to be trusted.
@dhensby if i set trustServerCertificate: false in production environment, what do I need to config to be able to connect to MSSQL on EC2? This is my first time working with MSSQL on EC2. Please help me.
I'm afraid I'm unable to provide infrastructure support, the issue tracker is intended to just be for bug reporting.
As I've mentioned before, you have a few options. set trustServerCertificate: true
to silence the error (not recommended), add the certificate the SQL server is using to the trusted CAs for node, or obtain a properly issued TLS certificate for your SQL server.
After I tried to upgrade the MSSQL version from 6.2.0 to 10.0.2 in the production environment of a Lambda function in Node.js to connect to MSSQL on EC2 instance, I received an error regarding a self-signed certificate
Expected behaviour:
Connection is established and fetching works as usual.
Actual behaviour:
Because it is a production environment, I had to configure trustServerCertificate: false and I got an error message when connecting to MSSQL: ConnectionError: Failed to connect to ec2-xx-xxx-xxx-117.ap-northeast-1.compute.amazonaws.com:1433 - self signed certificate
Configuration:
Software versions