digsy89
digsy89

Reputation: 325

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

Working on GCE.. I think boot disk exceed capacity. Suddenly freeze. and following error occurred when

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].

Status

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

serial port is not interactive.

can anyone help?

Upvotes: 0

Views: 590

Answers (1)

Jose Luis Delgadillo
Jose Luis Delgadillo

Reputation: 2448

You can resize your disk following this guide or with the following command:

gcloud compute disks resize DISK_NAME --size DISK_SIZE

Or with the Console:

  1. Go to the Disks page to see a list of zonal persistent disks in your project.
  2. Click the name of the disk that you want to resize.
  3. On the disk details page, click Edit.
  4. In the Size field, enter the new size for your disk.
  5. Click Save to apply your changes to the disk.

After you resize the disk, you must resize the file system so that the operating system can access the additional space.

Note: Do not resize boot disks beyond 2 TB because this is the limit.

Upvotes: 1

Related Questions