GCP Compute Engine // Connection refused ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255]

GCP Compute Engine // Connection refused ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255]

正在处理 GCE.. 我认为引导磁盘超出了容量。突然冻结。

时发生以下错误

gcloud compute ssh

ssh: connect to host {my external address} port 22: Connection refused 
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].

状态

gcloud compute firewall-rules list

NAME                                     NETWORK  DIRECTION  PRIORITY  ALLOW                                                       DENY  DISABLED
allow-superset-related                   default  INGRESS    1000      tcp:22,tcp:8080,tcp:80,tcp:443,tcp:8088,tcp:8888,tcp:13080        False
default-allow-8080                       default  INGRESS    1000      tcp:8080,tcp:15672,tcp:5555                                       False
default-allow-http                       default  INGRESS    1000      tcp:80                                                            False
default-allow-https                      default  INGRESS    1000      tcp:443                                                           False
default-allow-icmp                       default  INGRESS    65534     icmp                                                              False
default-allow-internal                   default  INGRESS    65534     tcp:0-65535,udp:0-65535,icmp                                      False
default-allow-rdp                        default  INGRESS    65534     tcp:3389                                                          False
default-allow-ssh                        default  INGRESS    65534     tcp:22                                                            False

nmap {my external ip}

Starting Nmap 7.80 ( https://nmap.org ) at 2020-09-10 19:14 KST
Nmap scan report for **
Host is up (0.0032s latency).
Not shown: 995 closed ports
PORT     STATE    SERVICE
135/tcp  filtered msrpc
139/tcp  filtered netbios-ssn
445/tcp  filtered microsoft-ds
2869/tcp filtered icslap
4444/tcp filtered krb524

Nmap done: 1 IP address (1 host up) scanned in 1.25 seconds

gcloud compute connect-to-serial-port {my_instance}

...

[[0;32m  OK  [0m] Started Update UTMP about System Runlevel Changes.
[[0;32m  OK  [0m] Started Raise network interfaces.
[[0;32m  OK  [0m] Reached target Network.
[[0;32m  OK  [0m] Reached target Network is Online.
You are in emerg
Cannot open access to console, the root account is locked.
See sulogin(8) man page for more details.

Press Enter to continue

串口不交互

有人能帮忙吗?

您可以按照此 guide 或使用以下命令调整磁盘大小:

gcloud compute disks resize DISK_NAME --size DISK_SIZE

或使用控制台:

  1. 转到 Disks 页面查看项目中的永久性磁盘列表。
  2. 单击要调整大小的磁盘的名称。
  3. 在磁盘详细信息页面上,单击编辑
  4. 大小字段中,输入磁盘的新大小。
  5. 单击“保存”将您的更改应用到磁盘。

调整磁盘大小后,您必须resize the file system以便操作系统可以访问额外的space。

注意:请勿将引导磁盘的大小调整为超过 2 TB,因为这是限制。