Skip to content

Conversation

@snh
Copy link
Member

@snh snh commented Feb 18, 2016

In some situations where port 22 is blocked, ssh will return a port 22: No route to host error instead of a port 22: Connection refused error. This PR adds handling to bin/ghe-host-check for this alternative error.

Treat `port 22: No route to host` errors from `ssh` the same as `port 22: Connection refused` errors.
@rubiojr
Copy link
Member

rubiojr commented Feb 18, 2016

@snh looks good to me but to double check, I'm trying to figure out when that'd be the case. Firewall? trying to reach a non-routable/private network? Do you know how to reproduce this one? Are you backing up or restoring a cluster or a single VM?

@snh
Copy link
Member Author

snh commented Feb 18, 2016

The error can be a bit misleading as it doesn't necessarily mean the backup host has no route to the GHE appliance.

It is usually caused by a firewall in the path rejecting the connection with a ICMP Admin Prohibited response. The specific use case this PR solves is those where port 22 is blocked in this way but port 122 isn't. At the moment the backup fails even though the GHE appliance might be a 2.x release that only requires port 122 be accessible for backups, this change allows it to succeed.

The easiest way to reproduce is to add the following iptables rule on a Linux based backup-utils host with iptables enabled:

iptables -I OUTPUT -p tcp -d <gheapplianceip> --dport 22 -j REJECT --reject-with icmp-admin-prohibited

@rubiojr
Copy link
Member

rubiojr commented Feb 19, 2016

Thanks @snh!

rubiojr added a commit that referenced this pull request Feb 19, 2016
Update ghe-host-check to detect extra port 22 error
@rubiojr rubiojr merged commit 8256530 into master Feb 19, 2016
@rubiojr rubiojr deleted the snh/port-22-no-route branch February 19, 2016 10:20
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

Successfully merging this pull request may close these issues.

3 participants