0

I'm trying to connect my azure postgresql database to my sails app, using sails-postgresql adapter my connection url is this

url:'postgresql://<username>@<servername>:<password>@<servername>.postgres.database.azure.com:5432/<dbname>',

postgresql adapter

When I lift the sails app it returns this

error: Failed to lift app: Exception: `getConnection` failed ("failed").  Could not acquire a connection to the database using the specified manager.
Additional data:

error: More details (raw): {
  error: Error: getaddrinfo ENOTFOUND <server name>
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26) {
    errno: -3008,
    code: 'ENOTFOUND',
    syscall: 'getaddrinfo',
    hostname: '<server name>'
  },
  meta: undefined
}

I found same issue on github Issue

This answer is for nodejs, but when it comes to sailsjs it does not work,

I also tried replacing @ in the middel of and with %40 but it didnot work.

Im using node v14.19.3 and sails v1.5.3

Can you guys help me with this issue. Thanks in advance

0 Answers0