I was unable to ssh my current instance so I created a snapshot of the disk in current instance.

Then, used that snapshot to create an new instance.

also, I changed the ssh login to os login for that project.

Now, after restarting both the servers, both the servers give connection timed out error.

attached Instance startup log here


Have a look at the documentation Handling the "Could not connect, retrying..." error:

The boot disk of the instance has run out of free space. When the connection is established, the guest environment updates the ~/.ssh/authorized_keys file with the public SSH key used for the current session. If the disk runs out of free space, the update fails. To identify issues with disk space, check the serial console output of the instance and look for "No space left" errors.

and as I can see in the log file:

Feb 12 17:07:13 amdigit-staging cloud-init[646]: tee: /var/log/cloud-init-output.log: No space left on device
Feb 12 17:07:13 amdigit-staging cloud-init[646]: OSError: [Errno 28] No space left on device

To solve this issue:

  • Resize the boot persistent disk of the instance to increase its size. If the operating system image used by the instance supports automatic resizing, this is the easiest option because the operating system automatically resizes the root partition to match the new size after the instance is restarted.
  • If you know which files are using the disk space, create a startup script that deletes the unnecessary files and frees space for the
    instance to start. Restart the instance so that the script executes
    and cleans the files. Be careful to use the correct command and
    delete the correct files. After your instance starts and you are able to connect to the instance through SSH, set the startup-script
    metadata item back so it does not continue to delete the files.
  • For information about how to access the instance's disk, see General tips for using Compute Engine.

If you still have a problem, you should follow Recovering an inaccessible instance or a full boot disk guide:

If an instance is completely out of disk space or if it is not running a Linux guest environment, then automatically resizing your root filesystem isn't possible, even after you've increased the size of the persistent disk that backs it. If you can't connect to your instance, or your boot disk is full and you can't resize it, you must create a new instance and recreate the boot disk from a snapshot to resize it.

step by step instructions you can find here.

| improve this answer | |
  • 1
    very much thanks for giving detail on what is happening. It really helped to find a solution to the problem. – Dinesh Solanki Feb 12 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.