-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
DNS Lookups Failing After Updating to Latest Node 20 and 18 for IBM i #53948
Comments
(I also couldn't reproduce on v18, I got similar output to the one above) I'm unable to reproduce, but I'm not on IBM i. Have you tried on other computers/networks? Additionally, is this reproducible on v22? |
CC @nodejs/platform-ibmi |
I should have clarified -- this is only happening on IBM i. The problem is not occurring on other platforms. And only with Node 20.15.1 and Node 18.20.4. The problem started occurring after I updated those on my IBM i from the slightly older versions I mentioned above. |
The problem also happens in Node 22.4.1 for IBM i. |
The problem does not occur in Node 16 and Node 14 for IBM i, on the same system. Based on this, and based on things working in the slightly older Node 18/20 versions I mentioned above, we suspect that something in the updated Node 18/20/22 versions for IBM i changes how it does DNS lookups. I'm not sure if this is relevant or not, but on the affected system:
We're not sure when the PASE command stopped working, or if it ever worked on this system. We never tried it before today, while trying to troubleshoot this issue. We're thinking that it probably never worked, as the system DNS configuration is good, works fine with all other software on the system, and has not been changed. |
@DavidRusso what does Node think your configured servers are?
When I run this it shows 127.0.0.1 on Node 14, 16, 18, and 20. Prior to Node 20, I get ECONNREFUSED when I try to run your example, but on Node 20 it's now ETIMEOUT. I don't have a DNS server running locally, so either of those errors makes sense. Also, I'm not sure where you got an |
@kadler , The PASE
|
@kadler , Now that I understand more, it seems possible/likely that The difference in behavior in the updated Node.js versions is just that now it throws ETIMEOUT instead of ECONNREFUSED when it can't connect to a DNS service on localhost. This confused us at first, because the software we were using ( So, the root problem or question here is... why does |
Ohhh, I didn't know the DNS server option includes that.
My guess is that it's just following the AIX code path and probably trying to read /etc/resolv.conf and falling back? @abmusse can you investigate further there? Once we know where this is coming from, I have some code somewhere that calls the ILE APIs to get the configured DNS servers and we can try to fix it that way. |
Potentially related is a c-ares change from 1.21.0+: #50743 |
@kadler, Yes I will need to investigate this further. I plan to look into this more next week and will provide an update of what I find. |
Quick update, I haven't had an opportunity to investigate more this week. This is still on my radar to investigate. |
Hey @abmusse, we have the same issue here at some of our customers on IBM I (7.4). We also updated Node (NodeJs 20.16.0) and since then encountered the problem using
without any success. Do you have any updates yet or are you still investigating? Many thanks for your support |
Similar issue when enabling the Ethernet packet filter on IBM I with appropriate rules. Name resolution fails even though ICMP and DNS are enabled. |
Thanks for the additional reports. I have not forgot about this one. I've been busy putting out fires in other areas and this one is still on my radar. Like @kadler mentioned in #53948 (comment) I think we are following the AIX code path and probably trying to read /etc/resolv.conf but we need to add a patch to perform IBM i specific DNS changes to get things working properly. |
@DavidRusso Did you ever make any progress on this on your end ? |
We just reverted to using an older Node (14) for our process that was running Until this is fixed in Node.js, the only way I could see to get That, or bypass DNS lookup altogether by using IP address. Obviously that could be problematic if the mail server IP is subject to change. |
Version
v20.15.1
Platform
Subsystem
DNS
What steps will reproduce the bug?
Any DNS lookup fails with connection timeout. Can run this code to reproduce:
Fails with
ETIMEOUT
, even though the system DNS configuration is good and other software can perform DNS lookups.How often does it reproduce? Is there a required condition?
Every time. This started happening when updating to Node 20.15.1 and Node 18.20.4 for IBM i. Everything was working fine before the update. Before, I was using Node 20.11.1 and Node 18.18.2.
What is the expected behavior? Why is that the expected behavior?
I expect a good DNS lookup, as the system DNS configuration is good and most other software can perform lookups.
What do you see instead?
ETIMEOUT on any DNS lookup.
Additional information
An interesting thing we noticed that may relate....
On the affected systems, the NSLOOKUP CL command can perform lookups with no problem, but the
nslookup
command in PASE fails with ETIMEOUT for any lookup.The text was updated successfully, but these errors were encountered: