cant connect to postgres db
smithmanny
HOBBYOP

4 months ago

I'm getting an error when using the pg internal url

received direct SSL connection request without ALPN protocol negotiation extension

$10 Bounty

6 Replies

Railway
BOT

4 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


Can you share the error that you are getting from your application?


Status changed to Awaiting User Response Railway 4 months ago


smithmanny
HOBBYOP

4 months ago

sorry just seeing this.
(node:11) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead.

consumer start: (Use node --trace-deprecation ... to show where the warning was created)

consumer start: Error: Failed query: insert into "waitlist" ("id", "created_at", "updated_at", "email") values (default, default, default, $1) on conflict do nothing

consumer start: params: shakhorsmith@gmail.com

consumer start: at o.queryWithCache (.next/server/chunks/ssr/_ef94ec34._.js:236:41231)

consumer start: at async Object.handler (.next/server/chunks/ssr/_632353c2._.js:13:630)

consumer start: at async f (.next/server/chunks/ssr/_ac79848f._.js:1:5434)

consumer start: at async next (.next/server/chunks/ssr/_ac79848f._.js:1:5379)

consumer start: at async (.next/server/chunks/ssr/_ac79848f._.js:5:2034)

consumer start: at async (.next/server/chunks/ssr/_ac79848f._.js:1:5299)

consumer start: at async f (.next/server/chunks/ssr/_ac79848f._.js:1:5138)

consumer start: at async next (.next/server/chunks/ssr/_ac79848f._.js:1:5379)

consumer start: at async (.next/server/chunks/ssr/_ac79848f._.js:5:1094) {

consumer start: query: 'insert into "waitlist" ("id", "created_at", "updated_at", "email") values (default, default, default, $1) on conflict do nothing',

consumer start: params: [Array],

consumer start: [cause]: AggregateError:

consumer start: at async (.next/server/chunks/ssr/_ef94ec34._.js:236:44756)

consumer start: at async o.queryWithCache (.next/server/chunks/ssr/_ef94ec34._.js:236:41206)

consumer start: at async Object.handler (.next/server/chunks/ssr/_632353c2._.js:13:630)

consumer start: at async f (.next/server/chunks/ssr/_ac79848f._.js:1:5434)

consumer start: at async next (.next/server/chunks/ssr/_ac79848f._.js:1:5379)

consumer start: at async (.next/server/chunks/ssr/_ac79848f._.js:5:2034)

consumer start: at async (.next/server/chunks/ssr/_ac79848f._.js:1:5299)

consumer start: at async f (.next/server/chunks/ssr/_ac79848f._.js:1:5138) {

consumer start: code: 'ECONNREFUSED'

consumer start: }

consumer start: }


Status changed to Awaiting Railway Response Railway 4 months ago


smithmanny

sorry just seeing this. (node:11) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead.consumer start: (Use node --trace-deprecation ... to show where the warning was created)consumer start: Error: Failed query: insert into "waitlist" ("id", "created_at", "updated_at", "email") values (default, default, default, $1) on conflict do nothingconsumer start: params: shakhorsmith@gmail.comconsumer start: at o.queryWithCache (.next/server/chunks/ssr/_ef94ec34._.js:236:41231)consumer start: at async Object.handler (.next/server/chunks/ssr/_632353c2._.js:13:630)consumer start: at async f (.next/server/chunks/ssr/_ac79848f._.js:1:5434)consumer start: at async next (.next/server/chunks/ssr/_ac79848f._.js:1:5379)consumer start: at async (.next/server/chunks/ssr/_ac79848f._.js:5:2034)consumer start: at async (.next/server/chunks/ssr/_ac79848f._.js:1:5299)consumer start: at async f (.next/server/chunks/ssr/_ac79848f._.js:1:5138)consumer start: at async next (.next/server/chunks/ssr/_ac79848f._.js:1:5379)consumer start: at async (.next/server/chunks/ssr/_ac79848f._.js:5:1094) {consumer start: query: 'insert into "waitlist" ("id", "created_at", "updated_at", "email") values (default, default, default, $1) on conflict do nothing',consumer start: params: [Array],consumer start: [cause]: AggregateError:consumer start: at async (.next/server/chunks/ssr/_ef94ec34._.js:236:44756)consumer start: at async o.queryWithCache (.next/server/chunks/ssr/_ef94ec34._.js:236:41206)consumer start: at async Object.handler (.next/server/chunks/ssr/_632353c2._.js:13:630)consumer start: at async f (.next/server/chunks/ssr/_ac79848f._.js:1:5434)consumer start: at async next (.next/server/chunks/ssr/_ac79848f._.js:1:5379)consumer start: at async (.next/server/chunks/ssr/_ac79848f._.js:5:2034)consumer start: at async (.next/server/chunks/ssr/_ac79848f._.js:1:5299)consumer start: at async f (.next/server/chunks/ssr/_ac79848f._.js:1:5138) {consumer start: code: 'ECONNREFUSED'consumer start: }consumer start: }

4 months ago

Hey, I see that the error you're getting is different from what you told us. It appears your NodeJS application is experiencing connection refused errors when attempting to connect. Please ensure your credentials are correct and that the database is operational.

As a last resort, try connecting to your database via a database viewer or using the data tab.


smithmanny
HOBBYOP

4 months ago

I'm using the env variable provided by Railway to connect to my db. I can access the db viewer and inspect tables with no problems


smithmanny

I'm using the env variable provided by Railway to connect to my db. I can access the db viewer and inspect tables with no problems

4 months ago

If you're able to connect to your database through the DB viewer, then I would start examining your code. Additionally, I see mentions of query cache, which might require a Redis instance or similar caching system that may not currently exist.


Loading...