gana2188 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

Misleading error message when "gcloud compute ssh" cannot connect to instance #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Run "gcloud compute ssh" on an instance that doesn't have an SSH firewall rule 
set up

What is the expected output? What do you see instead?

ssh: connect to host x.x.x.x port 22: Connection refused
.....
ssh: connect to host x.x.x.x port 22: Connection refused
ERROR: (gcloud.compute.ssh) Your SSH key has not propagated to your instance 
yet. Try running this command again.

This error message is misleading. Adding a firewall rule solved the problem and 
removing it again made the error reoccur. This error message also appears for 
many other failures, like when an instance has been terminated. I propose 
simply changing it to something more generic so as not to derail 
troubleshooting efforts.

What is the output of 'gcloud info'?
  compute: [2014.08.14]

Original issue reported on code.google.com by haakone...@gmail.com on 29 Sep 2014 at 4:13

GoogleCodeExporter commented 9 years ago
Thanks for the suggestion.  A better error message is a good idea, and we're 
planning to fix this.

Original comment by jeffvaug...@google.com on 29 Sep 2014 at 5:20

GoogleCodeExporter commented 9 years ago
Jeff - any ETA on a fix?

Original comment by rdayal@google.com on 10 Nov 2014 at 4:32

GoogleCodeExporter commented 9 years ago

Original comment by rdayal@google.com on 10 Nov 2014 at 4:33

GoogleCodeExporter commented 9 years ago
Should have a fix out in the next gcloud release, or at least the release 
following.

Original comment by jeffvaug...@google.com on 10 Nov 2014 at 8:15

GoogleCodeExporter commented 9 years ago
jeffvaughan@: any updates here?

Original comment by z...@google.com on 14 Jul 2015 at 3:50

GoogleCodeExporter commented 9 years ago
Yup, this fixed.  The error message should now read as follows:

"Could not SSH to the instance.  It is possible that your SSH key has not 
propagated to the instance yet. Try running this command again.  If you still 
cannot connect, verify that the firewall and instance are set to accept ssh 
traffic."

Original comment by jeffvaug...@google.com on 14 Jul 2015 at 6:29