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

lib/dns: EINVAL on dns lookup (wrong bind ip for some environment) #42

Open
lostrepo opened this issue Oct 15, 2024 · 0 comments
Open

Comments

@lostrepo
Copy link
Contributor

I'm getting EINVAL when trying to resolve dns
By changing bind ip

node.bind('127.0.0.1', () => {
from 127.0.0.1 to external interface ip I'm able to resolve dns without errors

Possible solutions I see:

  1. pass bind_ip parameter to lookup method as override
  2. on dns module load save LO_DNS_BIND_IP environment variable as default override
  3. on dns module load use ioctl to find all interface' ips (something like https://stackoverflow.com/a/4139811, https://stackoverflow.com/a/4267204), try to resolve and bind to all ips, save ip that resolved as default override
  4. all/some of the above (priority: 1 > 2 > 3)
lostrepo added a commit to lostrepo/lo that referenced this issue Oct 15, 2024
adds proposed solutions 1 and 2 from issue just-js#42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant