Issue with Postgres on deployment

Hello, My node.js backend for a python-based bot is crashing on deployment because of an error connecting to the Postgres database. The DB is in the same service stack. The application uss only the DATABASE_URL with all of the correct parameters pasted from what Railway tells me, so I do not understand why a localhost ip is even there. The full error log is as follows:
npm WARN config production Use `--omit=dev` instead.
> node ./app/app.js
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/node-config/node-config/wiki/Strict-Mode
Thu, 04 May 2023 11:39:22 GMT node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. at node:internal/modules/cjs/loader:1155:14
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/node-config/node-config/wiki/Strict-Mode
Thu, 04 May 2023 11:39:23 GMT node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. at node:internal/modules/cjs/loader:1155:14
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect ECONNREFUSED 127.0.0.1:5432
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 5432
}
npm WARN config production Use `--omit=dev` instead.
> node ./app/app.js
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/node-config/node-config/wiki/Strict-Mode
Thu, 04 May 2023 11:39:22 GMT node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. at node:internal/modules/cjs/loader:1155:14
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/node-config/node-config/wiki/Strict-Mode
Thu, 04 May 2023 11:39:23 GMT node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. at node:internal/modules/cjs/loader:1155:14
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect ECONNREFUSED 127.0.0.1:5432
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 5432
}
project id: 578ca578-fb97-4683-b8ef-2c59b4a09608 I also get the notification "Looks like your app is listening on 127.0.0.1. You may need to listen on 0.0.0.0 instead." I read through that documentation intensively but being new to Railway I do not know how to actually have the program listen to that, since it is a mystery for me.
2 Replies
Percy
Percy2y ago
Project ID: 578ca578-fb97-4683-b8ef-2c59b4a09608
gnuumer
gnuumerOP2y ago
the postgre database says in log that its running on 0.0.0.0, port is correct at 5432
Want results from more Discord servers?
Add your server