You cannot connect to the VM instance because of an unexpected error. Wait a few moments and then tr

7,716 views
Skip to first unread message

Andres Rengifo

unread,
Mar 13, 2018, 11:28:45 AM3/13/18
to gce-discussion
I have created an instance, however when trying to SSH the connection times out with the following error: "You cannot connect to the VM instance because of an unexpected error. Wait a few moments and then try again. (#79)"

I have tried restarting the instance and no luck.

Dinesh (Google Platform Support)

unread,
Mar 13, 2018, 2:45:58 PM3/13/18
to gce-discussion
Please find here some general troubleshooting tips[1][2] for SSH issue. I hope it helps?

If you are still unable to resolve your issue, please provide me the following information a private email:-
  1. your project ID, 
  2. Instance name and 
  3. from where you trying to SSH your instance (From cloud shell, a third party tool like putty or from console)

Message has been deleted
Message has been deleted

Bruno (Google Cloud Support)

unread,
Feb 13, 2020, 8:41:04 AM2/13/20
to gce-dis...@googlegroups.com
I recommend to don't sharing your personal information as your ProjectID and Instance name in Groups. Let me remind this forum is public.

A common reason of not being able to SSH to a VM is because the disk is full or the firewalld has been enabled on the OS level without allowing port 22.
However, some more logs will help to figure out what's going on with your SSH connection.

It's possible to add more verbose on SSH connection attempt with the following command in the CloudShell [1]

gcloud beta compute ssh [your_vm_instance] -- -vvv




On Thursday, February 13, 2020 at 2:59:31 AM UTC-5, Quốc Nguyễn Đình wrote:
Dear Dinesh
I have the same problem right now "You cannot connect to the VM instance because of an unexpected error. Wait a few moments and then try again. (#79)". I tried creating a new project, and creating a VM instance, but the error still appears
1.My project ID is metatrder and reference-hold-268009 
2. My instance name is vu
3. I try SSH on chrome browser
Please help me 
Thanks you


Vào 01:45:58 UTC+7 Thứ Tư, ngày 14 tháng 3 năm 2018, Dinesh (Google Platform Support) đã viết:

Quốc Nguyễn Đình

unread,
Feb 13, 2020, 9:47:37 AM2/13/20
to gce-discussion
Dear Bruno
Thanks you very much, This is my Firewall rule, and my instance config



Firewall rule.png












Firewall rule.png
I also create new project, new instance but it not work. The disk is not full (30GB)


Bruno (Google Cloud Support)

unread,
Feb 14, 2020, 10:27:15 AM2/14/20
to gce-dis...@googlegroups.com
I will be pleased to help you if you provide the following information;

1. Have you enabled the firewalld in your operating system? (not the GCP firewall but the OS firewall)
2. What is the exact error message when you try to connect throught SSH?
3. What is the output of the command: gcloud beta compute ssh [your_vm_instance] -- -vvv when it's executed in Cloudshell?

It's important to know why your SSH connection can't be established to find the right solution for you.

EDIT: 
Let me recommend you to post your issue on ServerFault, where your issue will be viewed by a larger & dedicated audience.
Groups is more used for discussion and/or questions around GCP than providing support requiring system troubleshoot.
Reply all
Reply to author
Forward
0 new messages