Ron
Ron

Reputation: 111

Google compute engine, instance dead? How to reach?

I have a small instance running in GCE, had some troubles with the MongoDb so after some tries decided to reset the instance. But... it didn't seem to come back online. So i stopped the instance and restarted it. It is an Bitnami MEAN stack which starts apache and stuff at startup.

But... i can't reach the instance! No SCP, no SSH, no webservice running. When i try to connect via SSH (in GCE) it times out, cant make connection on port 22. In the information it says 'The instance is booting up and sshd is not running yet', which is possible of course.... But i cant reach the instance in no possible manner not even after an hour wait :) Not sure what's happening if i cant connect to it somehow :( There is some activity in the console... some CPU usage, mostly 0%, some incomming traffic but no outgoing... I hope someone can give me a hint here!

Update 1 After the helpfull tip form Serhii... if found this in the logs...

Booting from Hard Disk 0...
[    0.872447] piix4_smbus 0000:00:01.3: SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr
/dev/sda1 contains a file system with errors, check forced.
/dev/sda1: Inodes that were part of a corrupted orphan linked list found.  

/dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
    (i.e., without -a or -p options)
fsck exited with status code 4
The root filesystem on /dev/sda1 requires a manual fsck

Update 2... So, i need to fsck the drive... Created a snapshot, made a new disk from that snapshot, added the new disk as an extra disk to another instance. Now that instance wont boot with the same problem... removing the extra disk fixed it again. So adding the disk makes it crash even though it isn't the boot-disk?

Upvotes: 1

Views: 767

Answers (1)

Serhii
Serhii

Reputation: 4471

First, have a look at the Compute Engine -> VM instances -> NAME_OF_YOUR_VM -> Logs -> Serial port 1 (console) and try to find errors and warnings that could be connected to lack of free space or SSH. It'll be helpful if you updated your post by providing this information. In case if your instance run out of free space follow this instructions.

You can try to connect to your VM via Serial console by following this guide, but keep in mind that:

The interactive serial console does not support IP-based access restrictions such as IP whitelists. If you enable the interactive serial console on an instance, clients can attempt to connect to that instance from any IP address.

more details you can find in the documentation.

Have a look at the Troubleshooting SSH guide and Known issues for SSH in browser. In addition, Google provides a troubleshooting script for Compute Engine to identify issues with SSH login/accessibility of your Linux based instance.

If you still have a problem try to use your disk on a new instance.

EDIT It looks like your test VM is trying to boot from the disk that you created from the snapshot. Try to follow this guide.

If you still have a problem, you can try to recreate the boot disk from a snapshot to resize it.

Upvotes: 2

Related Questions