1

我从 6 个月前开始从 Google Click to Deploy 安装 ERPNext 并使用该软件,该软件从上周开始工作,我无法访问系统和 SSH

使用 SSH 连接时,系统显示通过 Cloud Identity-Aware Proxy 连接失败,代码为 4003,有人可以帮我解决这个问题吗?

知道如何解决这个问题吗?

4

1 回答 1

1

要解决此问题,您应该fsck在引导磁盘上运行命令。

为此,您可以按照以下步骤操作:

  1. 停止您的 VM 实例(不要删除它):
gcloud compute instances stop [INSTANCE_NAME]

在从实例分离启动磁盘之前,您必须停止实例。无需卸载磁盘。

  1. 从您的 VM 实例中分离启动磁盘(通常 DISK_NAME 与 INSTANCE_NAME 相同):
gcloud compute instances detach-disk [INSTANCE_NAME] --disk=[DISK_NAME]
  1. 创建调试 VM 实例:
gcloud compute instances create debug-instance
  1. 引导磁盘作为非引导磁盘附加到调试实例,但不要挂载它:
gcloud compute instances attach-disk debug-instance --disk [DISK_NAME] --device-name debug-disk
  1. 连接到调试实例:
gcloud compute ssh debug-instance
  1. 查找磁盘的根分区,使用命令ls -l /dev/disk/by-id(在本例中/dev/sdb1)以 part1 表示法标识:
$ ls -l /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 Feb 13 14:56 google-debug-disk -> ../../sdb
lrwxrwxrwx 1 root root 10 Feb 13 14:56 google-debug-disk-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 11 Feb 13 14:56 google-debug-disk-part14 -> ../../sdb14
lrwxrwxrwx 1 root root 11 Feb 13 14:56 google-debug-disk-part15 -> ../../sdb15
lrwxrwxrwx 1 root root  9 Feb 13 14:56 google-persistent-disk-0 -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 13 14:56 google-persistent-disk-0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 11 Feb 13 14:56 google-persistent-disk-0-part14 -> ../../sda14
lrwxrwxrwx 1 root root 11 Feb 13 14:56 google-persistent-disk-0-part15 -> ../../sda15
lrwxrwxrwx 1 root root  9 Feb 13 14:56 scsi-0Google_PersistentDisk_debug-disk -> ../../sdb
lrwxrwxrwx 1 root root 10 Feb 13 14:56 scsi-0Google_PersistentDisk_debug-disk-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 11 Feb 13 14:56 scsi-0Google_PersistentDisk_debug-disk-part14 -> ../../sdb14
lrwxrwxrwx 1 root root 11 Feb 13 14:56 scsi-0Google_PersistentDisk_debug-disk-part15 -> ../../sdb15
lrwxrwxrwx 1 root root  9 Feb 13 14:56 scsi-0Google_PersistentDisk_persistent-disk-0 -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 13 14:56 scsi-0Google_PersistentDisk_persistent-disk-0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 11 Feb 13 14:56 scsi-0Google_PersistentDisk_persistent-disk-0-part14 -> ../../sda14
lrwxrwxrwx 1 root root 11 Feb 13 14:56 scsi-0Google_PersistentDisk_persistent-disk-0-part15 -> ../../sda15
  1. 在根分区上运行文件系统检查:
sudo fsck /dev/sdb1

例如:

debug-instance:~$ sudo fsck /dev/sdb1
fsck from util-linux 2.33.1
e2fsck 1.44.5 (15-Dec-2018)
/dev/sdb1: clean, 53782/647168 files, 396250/2588667 blocks
  1. 停止调试实例 VM 实例并从中分离启动磁盘:
gcloud compute instances stop debug-instance
gcloud compute instances detach-disk debug-instance --disk [DISK_NAME]
  1. 将启动磁盘重新附加到您的 VM 实例:
gcloud compute instances attach-disk [INSTANCE_NAME] --disk=[DISK_NAME] --boot
  1. 启动您的虚拟机实例:
gcloud compute instances start [INSTANCE_NAME]
  1. 通过串行端口检查您的 VM 实例的启动日志。
  2. 删除调试实例:
gcloud compute instances delete debug-instance

此外,请查看文档Detaching and Reattaching Boot Disks and Troubleshooting VM start up

于 2021-02-13T14:47:21.077 回答