Skip to content

Conversation

@tdonohue
Copy link
Member

Manual port of #4961 by @bram-atmire to dspace-8_x

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>
@tdonohue tdonohue added this to the 8.4 milestone Jan 27, 2026
@tdonohue tdonohue added bug high priority 1 APPROVAL pull request only requires a single approval to merge labels Jan 27, 2026
bram-atmire and others added 2 commits January 27, 2026 16:40
- 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>
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>
@tdonohue tdonohue merged commit 459ef13 into DSpace:dspace-8_x Jan 27, 2026
16 checks passed
@tdonohue tdonohue deleted the port_4961_to_8x branch January 27, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 APPROVAL pull request only requires a single approval to merge bug high priority

Projects

Development

Successfully merging this pull request may close these issues.

2 participants