-
Notifications
You must be signed in to change notification settings - Fork 252
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
getaddrinfo #482
Comments
We recently accepted some PRs to deal with large numbers of servers, so your ~100 count isn't exceptional in that regard. Might I suggest you add a simple Your RUBY_VERSION can be significant here too, older Rubies, as a rule are less good at networking, but all rubies have been very good for at least 3-4 years, if not since the 2.0 release. |
TLDR: I think I will try to reproduce this issue in Ruby (without sshkit) next. Thank you for your input so far! Having the IPs hard-coded in /etc/hosts does help. That has been my workaround for a while. I had this bash script running since yesterday without issues as well.
I did run into the same issue again just now when trying to deploy. The script above was running - so the resolved IPs should still have been cached by the OS. Here two resolves failed at the same time.
I think I will try to reproduce this issue in Ruby (without sshkit) next. |
I have tried to reproduce this in other ways (including below script) but have not been able to reproduce this issue besides when using capistrano to deploy (which uses sshkit). Also I have tried switching DNS-server. Hardcoding the hosts in /etc/hosts fixes the issue for me so it seems.
|
I have the same problem but with single server. Tried some tests: Success require 'socket'
Socket.getaddrinfo('subdomain.domain.com', 80, nil, Socket::SOCK_STREAM) Success require 'net/ssh'
Net::SSH.start('subdomain.domain.com', 'sshuser') do |ssh|
ssh.exec 'touch ~/test.txt'
end Fail with the same stacktrace as Cervenka require 'sshkit'
require 'sshkit/dsl'
include SSHKit::DSL
SSHKit::Backend::Netssh.configure do |ssh|
ssh.connection_timeout = 5
ssh.ssh_options = {
user: 'sshuser',
keys: %w[~/.ssh/id_rsa],
auth_methods: %w[ publickey ]
}
end
nodes = %w[ 'subdomain.domain.com' ]
on nodes do |node|
output = capture :ls, '-l'
puts output
end Also
Do you have any ideas where to dig deeper? ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-darwin21] |
Solved. I need more sleep.
|
Hello,
when deploying to around ~100 servers we run into following issue once in a while. Only once in a while and very randomly - for one of the servers being deployed to. This has happened to people on macos and linux.
Are there some known limitations perhaps?
Thanks!
The text was updated successfully, but these errors were encountered: