FATAL: no PostgreSQL user name specified in startup packet
Logs from my postgreSQL instance in my kubernetes cluster when trying to connect to it by doing the following:
const { POSTGRES_DATABASE, POSTGRES_USERNAME, POSTGRES_PASSWORD } = require('../config/config');
const Sequelize = require('sequelize');
const conn = new Sequelize(POSTGRES_DATABASE, {
username: POSTGRES_USERNAME,
password: POSTGRES_PASSWORD
});
config/config.js
const config = {
POSTGRES_DATABASE: 'postgres://postgres/postgresdb',
POSTGRES_USERNAME: 'postgresadmin',
POSTGRES_PASSWORD: 'admin123',
SERVER_PORT: '5000'
}
module.exports = config;
I am using SequelizeJS in nodeJS. http://docs.sequelizejs.com/
It seems like the requests are connecting alright due to seeing the attempts in the postgreSQL logs. However something goes wrong and I wonder if it's wrong with permissions in postgres or the node service.
Appreciate some help or ideas