Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"node boltzmann" silently exits if postgres is enabled but not available #38

Closed
chrisdickinson opened this issue Sep 18, 2020 · 5 comments

Comments

@chrisdickinson
Copy link
Contributor

tested on node 14

@ceejbot ceejbot self-assigned this Sep 21, 2020
@ceejbot
Copy link
Contributor

ceejbot commented Sep 21, 2020

Confirmed on node 14.11. With node 12.18, errors as expected:

hello|⇒ node boltzmann.js
Error: connect ECONNREFUSED 127.0.0.1:5432
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)

Sticking a try/catch and some logging around the pool.connect() says the exit is happening in pg somewhere.

@ceejbot
Copy link
Contributor

ceejbot commented Sep 21, 2020

Fixed in the latest pg:

hello|⇒ npm install pg@latest
+ pg@8.3.3
hello|⇒ node boltzmann.js
Error: connect ECONNREFUSED 127.0.0.1:5432
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
hello|⇒ volta install node@14
success: installed and set node@14.11.0 (with npm@6.14.8) as default
hello|⇒ node boltzmann.js
Error: connect ECONNREFUSED 127.0.0.1:5432
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1145:16)

@ceejbot
Copy link
Contributor

ceejbot commented Sep 21, 2020

Leaving this open for now because we don't want to upgrade to pg@latest because of problems related to this bug: brianc/node-postgres#1872 . Looking for a way to sponsor a fix.

@ceejbot ceejbot removed their assignment Sep 21, 2020
@ceejbot
Copy link
Contributor

ceejbot commented Dec 13, 2020

We've sponsored a fix to this problem in pg, upgraded, and have now resolved this problem.

@ceejbot ceejbot closed this as completed Dec 13, 2020
@laurisvan
Copy link

@ceejbot Just to double-check - the related issue (brianc/node-postgres#1872) in pg is still open and I just checked it exist in the latest release. Was the root cause of the problem you experienced something different, after all? If it was the same issue, where did the fix land?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants