If you use sequelize as your ORM with postgres database, you may see this error code, especially for first-timer, including me. Found out the problem from this discussion . Just define the 'port' property with 5432 (default postgres port) will fix the problem.
var orm = new sequelize('database', 'user', 'password', {
dialect: 'postgres',
host: 'localhost',
port: '5432' /* define database port */
});