Postgres database configuration issues

I am building my first project in a while. When I look at my variables I have: DATABASE_URL: postgresql://postgres:[email protected]:5432/railway but I keep running into an issue like this: { databaseUrl: 'postgresql://postgres:[email protected]:5432/railway' } Using environment: production getaddrinfo ENOTFOUND postgres.railway.internal Error: getaddrinfo ENOTFOUND postgres.railway.internal at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) βœ— railway run ping postgresql://postgres:[email protected]:5432/railway ping: cannot resolve postgresql://postgres:[email protected]:5432/railway: Unknown host what can I do to get the postgres instance connected?
9 Replies
Percy
Percyβ€’4w ago
Project ID: 90fe61f2-e607-4d1c-b46e-c464d225b530
Amy Detwiler
Amy DetwilerOPβ€’4w ago
project id: 90fe61f2-e607-4d1c-b46e-c464d225b530/
Brody
Brodyβ€’4w ago
locally you must use the public host and port. please know that railway run, runs the command locally.
Amy Detwiler
Amy DetwilerOPβ€’4w ago
Would there be an issue if I accidentally did rails up when linked to the postgres server?
Brody
Brodyβ€’4w ago
only a temporary issue, you would need to redeploy the database image from the deployment's 3-dot menu you wouldn't lose any data
Amy Detwiler
Amy DetwilerOPβ€’4w ago
that could be a part of my issue, thank you well, the initial migration hasn't even run yet Thank you! I didn't realize that's how railway link worked
Brody
Brodyβ€’4w ago
no problem!
Amy Detwiler
Amy DetwilerOPβ€’4w ago
While I have your attention: is there a reason why I would get a 500 error for my internal api calls? Listening on http://[::]:8080 error: select distinct on ("f"."ticker") "fd".*, "f"."ticker", "f"."name", "f"."company", "f"."site", "f"."distribution_frequency", "f"."underlying", ( ) AS avg_all_time from "fund_distributions" as "fd" inner join "funds" as "f" on "fd"."fund_id" = "f"."id" where fd.next_declaration_date_on = (SELECT MAX(next_declaration_date_on) FROM fund_distributions WHERE fund_id = fd.fund_id) - relation "fund_distributions" does not exist at Parser.parseErrorMessage (/app/.output/server/node_modules/pg-protocol/dist/parser.js:283:98) at Parser.handlePacket (/app/.output/server/node_modules/pg-protocol/dist/parser.js:122:29) at Parser.parse (/app/.output/server/node_modules/pg-protocol/dist/parser.js:35:38) at Socket.<anonymous> (/app/.output/server/node_modules/pg-protocol/dist/index.js:11:42) at Socket.emit (node:events:517:28) at addChunk (node:internal/streams/readable:368:12) at readableAddChunk (node:internal/streams/readable:341:9) at Readable.push (node:internal/streams/readable:278:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23) { length: 119, severity: 'ERROR', code: '42P01', detail: undefined, hint: undefined, position: '2478', internalPosition: undefined, internalQuery: undefined, where: undefined, schema: undefined, table: undefined, column: undefined, dataType: undefined, constraint: undefined, file: 'parse_relation.c', line: '1449', routine: 'parserOpenTable' } At least the table exists in my Postgres instance now πŸ˜…
Brody
Brodyβ€’4w ago
fund_distrobutions does not exist
Want results from more Discord servers?
Add your server