Open juancarlosv2711 opened 2 days ago
The app is attempting to connect to PostgreSQL on 127.0.0.1 (localhost) instead of your RDS instance. This is likely because the database connection details in your default.json configuration file aren't being properly loaded, or the app is hardcoded to connect to localhost
Try this telnet endpoint.rds.amazonaws.com 5432 and tell what response do you get
It seems that at the deploymoment, the instance is trying to connect to postgres locally (127.0.0.1) instead of rds set up.
I have followed documentation here
An i have also created the /var/www/html/current/config/default.json path
The file looks something like this
This is the error I get after runnning
pm2 start npm -- start
(bash script)`/home/ubuntu/.pm2/logs/npm-out.log last 15 lines: 0|npm | address: '127.0.0.1', 0|npm | port: 5432 0|npm | } 0|npm | 0|npm | > start 0|npm | > evershop start 0|npm | 0|npm | Error: connect ECONNREFUSED 127.0.0.1:5432 0|npm | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1549:16) { 0|npm | errno: -111, 0|npm | code: 'ECONNREFUSED', 0|npm | syscall: 'connect', 0|npm | address: '127.0.0.1', 0|npm | port: 5432 0|npm | }
/home/ubuntu/.pm2/logs/npm-error.log last 15 lines: 0|npm | npm ERR! enoent This is related to npm not being able to find a file. 0|npm | npm ERR! enoent 0|npm | 0|npm | npm ERR! A complete log of this run can be found in: 0|npm | npm ERR! /home/ubuntu/.npm/_logs/2024-11-21T00_02_26_682Z-debug-0.log 0|npm | npm ERR! code ENOENT 0|npm | npm ERR! syscall open 0|npm | npm ERR! path /var/www/html/package.json 0|npm | npm ERR! errno -2 0|npm | npm ERR! enoent ENOENT: no such file or directory, open '/var/www/html/package.json' 0|npm | npm ERR! enoent This is related to npm not being able to find a file. 0|npm | npm ERR! enoent 0|npm | 0|npm | npm ERR! A complete log of this run can be found in: 0|npm | npm ERR! /home/ubuntu/.npm/_logs/2024-11-21T00_02_27_205Z-debug-0.log
`