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

dns: don't skip getaddrino/getnameinfo when c-ares init fails #8966

Closed
bnoordhuis opened this issue Oct 7, 2016 · 14 comments
Closed

dns: don't skip getaddrino/getnameinfo when c-ares init fails #8966

bnoordhuis opened this issue Oct 7, 2016 · 14 comments
Labels
dns Issues and PRs related to the dns subsystem. feature request Issues that request new features to be added to Node.js. help wanted Issues that need assistance from volunteers or PRs that need help to proceed.

Comments

@bnoordhuis
Copy link
Member

#8710 makes process.binding('cares_wrap') throw a JS exception instead of aborting when ares_library_init() or ares_init_options() fail.

Maybe we can do better. We can still bring up the bindings for getaddrinfo and getnameinfo because those don't depend on c-ares (although if c-ares fails, there is a goodly chance the others won't work either.)

Policy question: do we think it's better to quit or keep on trucking in a franken-init state?

@bnoordhuis bnoordhuis added dns Issues and PRs related to the dns subsystem. feature request Issues that request new features to be added to Node.js. labels Oct 7, 2016
@cjihrig
Copy link
Contributor

cjihrig commented Oct 8, 2016

do we think it's better to quit or keep on trucking in a franken-init state?

My vote is to quit. If people really need the franken-init state, perhaps we could add flag for it.

@weagle08
Copy link

i'd like some way around this. my set up is just setting up a LAN with a switch and letting windows assign an IP and Mask, however no DNS is set. The machines should still be able to communicate with no DNS set.

@Trott
Copy link
Member

Trott commented Jul 15, 2017

@bnoordhuis @cjihrig Should this remain open? If so, should we add help wanted and maybe even mentor available?

@mika-fischer
Copy link
Contributor

We have a client server application with a C++/Qt UI and a NodeJS backend (running as a windows service). We've seen this bug only once but in that case it prevents our application (which needs only to listen on 127.0.0.1 and needs no DNS) from working.

So we would also be interested in a fix.

@bnoordhuis bnoordhuis added help wanted Issues that need assistance from volunteers or PRs that need help to proceed. mentor-available labels Jul 17, 2017
@bnoordhuis
Copy link
Member Author

I'm on the fence myself but happy to review pull requests or answer questions. Labels added.

@mika-fischer
Copy link
Contributor

mika-fischer commented Jul 27, 2017

Looks like this might be fixed in c-ares 1.13.0:
c-ares/c-ares@55bbe92
https://c-ares.haxx.se/mail/c-ares-archive-2017-06/0003.shtml

EDIT: Actually, looks like it should already be fixed in 1.12...

@ryzokuken
Copy link
Contributor

It is fixed already? In that case, should this issue be closed?

@bnoordhuis
Copy link
Member Author

Not fixed and no consensus on whether it should be fixed.

@mika-fischer
Copy link
Contributor

@bnoordhuis I think this is actually two issues now:

  1. What to do if ares_library_init() or ares_init_options() fail and
  2. Updating c-ares so that ares_init_options() don't fail under benign circumstances (like network with no DNS configured).

I don't care much about 1) but I do care about 2). Do you mean to say that c-ares might never be updated in Node.js?

@bnoordhuis
Copy link
Member Author

This issue is about (1), not (2). If you want to see c-ares updated, can you file a new issue?

@mika-fischer
Copy link
Contributor

Actually, c-ares 1.13 it's already in Node 9, so 2) is not relevant anymore. Sorry for the noise!

@dhanushuUzumaki
Copy link
Contributor

Hi, Is this available? I would like to work on this.

@bnoordhuis
Copy link
Member Author

@dhanushuUzumaki See #8966 (comment). You're welcome to open a pull request but I can't promise it'll be accepted.

@refack
Copy link
Contributor

refack commented Nov 11, 2018

Put into https://github.com/nodejs/node/projects/13 backlog

@refack refack closed this as completed Nov 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dns Issues and PRs related to the dns subsystem. feature request Issues that request new features to be added to Node.js. help wanted Issues that need assistance from volunteers or PRs that need help to proceed.
Projects
None yet
Development

No branches or pull requests

8 participants