I am currently preparing to put my web application for production. I'm using an Amazon EC2 on Redhat and have a Postgres AWS RDS in the same VPC. I cant seem to connect to the database or to a local one running on the same EC2. I have had no issues while running and testing my app on my local mac and another physical server in our office that runs Redhat 7.
I'm running the 'sails lift' command with my models set to migrate:'alter' so that it can properly set up the Database with my models and configurations, however it gets hung on a 'Waiting...' command in the middle of the orm hook as in the image.
default: {
adapter: 'sails-postgresql',
host: 'localhost',
port: 5432,
user: 'exampleuser',
password: 'thepassword',
database: 'newdb',
},
I can connect to my RDS database and the local one using psql without any issues and with PGadmin. This exactly datastores setup works with my Mac and with our physical Redhat server using their own respective local postgres instances. On the Amazon EC2s however Im running into the problem from the image.
I have also tried running a complete base sails app made with 'sails new newBaseApp' and set up the datastore in that to connect to the local postgres database on the ec2 server. It has the exact same problem.