-
Notifications
You must be signed in to change notification settings - Fork 34
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
test connect_timeout does not seem to work #42
Comments
Just run it again. Sometimes timeout might fail, but it usually works. |
BTW, this is related to #41 , so I expected you to post this in the Pull Request |
@stepga If the problem is solved, can we close this issue? |
Strange. It fails reproducibly every time I run
This happens on origin/master |
That is definitely strange.
Can you try the latest commit of master? |
Looking at the error message, this actually matches the host used in connect_timeout. The test basically specifies a random host and port, expects ssh connection to fail, it is not very robust. Although I don't understand why changing the host ip fixed the problem. |
@jonhoo I don't think I can figure a solution to this one. Can you please lend me some help here? |
Hmm, this sounds an awful lot like you have firewall rules that treat 192.0.0.8 specially. Or maybe that somehow matches your own local network? I think we need more info here, like your OS, the firewall you're using (if any), and your local network config (ip + netmask). |
I am seeing a similar issue when I try to ssh to an IP address that is only exposed when my VPN is on.
ssh 172.16.1.2 -o ConnectTimeout=1
ssh: connect to host 172.16.1.2 port 22: Connection timed out The example in my code appears to hang forever which indicates that the let _sb = SessionBuilder::default()
.connect_timeout(Duration::new(2, 0))
.known_hosts_check(KnownHosts::Accept)
.connect("172.16.1.2")
.await; |
Now it is working for me. I didn't change anything, so I am confused. You can ignore my previous comment. |
26 of the 27 test pass, excluding
connect_timeout
.instead of resulting in a timeout,
ssh
seems to fail with:"connect to host 192.0.0.8 port 22: Network is unreachable"
when changing the test's host ip e.g. to the google dns
8.8.8.8
it works.The text was updated successfully, but these errors were encountered: