Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
dns.resolveSrv returns ECONNREFUSED on Windows since v24.13.0 (still broken in v25.x) | GoodFirstPicks

dns.resolveSrv returns ECONNREFUSED on Windows since v24.13.0 (still broken in v25.x)

nodejs/node 2 comments 12d ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeTest focusedNode.jsJavaScript

Why this is a good first issue

Windows-specific DNS SRV resolution issue requiring investigation of c-ares integration.

AI Summary

The issue involves SRV DNS resolution failing consistently on Windows since Node.js v24.13.0, likely related to c-ares integration changes. The problem is reproducible and requires debugging the Windows-specific DNS handling code. The fix may involve changes to the DNS subsystem or c-ares configuration.

Issue Description

Version

v24.14.0, v25.8.1

Platform

Microsoft Windows NT 10.0.26200.0 x64

Subsystem

dns (c-ares)

What steps will reproduce the bug?

Run the following script:

const dns = require("dns");

dns.resolveSrv("_mongodb._tcp.mongodb.<your-cluster>.mongodb.net", (err, addresses) => {
  console.log(err ? `error ${err.code}: ${err.message}` : addresses);
});

Run with Node.js >= v24.13.0 on Windows.

How often does it reproduce? Is there a required condition?

100% reproducible on Windows.

No special conditions required.

What is the expected behavior? Why is that the expected behavior?

The SRV query should resolve successfully and return records.

Example output (Node v24.12.0 and v25.2.1):

[
  {
    name: 'shard-00-00.<your-cluster>.mongodb.net',
    port: 27017,
    priority: 0,
    weight: 0,
    type: 'SRV'
  },
  {
    name: 'shard-00-01.<your-cluster>.mongodb.net',
    port: 27017,
    priority: 0,
    weight: 0,
    type: 'SRV'
  },
  {
    name: 'shard-00-02.<your-cluster>.mongodb.net',
    port: 27017,
    priority: 0,
    weight: 0,
    type: 'SRV'
  }
]

This behavior is consistent with:

  • previous Node.js versions
  • Node.js v25.2.1
  • other platforms (tested on Linux)

What do you see instead?

error ECONNREFUSED: querySrv ECONNREFUSED _mongodb._tcp.<your-cluster>.mongodb.net

This happens consistently even with valid public DNS resolvers configured on the system.

Additional information

This appears related to the issue described in #61435 and the fix in #61453 (commit 17b363a66c).

However, the problem persists on Windows.

From testing:

  • Node.js 24:

    • Last known working version: v24.12.0
    • First broken version: v24.13.0+
  • Node.js 25:

    • Last known working version: v25.2.1
    • Reproducible in all tested versions up to v25.8.1

The issue is 100% reproducible and specifically affects SRV resolution (dns.resolveSrv).

The issue does not occur in earlier versions and is theref

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!

Risk Flags

  • Windows-specific
  • DNS subsystem
  • c-ares dependency
Loading labels...

Details

Points20 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedyes