Broken Pipe issue while attempting to connect to GCE instance - Sucess

1,308 views
Skip to first unread message

Arul Prakash Pugazhendi

unread,
Jun 18, 2019, 8:07:54 PM6/18/19
to gce-discussion
I have a preemptible debian instance with an external IP address. I can connect to the instance via GCP Console but it is very much inconvenient. When I try to connect from my mac with gcloud/SSH, most of the time it fails with the following message:

packet_write_wait: Connection to <<EXTERNAL IP>> port 22: Broken pipe
ERROR
: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].

When it succeeds, I couldn't find out why, because it succeeds very randomly. I couldn't isolate the reason for the success.

I tried all the options suggested at other forums including changing to os login, removing it, turning off firewall, turning it on, deleting gcloud directories and installing again, deleting SSH key and generating again, formatting SSH keys via ssh-add tool, setting ServerAliveInterval to 120. But there is no definite solution in sight.

Has anybody faced a similar issue? Any advice is welcome.

Yui (Google Cloud Support)

unread,
Jul 3, 2019, 4:29:30 PM7/3/19
to gce-discussion

Here are a few steps you can try:


1. I see that you have tried to edit ServerAliveInterval. Please try to edit the  ~/.ssh/config file in the client system (which is your MAC computer) to adjust the ServerAliveInterval and ServerAliveCountMax also. Please restart the system after editing the config files. More information about this topic can be found is these third-party links [1], [2] & [3].


2. If the above fails, in order to isolate the issue between source,network and target, you can perform the following tests. 


a. Could you please try from a different network to see if the problem still persists?


b. Does issue persist if you use a different client.


C. If you spin up a new VM, does issue persists?


Reply all
Reply to author
Forward
0 new messages