本文介绍了无法访问 ec2 ebs 支持的实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种未知原因,可通过端口 22 上的 ssh 访问的实例不再允许访问.在检查安全组和 NACL 后,更正与 VPIC 中网关关联的路由表,并重新启动实例后,我们读取了系统日志,但在将日志与健康实例进行比较后,似乎没有任何警报.日志如下:

[ 0.000000] Linux 版本 4.9.76-3.78.amzn1.x86_64 (mockbuild@gobi-build-60009) (gcc 版本 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC) ) #1 SMP1 1 月 1 日星期五:51:35 UTC 2018[0.000000]命令行:root=LABEL=/console=tty1 console=ttyS0 selinux=0 nvme_core.io_timeout=4294967295[0.000000] x86/fpu:支持 XSAVE 功能 0x001:'x87 浮点寄存器'[0.000000] x86/fpu:支持 XSAVE 功能 0x002:SSE 寄存器"[0.000000] x86/fpu:支持 XSAVE 功能 0x004:'AVX 寄存器'[0.000000] x86/fpu:xstate_offset[2]:576,xstate_sizes[2]:256[0.000000] x86/fpu:启用 xstate 功能 0x7,上下文大小为 832 字节,使用标准"格式.[0.000000] x86/fpu:使用急切"FPU 上下文切换.[ 0.000000] e820:BIOS 提供的物理 RAM 映射:[ 0.000000] BIOS-e820: [内存 0x0000000000000000-0x000000000009dfff] 可用[ 0.000000] BIOS-e820: [内存 0x000000000009e000-0x000000000009ffff] 保留[ 0.000000] BIOS-e820: [内存 0x00000000000e0000-0x00000000000fffff] 保留[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000efffffff] 可用[ 0.000000] BIOS-e820: [mem 0x00000000fc000000-0x00000000ffffffff] 保留[ 0.000000] BIOS-e820: [内存 0x0000000100000000-0x000000020fffffff] 可用[ 0.000000] NX(执行禁用)保护:激活[0.000000] SMBIOS 2.7 出现.[0.000000]检测到管理程序:Xen[0.000000] Xen 4.2 版.[0.000000] Netfront 和 Xen 平台 PCI 驱动程序已为此内核编译:拔下模拟 NIC.[0.000000] Blkfront 和 Xen 平台 PCI 驱动程序已为此内核编译:拔出模拟磁盘.[ 0.000000] 您可能需要更改根设备[ 0.000000] 从/dev/hd[a-d] 到/dev/xvd[a-d][ 0.000000] 在您的 root= 内核命令行选项中[0.000000] e820:last_pfn = 0x210000 max_arch_pfn = 0x400000000[ 0.000000] x86/PAT:配置 [0-7]:WB WC UC-UC WB WC UC-WT
[0.000000] e820:last_pfn = 0xf0000 max_arch_pfn = 0x400000000[ 0.000000] 在 [mem 0x000fbc20-0x000fbc2f] 找到 SMP MP 表映射在 [ffff8800000fbc20][0.000000] RAMDISK:[内存0x371e1000-0x37feffff][0.000000] ACPI:早期表校验和验证已禁用[0.000000] ACPI:RSDP 0x00000000000EA020 000024(v02 Xen)[0.000000] ACPI:XSDT 0x00000000FC00DDC0 000054(v01 Xen HVM 00000000 HVML 00000000)[0.000000] ACPI:FACP 0x00000000FC00DA80 0000F4(v04 Xen HVM 00000000 HVML 00000000)[0.000000] ACPI:DSDT 0x00000000FC001CE0 00BD19(v02 Xen HVM 00000000 INTL 20090123)[0.000000] ACPI:FACS 0x00000000FC001CA0 000040[0.000000] ACPI:FACS 0x00000000FC001CA0 000040[0.000000] ACPI:APIC 0x00000000FC00DB80 0000D8(v02 Xen HVM 00000000 HVML 00000000)[0.000000] ACPI:HPET 0x00000000FC00DCD0 000038(v01 Xen HVM 00000000 HVML 00000000)[0.000000] ACPI:WAET 0x00000000FC00DD10 000028(v01 Xen HVM 00000000 HVML 00000000)[0.000000] ACPI:SSDT 0x00000000FC00DD40 000031(v02 Xen HVM 00000000 INTL 20090123)[0.000000] ACPI:SSDT 0x00000000FC00DD80 000031(v02 Xen HVM 00000000 INTL 20090123)[0.000000]未找到NUMA配置[ 0.000000] 在 [mem 0x00000000000000000-0x000000020fffffff] 伪造节点[0.000000]NODE_DATA(0)分配[mem 0x20ffd9000-0x20ffffff][ 0.000000] 区域范围:[ 0.000000] DMA [内存 0x0000000000001000-0x0000000000ffffff][ 0.000000] DMA32 [内存 0x0000000001000000-0x00000000ffffffff][ 0.000000] 正常 [内存 0x0000000100000000-0x000000020fffffff][ 0.000000] 每个节点的可移动区域开始[0.000000]早期内存节点范围[0.000000]节点0:[mem 0x0000000000001000-0x000000000009dff][0.000000]节点0:[mem 0x0000000000100000-0x00000000effffff][0.000000]节点0:[mem 0x0000000100000000-0x000000020fffffff][ 0.000000] initmem 设置节点 0 [mem 0x0000000000001000-0x000000020fffffff][0.000000]ACPI:PM-定时器IO端口:0xb008[0.000000] IOAPIC[0]: apic_id 1,版本 17,地址 0xfec00000,GSI 0-47[0.000000]ACPI:INT_SRC_OVR(总线0 bus_irq 0 global_irq 2 dfl dfl)[0.000000] ACPI:INT_SRC_OVR(总线 0 bus_irq 5 global_irq 5 低电平)[0.000000] ACPI:INT_SRC_OVR(总线 0 bus_irq 10 global_irq 10 低电平)[0.000000] ACPI:INT_SRC_OVR(总线0 bus_irq 11 global_irq 11低电平)[0.000000]使用ACPI(MADT)获取SMP配置信息[0.000000] ACPI:HPET id:0x8086a201 base:0xfed00000[0.000000] smpboot:允许 15 个 CPU,13 个热插拔 CPU[ 0.000000] PM:注册的 nosave 内存:[mem 0x00000000-0x00000fff][ 0.000000] PM:注册的 nosave 内存:[mem 0x0009e000-0x0009ffff][ 0.000000] PM:注册的 nosave 内存:[mem 0x000a0000-0x000dffff][ 0.000000] PM:注册的 nosave 内存:[mem 0x000e0000-0x000fffff][ 0.000000] PM:注册的 nosave 内存:[mem 0xf0000000-0xfbffffff][ 0.000000] PM:注册的 nosave 内存:[mem 0xfc000000-0xffffffff][ 0.000000] e820: [mem 0xf0000000-0xfbffffff] 可用于 PCI 设备[0.000000] 在 Xen HVM 上启动半虚拟化内核[0.000000]时钟源:精制jiffies:掩码:0xffffffff max_cycles:0xffffffff,max_idle_ns:7645519600211568 ns[0.000000] setup_percpu:NR_CPUS:128 nr_cpumask_bits:128 nr_cpu_ids:15 nr_node_ids:1[ 0.000000] percpu:嵌入式 35 页/cpu @ffff880207200000 s103448 r8192 d31720 u262144[ 0.000000] PV qspinlock 哈希表条目:256(顺序:0,4096 字节)[0.000000]按节点顺序构建了1个区域列表,移动性分组.总页数:2064264[ 0.000000] 政策区域:正常[0.000000]内核命令行:root=LABEL=/console=tty1 console=ttyS0 selinux=0 nvme_core.io_timeout=4294967295[ 0.000000] PID 哈希表条目:4096(顺序:3,32768 字节)[ 0.000000] 内存:8158532K/8388212K 可用(5494K 内核代码,1137K rwdata,2472K Rodata,1280K init,3132K bss,229680K 保留,0K cma-served)[0.000000] SLUB:HWalign=64,Order=0-3,MinObjects=0,CPUs=15,Nodes=1[0.000000]内核/用户页表隔离:启用[ 0.000000] 分层 RCU 实现.[ 0.000000] 叶扇出的构建时间调整为 64.[ 0.000000] RCU 将 CPU 从 NR_CPUS=128 限制为 nr_cpu_ids=15.[0.000000] RCU:调整 rcu_fanout_leaf=64、nr_cpu_ids=15 的几何[0.000000]NR_IRQS:8448 nr_irqs:952 16[0.000000] xen:events: 使用 2 级 ABI[0.000000] xen:events: 用于事件传递的 Xen HVM 回调向量已启用[ 0.000000] 控制台:彩色 VGA+ 80x25[ 0.000000] 控制台 [tty1] 已启用[0.000000]无法获得 hvm 参数 CONSOLE_EVTCHN (18):-22![ 0.000000] 控制台 [ttyS0] 已启用[0.000000]时钟源:hpet:掩码:0xffffffff max_cycles:0xffffffff,max_idle_ns:30580167144 ns[ 0.000000] tsc:使用 PIT 的快速 TSC 校准[ 0.000000] tsc:检测到 2400.223 MHz 处理器[0.028000]校准延迟循环(跳过),使用定时器频率计算的值.. 4800.17 BogoMIPS (lpj=9600352)[0.030140]pid_max:默认值:32768 最小值:301[0.032019] ACPI:核心修订版 20160831[0.041796]ACPI:成功获取并加载了 3 个 ACPI AML 表[0.044026]安全框架已初始化[0.048404] Dentry 缓存哈希表条目:1048576(顺序:11,8388608 字节)[0.053333]索引节点缓存哈希表条目:524288(顺序:10,4194304字节)[0.056592]挂载缓存哈希表条目:16384(顺序:5,131072字节)[0.060009]挂载点缓存哈希表条目:16384(顺序:5,131072字节)[0.068263]CPU:物理处理器ID:0[0.072003]CPU:处理器核心ID:0[0.076015] mce:CPU 支持 2 个 MCE bank[0.078692]最后一级 iTLB 条目:4KB 1024、2MB 1024、4MB 1024[ 0.080004] 最后一级 dTLB 条目:4KB 1024、2MB 1024、4MB 1024、1GB 4[0.084003] Spectre V2 缓解:缓解:完整的通用 retpoline[0.089093]释放 SMP 替代内存:24K[0.098519]ftrace:在 86 页中分配 21933 个条目[0.128101]smpboot:最大逻辑包:8[0.132105]x2apic:IRQ 重映射不支持 X2APIC 模式[0.136006] 将 APIC 路由切换到物理平面.[0.140000]..定时器:向量=0x30 apic1=0 pin1=2 apic2=0 pin2=0[0.185139]时钟源:xen:掩码:0xffffffffffffffff max_cycles:0x1cd42e4dffb,max_idle_ns:881590591483 ns[0.192015] 为 CPU 0 安装 Xen 计时器[ 0.196081] smpboot: CPU0: Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz (family: 0x6, model: 0x3f, stepping: 0x2)[0.201560]CPU 0 自旋锁事件 irq 53[0.204007] 性能事件:不支持的 p6 CPU 型号 63 没有 PMU 驱动程序,仅软件事件.[0.208609] 为 CPU 1 安装 Xen 定时器[0.211388]x86:启动 SMP 配置:[0.212007] .... 节点#0,CPU:#1[0.216030] cpu 1 自旋锁事件 irq 59[0.219275]x86:启动了 1 个节点,2 个 CPU[0.220007]smpboot:总共激活了 2 个处理器 (9600.35 BogoMIPS)[0.224454]devtmpfs:初始化[0.224454]x86/mm:内存块大小:128MB[0.232069]时钟源:jiffies:掩码:0xffffffff max_cycles:0xffffffff,max_idle_ns:7645041785100000 ns[0.236021]futex哈希表条目:4096(顺序:6,262144字节)[0.240060]NET:注册协议族16[0.260012]cpuidle:使用州长阶梯[0.280006]cpuidle:使用调控器菜单[0.282648]ACPI:注册的总线类型PCI[0.284009] acpiphp:ACPI 热插拔 PCI 控制器驱动程序版本:0.5[0.288310]PCI:使用配置类型 1 进行基本访问[0.308134] HugeTLB 注册了 2 MB 页面大小,预分配了 0 页[0.312093]ACPI:添加了_OSI(模块设备)[0.314822]ACPI:添加_OSI(处理器设备)[0.316012]ACPI:添加了_OSI(3.0 _SCP 扩展)[0.318974]ACPI:添加_OSI(处理器聚合器设备)[0.323569]ACPI:启用解释器[0.324017]ACPI:(支持S0 S4 S5)[0.326449]ACPI:使用 IOAPIC 进行中断路由[0.328035]PCI:使用来自 ACPI 的主机桥窗口;如有必要,请使用pci=nocrs"并报告错误[0.348482]随机:快速初始化完成[0.376873]ACPI:PCI 根桥 [PCI0](域 0000 [总线 00-ff])[0.380016] acpi PNP0A03:00:_OSC: 操作系统支持 [Segments MSI][0.383750]acpi PNP0A03:00:_OSC失败(AE_NOT_FOUND);禁用 ASPM[0.384018] acpi PNP0A03:00:无法添加 MMCONFIG 信息,无法访问此桥下的扩展 PCI 配置空间.[0.389126]acpiphp:插槽[0]注册[0.392498]acpiphp:插槽[3]注册[0.395603]acpiphp:插槽[4]注册[0.396308]acpiphp:插槽[5]注册[0.399438]acpiphp:插槽[6]注册[0.400355]acpiphp:插槽[7]注册[0.403342]acpiphp:插槽[8]注册[0.404277]acpiphp:插槽[9]注册[0.407008]acpiphp:插槽[10]注册[0.408279]acpiphp:插槽[11]注册[0.411141]acpiphp:插槽[12]注册[0.412286]acpiphp:插槽[13]注册[0.415130]acpiphp:插槽[14]注册[0.416290]acpiphp:插槽[15]注册[0.419209]acpiphp:插槽[16]注册[0.420278]acpiphp:插槽[17]注册[0.423298]acpiphp:插槽[18]注册[0.424268]acpiphp:插槽[19]注册[0.427590]acpiphp:插槽[20]注册[0.428328]acpiphp:插槽[21]注册[0.432274]acpiphp:插槽[22]注册[0.435300]acpiphp:插槽[23]注册[0.436284]acpiphp:插槽[24]注册[0.439219]acpiphp:插槽[25]注册[0.440285]acpiphp:插槽[26]注册[0.443182]acpiphp:插槽[27]注册[0.444291]acpiphp:插槽[28]注册[0.447217]acpiphp:插槽[29]注册[0.448415]acpiphp:插槽[30]注册[0.451265]acpiphp:插槽[31]注册[0.452277]PCI 主桥到总线 0000:00[0.455088]pci_bus 0000:00:根总线资源[io 0x0000-0x0cf7窗口][0.456006]pci_bus 0000:00:根总线资源[io 0x0d00-0xffff窗口][0.460008]pci_bus 0000:00:根总线资源[内存0x000a0000-0x000bffff窗口][0.464007]pci_bus 0000:00:根总线资源[内存0xf0000000-0xfbffffff窗口][0.468008]pci_bus 0000:00:根总线资源[总线00-FF][0.476922] pci 0000:00:01.1:旧版IDE怪癖:reg 0x10:[io 0x01f0-0x01f7][ 0.480006] pci 0000:00:01.1: 传统 IDE 怪癖: reg 0x14: [io 0x03f6][0.484007] pci 0000:00:01.1: 旧版 IDE 怪癖: reg 0x18: [io 0x0170-0x0177][ 0.488008] pci 0000:00:01.1: 传统 IDE 怪癖: reg 0x1c: [io 0x0376][0.492882] * 在芯片组上发现 PM-Timer 错误.由于错误的解决方法,[0.492882]*这个时钟源很慢.考虑尝试其他时钟源[0.497209] pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] 由 PIIX4 ACPI 声明[0.506334]ACPI:PCI中断链接[LNKA](IRQs *5 10 11)[0.511381]ACPI:PCI中断链接[LNKB](IRQ 5 *10 11)[0.515186]ACPI:PCI中断链接[LNKC](IRQ 5 10 * 11)[0.519047]ACPI:PCI中断链接[LNKD](IRQs *5 10 11)[0.539555]ACPI:在块 00 到 0F 中启用了 2 个 GPE[0.540081]xen:气球:初始化气球驱动程序[0.544080] vgaarb:设置为引导设备:PCI:0000:00:02.0[0.547559] vgaarb:添加设备:PCI:0000:00:02.0,解码=io+mem,拥有=io+mem,locks=none[0.552019] vgaarb:加载[0.554173] vgaarb:桥接控制可能0000:00:02.0[0.556063]PCI:使用 ACPI 进行 IRQ 路由[0.560018]网络标签:初始化[0.564011]NetLabel:域哈希大小= 128[0.566806]NetLabel:协议=未标记的CIPSOv4[0.568018]NetLabel:默认允许未标记的流量[0.571442]HPET:总共3个定时器,0个定时器将用于每个CPU定时器[0.576019]hpet0:在 MMIO 0xfed00000,IRQ 2、8、0[0.580004]hpet0:3 个比较器,64 位 62.500000 MHz 计数器[0.588020]时钟源:切换到时钟源xen[0.598500]VFS:磁盘配额dquot_6.6.0[0.601309]VFS:Dquot-cache 哈希表条目:512(顺序 0,4096 字节)[0.605672]即插即用:即插即用ACPI初始化[0.608218]系统00:00:[mem 0x00000000-0x0009ffff]无法保留[0.612470]系统00:01:[io 0x08a0-0x08a3]已被保留[0.616097]系统00:01:[io 0x0cc0-0x0ccf]已被保留[0.619622]系统00:01:[io 0x04d0-0x04d1]已被保留[0.623416]系统00:07:[io 0x10c0-0x1141]已被保留[0.626956]系统00:07:[io 0xb044-0xb047]已被保留[0.647502]pnp:即插即用 ACPI:找到 8 个设备[0.656850]时钟源:acpi_pm:掩码:0xffffff max_cycles:0xffffff,max_idle_ns:2085701024 ns[0.662917]NET:注册协议族2[0.666000]TCP建立的哈希表条目:65536(顺序:7,524288字节)[0.670774] TCP 绑定哈希表条目:65536(顺序:8,1048576 字节)[0.674720]TCP:哈希表配置(建立65536绑定65536)[0.678934]UDP 哈希表条目:4096(顺序:5,131072 字节)[0.682528]UDP-Lite哈希表条目:4096(顺序:5,131072字节)[0.686312]NET:注册协议族1[0.689188] pci 0000:00:00.0:限制直接 PCI/PCI 传输[0.692793] pci 0000:00:01.0:PIIX3:启用被动释放[0.696602] pci 0000:00:01.0:激活 ISA DMA 挂起解决方法[0.700437] pci 0000:00:02.0:在 [mem 0x000c0000-0x000dffff] 处带有阴影 ROM 的视频设备[0.705563]解压initramfs...[0.917049]释放initrd内存:14396K[0.919784]PCI-DMA:使用软件反弹缓冲进行 IO (SWIOTLB)[0.923539] 软件 IO TLB [mem 0xec000000-0xf0000000] (64MB) 映射在 [ffff8800ec000000-ffff8800efffffff][0.929857] 审计:初始化 netlink 子系统(已禁用)[0.933233]审计:类型=2000审计(1518127712.303:1):初始化[0.937152]初始化系统可信密钥环[0.939991]工作集:timestamp_bits=36 max_order=21 bucket_order=0[0.981248]非对称注册的密钥类型[0.984175]非对称密钥解析器x509"注册[0.987335]块层 SCSI 通用 (bsg) 驱动程序版本 0.4 已加载(主要 254)[0.992400] io 调度程序 noop 已注册(默认)[0.995457] pci_hotplug:PCI 热插拔 PCI 核心版本:0.5[1.000341] pciehp:PCI Express 热插拔控制器驱动程序版本:0.4[1.006019] xen:grant_table:使用版本 1 布局授予表[1.009648]授权表初始化[1.012106]无法获得 hvm 参数 CONSOLE_EVTCHN (18):-22![1.015979] 串行:8250/16550 驱动程序,4 个端口,禁用 IRQ 共享[1.046059] 00:06:I/O 0x3f8 处的 ttyS0(irq = 4,base_baud = 115200)是 16550A[1.051547] xen_netfront:初始化 Xen 虚拟以太网驱动程序[ 1.056102] i8042: PNP: PS/2 控制器 [PNP0303:PS2K,PNP0f13:PS2M] 在 0x60,0x64 irq 1,12[1.065396] 系列:i8042 KBD 端口在 0x60,0x64 irq 1[1.068437] 系列:i8042 AUX 端口在 0x60,0x64 irq 12[1.071515] hidraw:原始 HID 事件驱动程序 (C) Jiri Kosina[1.074748]无效的 max_queues (4),将使用默认最大值:2.[1.079104]输入:AT翻译设置2键盘为/devices/platform/i8042/serio0/input/input0[1.079163]NET:注册协议族 17[1.079382]微码:sig=0x306f2,pf=0x1,修订版=0x3b[1.084581] 微码:微码更新驱动程序:v2.01 <tigran@aivazian.fsnet.co.uk>, Peter Oruba[1.084705] 注册 taskstats 版本 1[1.084708]加载编译的 X.509 证书[1.086665] alg:没有测试 pkcs1pad(rsa,sha256) (pkcs1pad(rsa-generic,sha256))[1.087335] 加载了 X.509 证书构建时间自动生成的内核密钥:90a8ce1f8c89128b6c9d51818805938ea4d0459c"[1.087870] zswap:默认 zpool zbud 不可用[1.087870]zswap:池创建失败[1.089431] blkfront:xvda:屏障或冲洗:禁用;永久赠款:禁用;间接描述符:启用;[1.093875]xvda:xvda1[1.190151]释放未使用的内核内存:1280K[1.194519]写保护内核只读数据:10240k[1.199910] 释放未使用的内核内存:632K[1.207242]释放未使用的内核内存:1624K[1.225990] dm_mod:模块验证失败:签名和/或所需的密钥丢失 - 污染内核[1.235306]设备映射器:uevent:1.0.3版[1.239778] 设备映射器:ioctl:4.35.0-ioctl (2016-06-23) 初始化:dm-devel@redhat.com[1.251244]udevd[840]:开始版本173[1.286380]SCSI 子系统初始化[1.294718]scsi host0:ata_piix[1.305494]SCSI 主机 1:ata_piix[1.308485]ata1:PATA 最大 MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc100 irq 14[1.313133] ata2:PATA 最大 MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc108 irq 15growroot: NOCHANGE: disk=/dev/xvda partition=1: size=1073737694,不能增长[1.530413]EXT4-fs(xvda1):信息:只读文件系统需要恢复[1.535346]EXT4-fs(xvda1):恢复期间将启用写访问[1.948112] tsc:精制的 TSC 时钟源校准:2400.002 MHz[1.952697]时钟源:tsc:掩码:0xffffffffffffffff max_cycles:0x22983938a92,max_idle_ns:440795216168 ns[2.818080]随机:crng init完成[3.027038]EXT4-fs(xvda1):只读fs上的孤儿清理[3.035785]EXT4-fs(xvda1):删除了1个孤立inode[3.039754]EXT4-fs(xvda1):恢复完成[3.047535] EXT4-fs (xvda1):以有序数据模式挂载的文件系统.选项:(空)[3.083990] dracut:使用 -o noatime,ro 重新挂载/dev/disk/by-label/\x2f[3.130440] EXT4-fs (xvda1):以有序数据模式挂载的文件系统.选项:(空)[3.139953]dracut:挂载的根文件系统/dev/xvda1[3.166094]dracut:切换根image_name="amzn-ami-hvm"image_version="2017.09"image_arch="x86_64"image_file="amzn-ami-hvm-2017.09.1.20180115-x86_64.ext4.gpt"image_stamp="eeb4-18f0"image_date="20180115184347"recipe_name="amzn ami"recipe_id="c9c871d2-7d71-8baa-e873-c70f-cbbe-ddb2-79ee86e7"

是否遗漏了日志突出显示的导致拒绝端口 22 上的 ssh 访问的内容?

解决方案

@LloydMoore由于您在系统日志中获得以下日志

[ 0.000000] 您可能需要更改根设备[ 0.000000] 从/dev/hd[a-d] 到/dev/xvd[a-d][ 0.000000] 在您的 root= 内核命令行选项中

您可能需要分离并重命名根设备才能解决此问题.


请按照以下步骤解决此问题.请检查并建议这是否解决了您的问题 开始之前:此过程需要停止和启动实例.请注意以下事项:

  1. 如果您的实例是 Amazon EC2 Auto Scaling 组的一部分,则停止实例可能会终止它.使用 Amazon EMR、AWS CloudFormation、AWS Elastic Beanstalk 启动的实例可能是 AWS Auto Scaling 组的一部分.这种情况下的实例终止取决于您的 Auto Scaling 组的实例缩减保护设置.如果您的实例属于 Auto Scaling 组,请在开始解决步骤之前将其从 Auto Scaling 组中暂时删除.

  2. 停止和启动实例会更改实例的公共 IP 地址.将外部流量路由到您的实例时,最好使用弹性 IP 地址而不是公共 IP 地址.

  3. 为防止数据丢失的可能性,请在尝试卸载之前拍摄卷的快照.强制分离卡住的卷可能会损坏文件系统或其包含的数据,或者无法使用相同的设备名称附加新卷,除非您重新启动实例.

  4. 您必须是 root 用户,或者需要拥有或至少拥有 sudo 权限才能执行此过程.


把这些东西放在手边

  1. --instance-id
  2. --volume-id
  3. --availability-zone


1 首先,您必须在与实例 A 相同的可用区中创建另一个实例实例 B(EBS 支持)2 停止实例3 从实例 A 中分离根 EBS 卷4 将该 EBS 卷作为/dev/xvdf 附加到实例 B5 mount/dev/xvdf 在 instance-B 上使用命令:6 须藤 mkdir -p/mnt/xvdf7 须藤挂载/dev/xvdf/mnt/xvdf8 检查公钥,如果您有相应的私钥,那么最好创建新的密钥对并将其添加到/mnt/xvdf/home/root/.ssh/authorized_keys(如果不是 root 用户,则将 root 替换为您当前的用户配置文件 ex: ec2 用户)9 将实例-B 的/etc/fstab 文件与/mnt/xvdf/etc/fstab 文件进行比较,并对/mnt/xvdf//etc/fstab 文件进行必要的修改.10 从实例 B 卸载卷: umount/mnt/xvdf11 以 root 身份将卷附加回实例 A12 重启实例-A

[https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html][https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html][https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html][https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html][https://stackoverflow.com/a/22747744/3224357][https://forums.aws.amazon.com/thread.jspa?messageID=984907#984907][https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html]

For some unknown reason, an instance that was accessible via ssh on port 22 is no longer allowing access. After checking security groups and NACLs, correct routing tables associated with Gateways in the VPIC, and, rebooting the instance, We got a readout of the system logs but nothing seems to be alarming after comparing the logs with an instance that is healthy. The logs are as follows:

[ 0.000000] Linux version 4.9.76-3.78.amzn1.x86_64 (mockbuild@gobi-build-60009) (gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC) ) #1 SMP Fri Jan 12 19:51:35 UTC 2018[ 0.000000] Command line: root=LABEL=/ console=tty1 console=ttyS0 selinux=0 nvme_core.io_timeout=4294967295[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.[ 0.000000] x86/fpu: Using 'eager' FPU context switches.[ 0.000000] e820: BIOS-provided physical RAM map:[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009dfff] usable[ 0.000000] BIOS-e820: [mem 0x000000000009e000-0x000000000009ffff] reserved[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000efffffff] usable[ 0.000000] BIOS-e820: [mem 0x00000000fc000000-0x00000000ffffffff] reserved[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000020fffffff] usable[ 0.000000] NX (Execute Disable) protection: active[ 0.000000] SMBIOS 2.7 present.[ 0.000000] Hypervisor detected: Xen[ 0.000000] Xen version 4.2.[ 0.000000] Netfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated NICs.[ 0.000000] Blkfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated disks.[ 0.000000] You might have to change the root device[ 0.000000] from /dev/hd[a-d] to /dev/xvd[a-d][ 0.000000] in your root= kernel command line option[ 0.000000] e820: last_pfn = 0x210000 max_arch_pfn = 0x400000000[ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT
[ 0.000000] e820: last_pfn = 0xf0000 max_arch_pfn = 0x400000000[ 0.000000] found SMP MP-table at [mem 0x000fbc20-0x000fbc2f] mapped at [ffff8800000fbc20][ 0.000000] RAMDISK: [mem 0x371e1000-0x37feffff][ 0.000000] ACPI: Early table checksum verification disabled[ 0.000000] ACPI: RSDP 0x00000000000EA020 000024 (v02 Xen )[ 0.000000] ACPI: XSDT 0x00000000FC00DDC0 000054 (v01 Xen HVM 00000000 HVML 00000000)[ 0.000000] ACPI: FACP 0x00000000FC00DA80 0000F4 (v04 Xen HVM 00000000 HVML 00000000)[ 0.000000] ACPI: DSDT 0x00000000FC001CE0 00BD19 (v02 Xen HVM 00000000 INTL 20090123)[ 0.000000] ACPI: FACS 0x00000000FC001CA0 000040[ 0.000000] ACPI: FACS 0x00000000FC001CA0 000040[ 0.000000] ACPI: APIC 0x00000000FC00DB80 0000D8 (v02 Xen HVM 00000000 HVML 00000000)[ 0.000000] ACPI: HPET 0x00000000FC00DCD0 000038 (v01 Xen HVM 00000000 HVML 00000000)[ 0.000000] ACPI: WAET 0x00000000FC00DD10 000028 (v01 Xen HVM 00000000 HVML 00000000)[ 0.000000] ACPI: SSDT 0x00000000FC00DD40 000031 (v02 Xen HVM 00000000 INTL 20090123)[ 0.000000] ACPI: SSDT 0x00000000FC00DD80 000031 (v02 Xen HVM 00000000 INTL 20090123)[ 0.000000] No NUMA configuration found[ 0.000000] Faking a node at [mem 0x0000000000000000-0x000000020fffffff][ 0.000000] NODE_DATA(0) allocated [mem 0x20ffd9000-0x20fffafff][ 0.000000] Zone ranges:[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff][ 0.000000] DMA32 [mem 0x0000000001000000-0x00000000ffffffff][ 0.000000] Normal [mem 0x0000000100000000-0x000000020fffffff][ 0.000000] Movable zone start for each node[ 0.000000] Early memory node ranges[ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009dfff][ 0.000000] node 0: [mem 0x0000000000100000-0x00000000efffffff][ 0.000000] node 0: [mem 0x0000000100000000-0x000000020fffffff][ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000020fffffff][ 0.000000] ACPI: PM-Timer IO Port: 0xb008[ 0.000000] IOAPIC[0]: apic_id 1, version 17, address 0xfec00000, GSI 0-47[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 low level)[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 low level)[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 low level)[ 0.000000] Using ACPI (MADT) for SMP configuration information[ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000[ 0.000000] smpboot: Allowing 15 CPUs, 13 hotplug CPUs[ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff][ 0.000000] PM: Registered nosave memory: [mem 0x0009e000-0x0009ffff][ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000dffff][ 0.000000] PM: Registered nosave memory: [mem 0x000e0000-0x000fffff][ 0.000000] PM: Registered nosave memory: [mem 0xf0000000-0xfbffffff][ 0.000000] PM: Registered nosave memory: [mem 0xfc000000-0xffffffff][ 0.000000] e820: [mem 0xf0000000-0xfbffffff] available for PCI devices[ 0.000000] Booting paravirtualized kernel on Xen HVM[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns[ 0.000000] setup_percpu: NR_CPUS:128 nr_cpumask_bits:128 nr_cpu_ids:15 nr_node_ids:1[ 0.000000] percpu: Embedded 35 pages/cpu @ffff880207200000 s103448 r8192 d31720 u262144[ 0.000000] PV qspinlock hash table entries: 256 (order: 0, 4096 bytes)[ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 2064264[ 0.000000] Policy zone: Normal[ 0.000000] Kernel command line: root=LABEL=/ console=tty1 console=ttyS0 selinux=0 nvme_core.io_timeout=4294967295[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)[ 0.000000] Memory: 8158532K/8388212K available (5494K kernel code, 1137K rwdata, 2472K rodata, 1280K init, 3132K bss, 229680K reserved, 0K cma-reserved)[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=15, Nodes=1[ 0.000000] Kernel/User page tables isolation: enabled[ 0.000000] Hierarchical RCU implementation.[ 0.000000] Build-time adjustment of leaf fanout to 64.[ 0.000000] RCU restricting CPUs from NR_CPUS=128 to nr_cpu_ids=15.[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=15[ 0.000000] NR_IRQS:8448 nr_irqs:952 16[ 0.000000] xen:events: Using 2-level ABI[ 0.000000] xen:events: Xen HVM callback vector for event delivery is enabled[ 0.000000] Console: colour VGA+ 80x25[ 0.000000] console [tty1] enabled[ 0.000000] Cannot get hvm parameter CONSOLE_EVTCHN (18): -22![ 0.000000] console [ttyS0] enabled[ 0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 30580167144 ns[ 0.000000] tsc: Fast TSC calibration using PIT[ 0.000000] tsc: Detected 2400.223 MHz processor[ 0.028000] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.17 BogoMIPS (lpj=9600352)[ 0.030140] pid_max: default: 32768 minimum: 301[ 0.032019] ACPI: Core revision 20160831[ 0.041796] ACPI: 3 ACPI AML tables successfully acquired and loaded[ 0.044026] Security Framework initialized[ 0.048404] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)[ 0.053333] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)[ 0.056592] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes)[ 0.060009] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes)[ 0.068263] CPU: Physical Processor ID: 0[ 0.072003] CPU: Processor Core ID: 0[ 0.076015] mce: CPU supports 2 MCE banks[ 0.078692] Last level iTLB entries: 4KB 1024, 2MB 1024, 4MB 1024[ 0.080004] Last level dTLB entries: 4KB 1024, 2MB 1024, 4MB 1024, 1GB 4[ 0.084003] Spectre V2 mitigation: Mitigation: Full generic retpoline[ 0.089093] Freeing SMP alternatives memory: 24K[ 0.098519] ftrace: allocating 21933 entries in 86 pages[ 0.128101] smpboot: Max logical packages: 8[ 0.132105] x2apic: IRQ remapping doesn't support X2APIC mode[ 0.136006] Switched APIC routing to physical flat.[ 0.140000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0[ 0.185139] clocksource: xen: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns[ 0.192015] installing Xen timer for CPU 0[ 0.196081] smpboot: CPU0: Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz (family: 0x6, model: 0x3f, stepping: 0x2)[ 0.201560] cpu 0 spinlock event irq 53[ 0.204007] Performance Events: unsupported p6 CPU model 63 no PMU driver, software events only.[ 0.208609] installing Xen timer for CPU 1[ 0.211388] x86: Booting SMP configuration:[ 0.212007] .... node #0, CPUs: #1[ 0.216030] cpu 1 spinlock event irq 59[ 0.219275] x86: Booted up 1 node, 2 CPUs[ 0.220007] smpboot: Total of 2 processors activated (9600.35 BogoMIPS)[ 0.224454] devtmpfs: initialized[ 0.224454] x86/mm: Memory block size: 128MB[ 0.232069] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns[ 0.236021] futex hash table entries: 4096 (order: 6, 262144 bytes)[ 0.240060] NET: Registered protocol family 16[ 0.260012] cpuidle: using governor ladder[ 0.280006] cpuidle: using governor menu[ 0.282648] ACPI: bus type PCI registered[ 0.284009] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5[ 0.288310] PCI: Using configuration type 1 for base access[ 0.308134] HugeTLB registered 2 MB page size, pre-allocated 0 pages[ 0.312093] ACPI: Added _OSI(Module Device)[ 0.314822] ACPI: Added _OSI(Processor Device)[ 0.316012] ACPI: Added _OSI(3.0 _SCP Extensions)[ 0.318974] ACPI: Added _OSI(Processor Aggregator Device)[ 0.323569] ACPI: Interpreter enabled[ 0.324017] ACPI: (supports S0 S4 S5)[ 0.326449] ACPI: Using IOAPIC for interrupt routing[ 0.328035] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug[ 0.348482] random: fast init done[ 0.376873] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])[ 0.380016] acpi PNP0A03:00: _OSC: OS supports [Segments MSI][ 0.383750] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM[ 0.384018] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.[ 0.389126] acpiphp: Slot [0] registered[ 0.392498] acpiphp: Slot [3] registered[ 0.395603] acpiphp: Slot [4] registered[ 0.396308] acpiphp: Slot [5] registered[ 0.399438] acpiphp: Slot [6] registered[ 0.400355] acpiphp: Slot [7] registered[ 0.403342] acpiphp: Slot [8] registered[ 0.404277] acpiphp: Slot [9] registered[ 0.407008] acpiphp: Slot [10] registered[ 0.408279] acpiphp: Slot [11] registered[ 0.411141] acpiphp: Slot [12] registered[ 0.412286] acpiphp: Slot [13] registered[ 0.415130] acpiphp: Slot [14] registered[ 0.416290] acpiphp: Slot [15] registered[ 0.419209] acpiphp: Slot [16] registered[ 0.420278] acpiphp: Slot [17] registered[ 0.423298] acpiphp: Slot [18] registered[ 0.424268] acpiphp: Slot [19] registered[ 0.427590] acpiphp: Slot [20] registered[ 0.428328] acpiphp: Slot [21] registered[ 0.432274] acpiphp: Slot [22] registered[ 0.435300] acpiphp: Slot [23] registered[ 0.436284] acpiphp: Slot [24] registered[ 0.439219] acpiphp: Slot [25] registered[ 0.440285] acpiphp: Slot [26] registered[ 0.443182] acpiphp: Slot [27] registered[ 0.444291] acpiphp: Slot [28] registered[ 0.447217] acpiphp: Slot [29] registered[ 0.448415] acpiphp: Slot [30] registered[ 0.451265] acpiphp: Slot [31] registered[ 0.452277] PCI host bridge to bus 0000:00[ 0.455088] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window][ 0.456006] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window][ 0.460008] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window][ 0.464007] pci_bus 0000:00: root bus resource [mem 0xf0000000-0xfbffffff window][ 0.468008] pci_bus 0000:00: root bus resource [bus 00-ff][ 0.476922] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7][ 0.480006] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6][ 0.484007] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177][ 0.488008] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376][ 0.492882] * Found PM-Timer Bug on the chipset. Due to workarounds for a bug,[ 0.492882] * this clock source is slow. Consider trying other clock sources[ 0.497209] pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI[ 0.506334] ACPI: PCI Interrupt Link [LNKA] (IRQs *5 10 11)[ 0.511381] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)[ 0.515186] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)[ 0.519047] ACPI: PCI Interrupt Link [LNKD] (IRQs *5 10 11)[ 0.539555] ACPI: Enabled 2 GPEs in block 00 to 0F[ 0.540081] xen:balloon: Initialising balloon driver[ 0.544080] vgaarb: setting as boot device: PCI:0000:00:02.0[ 0.547559] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none[ 0.552019] vgaarb: loaded[ 0.554173] vgaarb: bridge control possible 0000:00:02.0[ 0.556063] PCI: Using ACPI for IRQ routing[ 0.560018] NetLabel: Initializing[ 0.564011] NetLabel: domain hash size = 128[ 0.566806] NetLabel: protocols = UNLABELED CIPSOv4[ 0.568018] NetLabel: unlabeled traffic allowed by default[ 0.571442] HPET: 3 timers in total, 0 timers will be used for per-cpu timer[ 0.576019] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0[ 0.580004] hpet0: 3 comparators, 64-bit 62.500000 MHz counter[ 0.588020] clocksource: Switched to clocksource xen[ 0.598500] VFS: Disk quotas dquot_6.6.0[ 0.601309] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)[ 0.605672] pnp: PnP ACPI init[ 0.608218] system 00:00: [mem 0x00000000-0x0009ffff] could not be reserved[ 0.612470] system 00:01: [io 0x08a0-0x08a3] has been reserved[ 0.616097] system 00:01: [io 0x0cc0-0x0ccf] has been reserved[ 0.619622] system 00:01: [io 0x04d0-0x04d1] has been reserved[ 0.623416] system 00:07: [io 0x10c0-0x1141] has been reserved[ 0.626956] system 00:07: [io 0xb044-0xb047] has been reserved[ 0.647502] pnp: PnP ACPI: found 8 devices[ 0.656850] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns[ 0.662917] NET: Registered protocol family 2[ 0.666000] TCP established hash table entries: 65536 (order: 7, 524288 bytes)[ 0.670774] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)[ 0.674720] TCP: Hash tables configured (established 65536 bind 65536)[ 0.678934] UDP hash table entries: 4096 (order: 5, 131072 bytes)[ 0.682528] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes)[ 0.686312] NET: Registered protocol family 1[ 0.689188] pci 0000:00:00.0: Limiting direct PCI/PCI transfers[ 0.692793] pci 0000:00:01.0: PIIX3: Enabling Passive Release[ 0.696602] pci 0000:00:01.0: Activating ISA DMA hang workarounds[ 0.700437] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff][ 0.705563] Unpacking initramfs...[ 0.917049] Freeing initrd memory: 14396K[ 0.919784] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)[ 0.923539] software IO TLB [mem 0xec000000-0xf0000000] (64MB) mapped at [ffff8800ec000000-ffff8800efffffff][ 0.929857] audit: initializing netlink subsys (disabled)[ 0.933233] audit: type=2000 audit(1518127712.303:1): initialized[ 0.937152] Initialise system trusted keyrings[ 0.939991] workingset: timestamp_bits=36 max_order=21 bucket_order=0[ 0.981248] Key type asymmetric registered[ 0.984175] Asymmetric key parser 'x509' registered[ 0.987335] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)[ 0.992400] io scheduler noop registered (default)[ 0.995457] pci_hotplug: PCI Hot Plug PCI Core version: 0.5[ 1.000341] pciehp: PCI Express Hot Plug Controller Driver version: 0.4[ 1.006019] xen:grant_table: Grant tables using version 1 layout[ 1.009648] Grant table initialized[ 1.012106] Cannot get hvm parameter CONSOLE_EVTCHN (18): -22![ 1.015979] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled[ 1.046059] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A[ 1.051547] xen_netfront: Initialising Xen virtual ethernet driver[ 1.056102] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12[ 1.065396] serio: i8042 KBD port at 0x60,0x64 irq 1[ 1.068437] serio: i8042 AUX port at 0x60,0x64 irq 12[ 1.071515] hidraw: raw HID events driver (C) Jiri Kosina[ 1.074748] Invalid max_queues (4), will use default max: 2.[ 1.079104] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0[ 1.079163] NET: Registered protocol family 17[ 1.079382] microcode: sig=0x306f2, pf=0x1, revision=0x3b[ 1.084581] microcode: Microcode Update Driver: v2.01 <tigran@aivazian.fsnet.co.uk>, Peter Oruba[ 1.084705] registered taskstats version 1[ 1.084708] Loading compiled-in X.509 certificates[ 1.086665] alg: No test for pkcs1pad(rsa,sha256) (pkcs1pad(rsa-generic,sha256))[ 1.087335] Loaded X.509 cert 'Build time autogenerated kernel key: 90a8ce1f8c89128b6c9d51818805938ea4d0459c'[ 1.087870] zswap: default zpool zbud not available[ 1.087870] zswap: pool creation failed[ 1.089431] blkfront: xvda: barrier or flush: disabled; persistent grants: disabled; indirect descriptors: enabled;[ 1.093875] xvda: xvda1[ 1.190151] Freeing unused kernel memory: 1280K[ 1.194519] Write protecting the kernel read-only data: 10240k[ 1.199910] Freeing unused kernel memory: 632K[ 1.207242] Freeing unused kernel memory: 1624K[ 1.225990] dm_mod: module verification failed: signature and/or required key missing - tainting kernel[ 1.235306] device-mapper: uevent: version 1.0.3[ 1.239778] device-mapper: ioctl: 4.35.0-ioctl (2016-06-23) initialised: dm-devel@redhat.com[ 1.251244] udevd[840]: starting version 173[ 1.286380] SCSI subsystem initialized[ 1.294718] scsi host0: ata_piix[ 1.305494] scsi host1: ata_piix[ 1.308485] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc100 irq 14[ 1.313133] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc108 irq 15growroot: NOCHANGE: disk=/dev/xvda partition=1: size=1073737694, it cannot be grown[ 1.530413] EXT4-fs (xvda1): INFO: recovery required on readonly filesystem[ 1.535346] EXT4-fs (xvda1): write access will be enabled during recovery[ 1.948112] tsc: Refined TSC clocksource calibration: 2400.002 MHz[ 1.952697] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x22983938a92, max_idle_ns: 440795216168 ns[ 2.818080] random: crng init done[ 3.027038] EXT4-fs (xvda1): orphan cleanup on readonly fs[ 3.035785] EXT4-fs (xvda1): 1 orphan inode deleted[ 3.039754] EXT4-fs (xvda1): recovery complete[ 3.047535] EXT4-fs (xvda1): mounted filesystem with ordered data mode. Opts: (null)[ 3.083990] dracut: Remounting /dev/disk/by-label/\x2f with -o noatime,ro[ 3.130440] EXT4-fs (xvda1): mounted filesystem with ordered data mode. Opts: (null)[ 3.139953] dracut: Mounted root filesystem /dev/xvda1[ 3.166094] dracut: Switching rootimage_name="amzn-ami-hvm"image_version="2017.09"image_arch="x86_64"image_file="amzn-ami-hvm-2017.09.1.20180115-x86_64.ext4.gpt"image_stamp="eeb4-18f0"image_date="20180115184347"recipe_name="amzn ami"recipe_id="c9c871d2-7d71-8baa-e873-c70f-cbbe-ddb2-79ee86e7"

Is there something being missed that the logs highlight that are causing denial of ssh access on port 22?

解决方案

@LloydMooreSince you are getting below logs in your system log

[    0.000000] You might have to change the root device
[    0.000000] from /dev/hd[a-d] to /dev/xvd[a-d]
[    0.000000] in your root= kernel command line option

You might need to detach and rename your root device to fix this issue.


Please follow below step's to fix this issue. Please check and suggest if this fixed your issues Before you start : This procedure requires a stop and start of the instance. Be aware of the following:

  1. If your instance is part of an Amazon EC2 Auto Scaling group, then stopping the instance might terminate it. Instances launched with Amazon EMR, AWS CloudFormation, AWS Elastic Beanstalk might be part of an AWS Auto Scaling group. Instance termination in this scenario depends on the instance scale-in protection settings for your Auto Scaling group. If your instance is part of an Auto Scaling group, temporarily remove it from the Auto Scaling group before starting the resolution steps.

  2. Stopping and starting the instance changes the public IP address of your instance. It's a best practice to use an Elastic IP address instead of a public IP address when routing external traffic to your instance.

  3. To guard against the possibility of data loss, take a snapshot of your volume before attempting to unmount it. Forced detachment of a stuck volume can cause damage to the file system or the data it contains or an inability to attach a new volume using the same device name, unless you reboot the instance.

  4. You must be a root user or need to have or atlease sudo privilege to follow this procedure.


Keep these things handy

  1. --instance-id
  2. --volume-id
  3. --availability-zone


1 Firstly You have to create another instance, instance-B (EBS Backed) in the same availability zone as instance-A
2 Stop Instance
3 Detach the root EBS volume from instance-A
4 Attach that EBS volume to instance-B as /dev/xvdf
5 mount /dev/xvdf On instance-B use command:
6 sudo mkdir -p /mnt/xvdf
7 sudo mount /dev/xvdf /mnt/xvdf
8 check public key, if you have the corresponding private key then it's good else create new key pair and add it to /mnt/xvdf/home/root/.ssh/authorized_keys(if not root user replace root with your current user profile ex: ec2-user)
9 compare /etc/fstab file of instance-B with /mnt/xvdf/etc/fstab and make necessary modifications's to /mnt/xvdf//etc/fstab file.
10 Unmount volume from instance-B : umount /mnt/xvdf
11 Attach volume back to instance-A as root
12 Restart instance-A

这篇关于无法访问 ec2 ebs 支持的实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 02:49