Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.2K
Views
node:10212[DEP0123]DeprecationWarning:Setting the TLS ServerName to an IPaddress is not permitted by RFC 6066.This will be ignored in a future version

Below is my nodejs code to connect to a mssql database and query data

const sql = require('mssql')
export class GetJDBCCasedata {
  async fetchData(wellid, wellboreid, designid) {
    var result
     console.log("In fetchdata")
const sqlConfig = {
  user: 'root',
  password:'root',
  database: 'student',
  server: '12.11.234.12',
 /* pool: {
    max: 10,
    min: 0,
    idleTimeoutMillis: 30000
  },*/
  options: {
    encrypt: true,
    trustServerCertificate: true,
  }
}
console.log("CONFIG FOR SERVER "+JSON.stringify(sqlConfig))
 try {
  console.log("Connecting to database")
  result=await sql.connect(sqlConfig)
  console.log("Connected to database")
 } catch (err) {
  result=err
  console.log("ERROR OCCURRED "+err)
 }
return result
  }
}

The code runs fine and I get the message as "Connected to database". However I get a message as "(node:10212) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version." What can I do to get rid of it?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I solved same issue by encrypt:false.

options: {
encrypt: false,
trustServerCertificate: true,
}
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!