Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] On a dual-stack network, ping for a single-stack (IPv4 or IPv6 only) service may fail #2211

Closed
3 tasks done
saiarcot895 opened this issue Oct 19, 2023 · 2 comments · Fixed by #2214
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@saiarcot895
Copy link

Description

When:

  • homepage has access to a dual-stack network (i.e. has both an IPv4 and IPv6 address),
  • a domain name is used for pinging a service to check to see if it's up,
  • that domain has both an IPv4 and IPv6 address record,
  • the service is only listening on IPv4

Then the ping may fail with a 500 error. This appears to be because Node 18, by default, doesn't enable the Happy Eyeballs algorithm by default (see nodejs/node#41625, implemented in nodejs/node#44731). This means that if a connection over IPv6 fails, then it doesn't automatically fall back to trying with IPv4. It looks like it will be enabled by default in Node 20, but for Node 18, autoSelectFamily: true would need to be set when making the HTTP request.

Steps to reproduce

  1. Have an environment/network setup with both IPv4 and IPv6 configured.
  2. Host a service that's listening on IPv4 only.
  3. Have a DNS entry/domain name with both A (IPv4) and AAAA (IPv6) records.
  4. Use that domain name for pinging from homepage.

homepage version

v0.7.4 (8ec488e, Oct 18, 2023)

Installation method

Docker

Configuration

No response

Container Logs

No response

Browser Logs

No response

Troubleshooting

I did a packet capture to see what was happening with the pings, and saw that only IPv6 was being attempted. The IPv4 connection at the end was me manually using the IPv4 address in a wget test from the homepage container.

image

Other

No response

Before submitting, I have made sure to

@saiarcot895 saiarcot895 added bug Something isn't working unconfirmed labels Oct 19, 2023
@saiarcot895 saiarcot895 changed the title [Bug] On a dual-stack network, ping for single-stack (IPv4 or IPv6 only) may fail [Bug] On a dual-stack network, ping for a single-stack (IPv4 or IPv6 only) service may fail Oct 19, 2023
@shamoon
Copy link
Collaborator

shamoon commented Oct 19, 2023

I dont really know how common a situation this is and I did encounter some issues with including this option testing via https for sites that dont specify AAAA records, but overall I think the change is low risk and as noted, will be default in node 20

Copy link
Contributor

github-actions bot commented Feb 5, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants