0

我正在尝试在 Google Cloud 功能上运行 sequelize,并尝试连接到 compose.com 上托管的远程数据库,但出现此错误

`

 SequelizeHostNotFoundError: getaddrinfo ENOTFOUND gcp-us-east1-
cpu.2.dblayer.com gcp-us-east1-cpu.2.dblayer.com:16070
at connection.connect.err 
 (/user_code/node_modules/sequelize/lib/dialects/postgres/connection-
  manager.js:95:24)
  at Client.<anonymous> 
 (/user_code/node_modules/pg/lib/client.js:203:5)
  at emitOne (events.js:96:13)
  at Connection.emit (events.js:188:7)
  at Socket.<anonymous> 
 (/user_code/node_modules/pg/lib/connection.js:86:10)
  at emitOne (events.js:96:13)
  at Socket.emit (events.js:188:7)
  at connectErrorNT (net.js:1020:8)
  at _combinedTickCallback (internal/process/next_tick.js:74:11)
  at process._tickDomainCallback (internal/process/next_tick.js:122:9)

`

有什么想法我可能做错了吗?

4

1 回答 1

0

我发现了问题。如果我没有订阅 Google Cloud Functions 上的付费计划,我将无法连接到外部 API 或地址。

于 2017-07-01T10:45:47.733 回答