How to solve the error SequelizeHostNotFoundError?

时间:2018-02-03 08:24:01

标签: node.js postgresql express google-cloud-platform sequelize.js

Problem essence

Writing the API server in NodeJS (Express) using the PostgreSQL database (connecting to it remotely through the service ElephantSQL and work through Sequelize). Today appeared an error "SequelizeHostNotFoundError". It occurs even in the checked endpoints.

Error text

enter image description here (it remains only a screenshot of the error)

My attempts to solve the problem

  1. Tried to perform a GET request to my API not via Postman and via the browser (did not help).

  2. Tried to create a new DB on the same service ElephantSQL (didn't help, but migrations to create new tables and relationships somehow executed and endpoints still not working).

  3. Tried to connect to the database directly via IDE DataGrip (connection test is successful and the database is loaded with all the tables).

What could be the problem ? On stackoverflow some wrote that the problem may occur due to the lack of a paid subscription to Google Cloude Functions, but I do not seem to use it. There is an option to connect to PostgreSQL locally, but I want to understand.

0 个答案:

没有答案