Skip to content

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

Closed

Description

@bnoordhuis

#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?

Activity

  1. added
    dnsIssues and PRs related to the dns subsystem.
    feature requestIssues requesting new Node.js features.
    on Oct 7, 2016
  2. cjihrig commented on Oct 8, 2016

    @cjihrig
    Contributor

    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.

  3. weagle08 commented on Oct 16, 2016

    @weagle08

    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.

  4. Trott commented on Jul 15, 2017

    @Trott
    Member

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

  5. mika-fischer commented on Jul 15, 2017

    @mika-fischer
    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.

  6. bnoordhuis commented on Jul 17, 2017

    @bnoordhuis
    MemberAuthor

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

  7. mika-fischer commented on Jul 27, 2017

    @mika-fischer
    Contributor

    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...

  8. ryzokuken commented on Mar 4, 2018

    @ryzokuken
    Contributor

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

  9. bnoordhuis commented on Mar 5, 2018

    @bnoordhuis
    MemberAuthor

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

  10. mika-fischer commented on Mar 5, 2018

    @mika-fischer
    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?

  11. bnoordhuis commented on Mar 5, 2018

    @bnoordhuis
    MemberAuthor

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

  12. mika-fischer commented on Mar 5, 2018

    @mika-fischer
    Contributor

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

  13. dhanushuUzumaki commented on Apr 21, 2018

    @dhanushuUzumaki
    Contributor

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

  14. bnoordhuis commented on Apr 21, 2018

    @bnoordhuis
    MemberAuthor

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

  15. refack commented on Nov 11, 2018

    @refack
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dnsIssues and PRs related to the dns subsystem.feature requestIssues requesting new Node.js features.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions