Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.2K
Vistas
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 Respuestas
Responde la pregunta

0

I solved same issue by encrypt:false.

options: {
encrypt: false,
trustServerCertificate: true,
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda