-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
IPSocket.getaddress with unknown host returnng IP address #1095
Comments
I am not sure if the following comment on the failing spec is related to this issue. spec/library/socket/ipsocket/getaddress_spec.rb Lines 17 to 24 in 59bdcb4
|
Tools like dig/host/nslookup explicitly use a DNS server, the system might have other ways to set up hostnames (like ping rubyspecdoesntexist.fallingsnow.net
perl -MSocket -MData::Dumper -E 'print Dumper(Socket::getaddrinfo("rubyspecdoesntexist.fallingsnow.net", "http"))' Most Linux distros have a working Perl interpreter, that second script does something kind of similar to the Ruby spec. |
Thank you for your suggestion! On the Arm64 serverThe result of
Also here is the result
On my local Fedora Linux x86_64Here are the results of the commands on my local.
|
I am asking the Equinix support now. |
I find it rather fascinating that you're getting different IP addresses. The first error and reproduction return Either way, this looks like an issue with your specific host, not with Ruby or Ruby-spec |
Yeah that's interesting result. By the way, the domain "fallingsnow.net" appeared by the commit cd7f344 . The domain is managed by Evan Phoenix. He may know something about this DNS's behavior.
|
It looks like But indeed, what kind of DNS lies to you like that? :D |
I just checked the "fallingsnow.net" by whois service. And it seems it is registered.
This is a good idea because we can predict the behavior of the DNS response from
I am also curious about the root cause of this behavior on the Arm64 server's DNS server. Anyway, I am still asking Equinix support, and I will share the updates here. |
I am still investigating this issue. I got the response from Equnix support that they cannot reproduce this issue. First, I got the following result today the ruby script returning a different IP address from when I reported previously.
Second, I see the name resolution is managed by When stopping the service, the name resolution doesn't work as expected.
So, I edited the
Then I captured the log by the following command.
while running the following
The captured log is below. And the following parts mean the name resolution info is cached on local?
|
The used systemd version for the systemd-resolved is below as a note.
|
I am close to solve this issue. The problem is the
I modified the file
And the
But after restarting the systemd-resolved service, it seems the Below is the
The Equnix support told me that this issue looks the following Ubuntu bug. |
It looks like it's fixed upstream and Ubuntu just hasn't shipped a fix, so you could add something extremely hacky until they (or rather if they ever) do. One hacky idea is to add
It'll drop the override config in You can then restart systemd-resolved and check with resolvectl. |
Thank you for suggesting the workaround! I tried your suggested way.
But unfortunately, after rebooting the OS, I see the failures on the booting.
And the
I am seeing if I suppress this error by setting other systemd config items. Your suggestion is very helpful and welcome. I am not familiar with systemd things. https://stackoverflow.com/questions/35452591/start-request-repeated-too-quickly |
Ah, it looks like it's because systemd-resolved starts before You will want to remove the override (another call to systemctl edit or just deleting the override file should work). You can then add a new unit with
And then enable it. It'll run after network-online.target which might be good enough. There's probably a unit running the ifupdown script so setting Edit: actually reading the logs more closely helps, I see a |
@jeremycline Thank you! I was able to fix the issue on your way! After rebooting OS, I don't see any error, and the
I added the following content that is essentially same with your way. The
Then I tested with
And the following ruby command fails as error as expected now.
Thank you! The issue was fixed. |
I also reported this workaround on the Ubuntu bug ticket. |
Hello,
I am seeing a weird behavior about the
IPSocket.getaddress
on RubyCI's arm64 Ubuntu jammy server "arm64-neoverse-n1". This server is not visible on rubyci.org site yet.The spec file
library/socket/ipsocket/getaddress_spec.rb
is failing in themake test-spec
.https://rubyci.s3.amazonaws.com/arm64-neoverse-n1/ruby-master/recent.html
https://rubyci.s3.amazonaws.com/arm64-neoverse-n1/ruby-master/log/20231013T130005Z.fail.html.gz
I can reproduce this failure on the ruby/spec latest commit 59bdcb4 too with the relatively latest master branch ruby
511571b5ff3aaab3ac013edc166a1bcf61f6d6d4
by the following command.A minimal reproducer
On the arm64 server
Seeing the
library/socket/ipsocket/getaddress_spec.rb
, the following command is expected to raiseSocketError
. However, it returns the IP address170.178.183.18
for the host "rubyspecdoesntexist.fallingsnow.net".It also returns the same IP for the different subdomain host.
It raises the
SocketError
as exepected when specifying our managed domain "rubyspecdoesntexist.ruby-lang.org".The following DNS client tool
nslookup
anddig
are not returning the domain right?So, do you know why this happened? What is the used domain "fallingsnow.net"?
As the arm64 sever is managed on Equinix Cloud, if the issue comes from the server's DNS server, I can ask the admin to correct the serer, if we can reproduce the issue with the general DNS client tool.
On my local Fedora Linux x86_64
Raising
SocketError
as expected.The text was updated successfully, but these errors were encountered: