Title: Not all processes rebind when switching from :: to 0.0.0.0 or vice versa · Issue #60086 · nodejs/node · GitHub
Open Graph Title: Not all processes rebind when switching from :: to 0.0.0.0 or vice versa · Issue #60086 · nodejs/node
X Title: Not all processes rebind when switching from :: to 0.0.0.0 or vice versa · Issue #60086 · nodejs/node
Description: Version v22.14.0 Platform Darwin YJF7M4-i4Xp 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:55 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6031 arm64 Linux b2dae3f0c05d 6.10.14-linuxkit #1 SMP Thu Mar 20 16:32:56 UTC 2025 aar...
Open Graph Description: Version v22.14.0 Platform Darwin YJF7M4-i4Xp 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:55 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6031 arm64 Linux b2dae3f0c05d 6.10.14-linuxkit...
X Description: Version v22.14.0 Platform Darwin YJF7M4-i4Xp 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:55 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6031 arm64 Linux b2dae3f0c05d 6.10.14-linuxkit...
Opengraph URL: https://github.com/nodejs/node/issues/60086
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Not all processes rebind when switching from :: to 0.0.0.0 or vice versa","articleBody":"### Version\n\nv22.14.0\n\n### Platform\n\n```text\nDarwin YJF7M4-i4Xp 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:55 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6031 arm64\n\nLinux b2dae3f0c05d 6.10.14-linuxkit #1 SMP Thu Mar 20 16:32:56 UTC 2025 aarch64 aarch64 aarch64 GNU/\n```\n\n### Subsystem\n\ncluster\n\n### What steps will reproduce the bug?\n\n1. Run program attached: `node listen-retry-issue.js `\n2. After all processes start (will take time), send `SIGTERM` to master process to initiate a rolling restart. \n\n This will switch interfaces (initially from :: to 0.0.0.0 will toggle each time a SIGTERM is sent): `kill -SIGTERM \u003cmasterPid\u003e`\n\n3. After all workers restart (will take time) notice only a subset will successfully listen successfully\n\nFor example: if we have 10 processes and process 5 rebinds first: processes 5, 6, 7, 8, 9 will successfully rebind\nprocesses 0, 1, 2, 3, 4 will not rebind and will retry forever\n\nDepending on the platform tested with may need to send 2 SIGTERMS to trigger the `EADDRINUSE` scenario.\n\nAlso note that not using the `ipv6Only` listen option as our application must support dual stack when binding to ipv6 addresses.\n\n[listen-retry-issue.js](https://github.com/user-attachments/files/22643581/listen-retry-issue.js)\n\n### How often does it reproduce? Is there a required condition?\n\nUsing the program above it seems to reproduce most of the time. The only scenario that would cause the issue to not surface is if process 0 is the first to listen successfully. \n\nThe required condition is:\n\n1. Multiple processes bound to all interfaces with dual stack (::)\n2. Processes will retry listen when `EADDRINUSE` error occurs\n3. Switch interface from `:: to 0.0.0.0` (or vice versa) \n4. Perform a rolling restart (2 processes at a time) so some processes are still bound to the old interface and port during restart.\n5. After all processes restart, the problem should surface.\n6. Only a subset of workers will successfully bind to the new interface and port\n\n### What is the expected behavior? Why is that the expected behavior?\n\nExpected behavior is that all workers successfully rebind to the interface and port, not a subset.\n\n### What do you see instead?\n\nA subset of workers processes are successfully rebinding and there is a strange pattern that dictates which workers rebind. For example:\n\nWith 10 processes are restarted and worker 6 is the first to bind, workers 6, 7, 8, and 9 will successfully rebind to the interface and port. Workers 0, 1, 2, 3, 4, and 5 will fail to rebind and be in a forever retry loop.\n\n### Additional information\n\nHere is annotated log output from the attached program demonstrating the problem.\n\n**Scenario**\n- 12 processes\n- Process 6 listens first, end up with:\n - processes 6, 7, 8, 9, 10, 11 successfully listening\n - processes 0, 1, 2, 3, 4, 5 in a retry forever loop\n - Expecting all processes successfully rebind\n\n...\n#\n# The final 2 processes are restarted here\n#\nMaster process 0 (25286) detected worker 10 (27562) died\nMaster process 0 (25286) detected worker 11 (27563) died\n#\n# Process 6 and 7 bind successfully\n#\nWorker process 6 (29061) listening on 0.0.0.0:8000\nWorker process 7 (29062) listening on 0.0.0.0:8000\nWorker process 11 (29207) detected address 0.0.0.0:8000 in use, retrying in 517 MS...\nWorker process 10 (29206) detected address 0.0.0.0:8000 in use, retrying in 526 MS...\nWorker process 9 (29131) detected address 0.0.0.0:8000 in use, retrying in 537 MS...\nWorker process 8 (29130) detected address 0.0.0.0:8000 in use, retrying in 573 MS...\nWorker process 5 (28984) detected address 0.0.0.0:8000 in use, retrying in 572 MS...\nWorker process 4 (28985) detected address 0.0.0.0:8000 in use, retrying in 580 MS...\nWorker process 3 (28898) detected address 0.0.0.0:8000 in use, retrying in 548 MS...\nWorker process 2 (28897) detected address 0.0.0.0:8000 in use, retrying in 549 MS...\nWorker process 1 (28820) detected address 0.0.0.0:8000 in use, retrying in 528 MS...\nWorker process 0 (28821) detected address 0.0.0.0:8000 in use, retrying in 567 MS...\nMaster process 0 (25286) rolling restart completed, 12 processes restarted\n#\n# Process 8 and 9 bind successfully\n#\nWorker process 8 (29130) listening on 0.0.0.0:8000\nWorker process 9 (29131) listening on 0.0.0.0:8000\nWorker process 11 (29207) detected address 0.0.0.0:8000 in use, retrying in 555 MS...\nWorker process 10 (29206) detected address 0.0.0.0:8000 in use, retrying in 554 MS...\nWorker process 5 (28984) detected address 0.0.0.0:8000 in use, retrying in 574 MS...\nWorker process 4 (28985) detected address 0.0.0.0:8000 in use, retrying in 556 MS...\nWorker process 3 (28898) detected address 0.0.0.0:8000 in use, retrying in 570 MS...\nWorker process 2 (28897) detected address 0.0.0.0:8000 in use, retrying in 519 MS...\nWorker process 1 (28820) detected address 0.0.0.0:8000 in use, retrying in 535 MS...\nWorker process 0 (28821) detected address 0.0.0.0:8000 in use, retrying in 559 MS...\n#\n# Process 10 and 11 bind successfully\n#\nWorker process 10 (29206) listening on 0.0.0.0:8000\nWorker process 11 (29207) listening on 0.0.0.0:8000\n#\n# Processes 0, 1, 2, 3, 4, 5 are in a retry forever loop\n#\nWorker process 5 (28984) detected address 0.0.0.0:8000 in use, retrying in 523 MS...\nWorker process 4 (28985) detected address 0.0.0.0:8000 in use, retrying in 580 MS...\nWorker process 3 (28898) detected address 0.0.0.0:8000 in use, retrying in 531 MS...\nWorker process 2 (28897) detected address 0.0.0.0:8000 in use, retrying in 566 MS...\nWorker process 1 (28820) detected address 0.0.0.0:8000 in use, retrying in 550 MS...\nWorker process 0 (28821) detected address 0.0.0.0:8000 in use, retrying in 574 MS...\nWorker process 5 (28984) detected address 0.0.0.0:8000 in use, retrying in 514 MS...\nWorker process 4 (28985) detected address 0.0.0.0:8000 in use, retrying in 512 MS...\nWorker process 3 (28898) detected address 0.0.0.0:8000 in use, retrying in 570 MS...\nWorker process 2 (28897) detected address 0.0.0.0:8000 in use, retrying in 573 MS...\nWorker process 1 (28820) detected address 0.0.0.0:8000 in use, retrying in 575 MS...\nWorker process 0 (28821) detected address 0.0.0.0:8000 in use, retrying in 563 MS...\nWorker process 5 (28984) detected address 0.0.0.0:8000 in use, retrying in 567 MS...\nWorker process 4 (28985) detected address 0.0.0.0:8000 in use, retrying in 538 MS...\nWorker process 3 (28898) detected address 0.0.0.0:8000 in use, retrying in 540 MS...\nWorker process 2 (28897) detected address 0.0.0.0:8000 in use, retrying in 529 MS...\nWorker process 1 (28820) detected address 0.0.0.0:8000 in use, retrying in 563 MS...\nWorker process 0 (28821) detected address 0.0.0.0:8000 in use, retrying in 528 MS...\nWorker process 5 (28984) detected address 0.0.0.0:8000 in use, retrying in 549 MS...\nWorker process 4 (28985) detected address 0.0.0.0:8000 in use, retrying in 577 MS...\nWorker process 3 (28898) detected address 0.0.0.0:8000 in use, retrying in 577 MS...\nWorker process 2 (28897) detected address 0.0.0.0:8000 in use, retrying in 557 MS...\nWorker process 0 (28821) detected address 0.0.0.0:8000 in use, retrying in 515 MS...\nWorker process 1 (28820) detected address 0.0.0.0:8000 in use, retrying in 544 MS...\nWorker process 5 (28984) detected address 0.0.0.0:8000 in use, retrying in 571 MS...\nWorker process 4 (28985) detected address 0.0.0.0:8000 in use, retrying in 542 MS...\nWorker process 3 (28898) detected address 0.0.0.0:8000 in use, retrying in 537 MS...\nWorker process 2 (28897) detected address 0.0.0.0:8000 in use, retrying in 548 MS...\nWorker process 0 (28821) detected address 0.0.0.0:8000 in use, retrying in 518 MS...\nWorker process 1 (28820) detected address 0.0.0.0:8000 in use, retrying in 569 MS...\n...","author":{"url":"https://github.com/hgardneriv","@type":"Person","name":"hgardneriv"},"datePublished":"2025-10-01T16:10:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/60086/node/issues/60086"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ffeda7ec-2c70-b83f-4575-94419fedc159 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AFCC:2AB98E:4545A9:5F606E:6A4C812A |
| html-safe-nonce | 705e8e1141c1e47d1ebeef14d28c15a41e47634aecb3ff549bac67605f48887e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkNDOjJBQjk4RTo0NTQ1QTk6NUY2MDZFOjZBNEM4MTJBIiwidmlzaXRvcl9pZCI6IjY1OTQ1ODYzNTM5MjQzNDIwNTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3ca34b22c62f7d5e366c8a3fbd09650a02a3ed230032c3e263501829eb0c810c |
| hovercard-subject-tag | issue:3474226725 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/60086/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1512af92e12706601a2044dd4d6f2dd3bdb23989298e2fbc0a8d4c2071a8056f/nodejs/node/issues/60086 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1512af92e12706601a2044dd4d6f2dd3bdb23989298e2fbc0a8d4c2071a8056f/nodejs/node/issues/60086 |
| og:image:alt | Version v22.14.0 Platform Darwin YJF7M4-i4Xp 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:55 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6031 arm64 Linux b2dae3f0c05d 6.10.14-linuxkit... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hgardneriv |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cd470457e909b9d062f8002cf438ba870e6acff6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width