[Port dspace-9_x] Fix for issue #4960 PM2 cluster mode ECONNREFUSED errors#5046
Merged
tdonohue merged 3 commits intodspace-9_xfrom Jan 27, 2026
Merged
[Port dspace-9_x] Fix for issue #4960 PM2 cluster mode ECONNREFUSED errors#5046tdonohue merged 3 commits intodspace-9_xfrom
tdonohue merged 3 commits intodspace-9_xfrom
Conversation
Node.js 17+ changed DNS resolution to prefer IPv6 over IPv4. When running
in PM2 cluster mode, this causes "ECONNREFUSED ::1:8080" errors if the
backend only listens on IPv4 (127.0.0.1).
This fix sets dns.setDefaultResultOrder('ipv4first') at the very start
of the SSR bootstrap to ensure localhost resolves to IPv4.
See: nodejs/node#40537
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit 5e7a2de)
- Change from namespace import to named import (import/no-namespace) - Move DNS configuration after all imports (import/first) - Fix import ordering (simple-import-sort/imports) All linting errors resolved. No functional changes to the DNS fix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> (cherry picked from commit 24c96de)
Address PR feedback: remove file header comment and place the explanatory comment directly next to the code it documents. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> (cherry picked from commit 126a0a0)
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of #4961 by @bram-atmire to
dspace-9_x.