Troubleshoot instance startup failures

更新时间:
复制 MD 格式

Instance startup failures can be caused by accidental operations or computer viruses. This topic provides a general troubleshooting process and a step-by-step example of resolving a startup failure caused by an incorrect disk mount configuration. This helps you quickly resolve instance issues and ensure business continuity.

Troubleshooting approach

image
Warning

Mistakes made during troubleshooting can cause data corruption. Before you proceed, we recommend creating snapshots of the instance's system and data disks to ensure data security. For more information about how to create a snapshot, see Create a manual snapshot.

The following table describes common symptoms of instance startup failures.

Symptom

Description

An error occurs on the VNC connection screen

  • After you connect to the instance by using VNC, the instance enters maintenance mode.

  • After you connect to the instance by using VNC, an error message appears.

The instance fails to start from the console or the restart takes too long

  • The instance fails to start after a restart operation.

  • After a restart operation, the instance status remains Stopping for a long time.

Cannot connect to the instance over SSH

  • SSH connections to the instance time out.

Cannot access services deployed on the instance from a browser

  • The connection to the service on the instance times out or fails when you use a browser.

  • SSH connections to the instance time out.

Procedure

Scenario

Your issue occurs in the following scenario:

  • The instance exhibits one of the startup failure symptoms described above.

  • When you connect to the instance by using VNC, the system enters maintenance mode or an error message appears.

Overview

If you cannot determine whether a recent change caused the startup failure and you do not want to use a snapshot or reinitialize the system disk, follow the troubleshooting process shown in the figure below.

image

Steps

  1. Connect to the instance by using VNC to view error information.

    If an instance fails to start, it usually enters maintenance mode. You can connect to the instance by using VNC to view related information. For more information about how to connect to an instance by using VNC, see Connect to an instance by using VNC.

    Alibaba Cloud Linux

    image

    CentOS

    Ubuntu

    image

  2. View instance operation records.

    The instance operation records in the following figure show a recent cloud disk detach operation. For more information, see View the operation records of an instance.

    On the change tracking page, set Read/Write Type to Write and specify a time range. The query result contains three records: one DetachDisk record (change risk level: High) and two InvokeCommand records from Cloud Assistant (change risk level: Medium). The change type for all records is ConsoleOperation.

  3. Create a snapshot for the instance.

    Create a snapshot for the instance to prevent data loss during the next steps. For more information, see Create a manual snapshot.

  4. Use the self-service diagnostic tool to diagnose the instance.

    For more information, see Use the self-service diagnostic tool to fix instance issues. The following figure shows a sample diagnosis result.

    The diagnosis report shows two critical exceptions: the /dev/vdb1 device (mount point /mnt/device_vdb) configured in /etc/fstab does not exist, and the file system data layout is corrupted (the kernel log shows a "Bad geometry" error: block count 10485499 exceeds size of device 10485248 blocks).

    The report indicates that a device configured in the instance's /etc/fstab file does not exist, which may cause the instance to fail to start. This diagnosis result is consistent with the instance operation records found in Step 2.

  5. Fix the issue based on the diagnosis result.

    Follow the recommended solutions in the diagnosis report to fix the issue. For the diagnosis result in this example, two solutions are available:

    1. Solution 1: If the data disk has been released, you can remove the non-existent device entry from the /etc/fstab file. For more information, see Fix a startup failure caused by an incorrect /etc/fstab configuration in a Linux instance.

    2. Solution 2: If the data disk has not been released, you can reattach the detached data disk to the original instance in the console. For more information, see Attach a data disk.

    Note
  6. Restart the instance to verify the fix.

    After fixing the issue, restart the instance to verify the fix.

Related documentation