Your application is running on Compute Engine and is showing sustained failures for a small number of requests. You have narrowed the cause down to a single Compute Engine instance, but the instance is unresponsive to SSH. What should you do next?
A.
Reboot the machine.
B.
Enable and check the serial port output.
C.
Delete the machine and create a new one.
D.
Take a snapshot of the disk and attach it to a new machine.
Difficult to choose because either B(https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-ssh#debug_with_serial_console) or D(https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-ssh#inspect_vm) is recommended by google. I'd stay with B.
Using the first link you provided: https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-ssh#debug_with_serial_console
We recommend that you review the logs from the serial console for connection errors. You can access the serial console from your local workstation by using a browser.
Enable read/write access to an instance's serial console, so you can log into the console and troubleshoot problems with the instance. This approach is useful when you cannot log in with SSH, or if the instance has no connection to the network. The serial console remains accessible in both of these situations
The best course of action is B. Enable and check the serial port output.
Here's why:
Serial Port Output: The serial port output provides a log of the instance's boot process and any error messages that might occur during startup. This is a valuable resource for diagnosing issues when an instance is unresponsive to SSH.
Troubleshooting: By examining the serial port output, you can often identify the root cause of the unresponsiveness, such as a failed boot process, disk errors, or configuration problems.
Let's look at why the other options are less ideal:
A. Reboot the machine: While rebooting might resolve some temporary issues, it doesn't provide any insight into the cause of the problem. If the issue is persistent, rebooting won't solve it.
C. Delete the machine and create a new one: This is a drastic measure that should be avoided unless absolutely necessary. It involves data loss and reconfiguration, which can be time-consuming and disruptive.
D. Take a snapshot of the disk and attach it to a new machine: This approach can be useful for recovering data, but it doesn't address the underlying issue causing the instance to be unresponsive.
B. Enable and check the serial port output.
When a Compute Engine instance becomes unresponsive to SSH, one of the best ways to diagnose the issue is to check the serial port output. The serial console can provide valuable information about the state of the instance and any errors that may be occurring at the system level. This is particularly useful when you can't connect via SSH. Google Cloud allows you to enable interactive access to the serial console, which can be a crucial tool for troubleshooting.
Option B is correct. According to Google Cloud documentation, if a Compute Engine instance is unresponsive to SSH and you have narrowed the cause down to a single instance, you should enable and check the serial port output. The serial port output is a log of system messages and can help you diagnose the issue causing the instance to become unresponsive. To enable and check the serial port output, you can access the serial console as the root user from your local workstation using a browser. This will allow you to review the logs and potentially identify the cause of the problem.
Option C is not a good solution because deleting the machine and creating a new one will not resolve the issue that caused the original instance to become unresponsive.
Option D is not a good solution because taking a snapshot of the disk and attaching it to a new machine will not resolve the issue that caused the original instance to become unresponsive.
Option-B is most suitable: In a real world I will try this and even if doesn't work then I will try Option-D which will help me to troubleshoot in details.
upvoted 4 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
donchick
Highly Voted 3 years, 11 months agomastodilu
3 years, 6 months agothewalker
Most Recent 4 months, 1 week agothewalker
4 months, 1 week agosantoshchauhan
8 months, 3 weeks ago__rajan__
1 year, 2 months agoomermahgoub
1 year, 10 months agoomermahgoub
1 year, 10 months agoomermahgoub
1 year, 10 months agoomermahgoub
1 year, 10 months agotomato123
2 years, 3 months agoParagSanyashiv
2 years, 10 months agosyu31svc
3 years, 4 months agoStelSen
3 years, 9 months ago