亚马逊 EC2 实例连续失败,状态检查 1/2

亚马逊 EC2 实例连续失败,状态检查 1/2

我对 AWS 和 EC2 实例非常陌生。我的 EC2 实例每隔一两天就会失败,我不知道为什么。它说 1/2 状态检查失败。我尝试修复任何错误(我不相信有)我也更改了 ec2 实例。我创建了一个全新的实例,但仍然有同样的问题。我可以重新启动,但第二天就会失败。如果有人能帮忙,我将不胜感激!!!

编辑:为了提供更多背景信息,我在 EC2 实例上运行了一些 Docker 容器。Docker 容器来自 The Things Network (https://www.thethingsindustries.com/docs/getting-started/installation/)我严格按照说明进行操作,并确保安装后没有出现任何错误。

日志!!!:

Welcome to [1mUbuntu 20.04.2 LTS[0m!

[    2.776512] systemd[1]: Set hostname to <ip-172-31-1-239>.
[    3.149801] systemd[1]: Created slice system-modprobe.slice.
[[0;32m  OK  [0m] Created slice [0;1;39msystem-modprobe.slice[0m.
[    3.160582] systemd[1]: Created slice system-serial\x2dgetty.slice.
[[0;32m  OK  [0m] Created slice [0;1;39msystem-serial\x2dgetty.slice[0m.
[    3.169747] systemd[1]: Created slice User and Session Slice.
[[0;32m  OK  [0m] Created slice [0;1;39mUser and Session Slice[0m.
[    3.178627] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[[0;32m  OK  [0m] Started [0;1;39mForward Password R…uests to Wall Directory Watch[0m.
[    3.189317] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[[0;32m  OK  [0m] Set up automount [0;1;39mArbitrary…s File System Automount Point[0m.
[    3.201144] systemd[1]: Reached target User and Group Name Lookups.
[[0;32m  OK  [0m] Reached target [0;1;39mUser and Group Name Lookups[0m.
[    3.210732] systemd[1]: Reached target Slices.
[[0;32m  OK  [0m] Reached target [0;1;39mSlices[0m.
[    3.218285] systemd[1]: Reached target Swap.
[[0;32m  OK  [0m] Reached target [0;1;39mSwap[0m.
[    3.225612] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[[0;32m  OK  [0m] Listening on [0;1;39mDevice-mapper event daemon FIFOs[0m.
[    3.235482] systemd[1]: Listening on LVM2 poll daemon socket.
[[0;32m  OK  [0m] Listening on [0;1;39mLVM2 poll daemon socket[0m.
[    3.245250] systemd[1]: Listening on multipathd control socket.
[[0;32m  OK  [0m] Listening on [0;1;39mmultipathd control socket[0m.
[    3.254695] systemd[1]: Listening on Syslog Socket.
[[0;32m  OK  [0m] Listening on [0;1;39mSyslog Socket[0m.
[    3.262953] systemd[1]: Listening on fsck to fsckd communication Socket.
[[0;32m  OK  [0m] Listening on [0;1;39mfsck to fsckd communication Socket[0m.
[    3.286765] systemd[1]: Listening on initctl Compatibility Named Pipe.
[[0;32m  OK  [0m] Listening on [0;1;39minitctl Compatibility Named Pipe[0m.
[    3.297057] systemd[1]: Listening on Journal Audit Socket.
[[0;32m  OK  [0m] Listening on [0;1;39mJournal Audit Socket[0m.
[    3.306158] systemd[1]: Listening on Journal Socket (/dev/log).
[[0;32m  OK  [0m] Listening on [0;1;39mJournal Socket (/dev/log)[0m.
[    3.321028] systemd[1]: Listening on Journal Socket.
[[0;32m  OK  [0m] Listening on [0;1;39mJournal Socket[0m.
[    3.329433] systemd[1]: Listening on Network Service Netlink Socket.
[[0;32m  OK  [0m] Listening on [0;1;39mNetwork Service Netlink Socket[0m.
[    3.347160] systemd[1]: Listening on udev Control Socket.
[[0;32m  OK  [0m] Listening on [0;1;39mudev Control Socket[0m.
[    3.368836] systemd[1]: Listening on udev Kernel Socket.
[[0;32m  OK  [0m] Listening on [0;1;39mudev Kernel Socket[0m.
[    3.380182] systemd[1]: Mounting Huge Pages File System...
         Mounting [0;1;39mHuge Pages File System[0m...
[    3.404172] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting [0;1;39mPOSIX Message Queue File System[0m...
[    3.427061] systemd[1]: Mounting Kernel Debug File System...
         Mounting [0;1;39mKernel Debug File System[0m...
[    3.440263] systemd[1]: Mounting Kernel Trace File System...
         Mounting [0;1;39mKernel Trace File System[0m...
[    3.461084] systemd[1]: Starting Journal Service...
         Starting [0;1;39mJournal Service[0m...
[    3.480157] systemd[1]: Starting Set the console keyboard layout...
         Starting [0;1;39mSet the console keyboard layout[0m...
[    3.499618] systemd[1]: Starting Create list of static device nodes for the current kernel...
         Starting [0;1;39mCreate list of st…odes for the current kernel[0m...
[    3.537680] systemd[1]: Starting Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling...
         Starting [0;1;39mMonitoring of LVM…meventd or progress polling[0m...
[    3.591571] systemd[1]: Starting Load Kernel Module drm...
         Starting [0;1;39mLoad Kernel Module drm[0m...
[    3.610351] systemd[1]: Condition check resulted in OpenVSwitch configuration for cleanup being skipped.
[    3.637426] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[    3.655165] systemd[1]: Starting File System Check on Root Device...
         Starting [0;1;39mFile System Check on Root Device[0m...
[    3.678285] systemd[1]: Starting Load Kernel Modules...
         Starting [0;1;39mLoad Kernel Modules[0m...
[    3.711172] systemd[1]: Starting udev Coldplug all Devices...
         Starting [0;1;39mudev Coldplug all Devices[0m...
[    3.738158] systemd[1]: Starting Uncomplicated firewall...
         Starting [0;1;39mUncomplicated firewall[0m...
[    3.767401] systemd[1]: Started Journal Service.
[[0;32m  OK  [0m] Started [0;1;39mJournal Service[0m.
[[0;32m  OK  [0m] Mounted [0;1;39mHuge Pages File System[0m.
[[0;32m  OK  [0m] Mounted [0;1;39mPOSIX Message Queue File System[0m.
[[0;32m  OK  [0m] Mounted [0;1;39mKernel Debug File System[0m.
[[0;32m  OK  [0m] Mounted [0;1;39mKernel Trace File System[0m.
[[0;32m  OK  [0m] Finished [0;1;39mSet the console keyboard layout[0m.
[[0;32m  OK  [0m] Finished [0;1;39mCreate list of st… nodes for the current kernel[0m.
[[0;32m  OK  [0m] Finished [0;1;39mLoad Kernel Module drm[0m.
[[0;32m  OK  [0m] Finished [0;1;39mFile System Check on Root Device[0m.
[[0;32m  OK  [0m] Finished [0;1;39mLoad Kernel Modules[0m.
[[0;32m  OK  [0m] Finished [0;1;39mUncomplicated firewall[0m.
         Mounting [0;1;39mFUSE Control File System[0m...
         Mounting [0;1;39mKernel Configuration File System[0m...
[[0;32m  OK  [0m] Started [0;1;39mFile System Check Daemon to report status[0m.
         Starting [0;1;39mRemount Root and Kernel File Systems[0m...
         Starting [0;1;39mApply Kernel Variables[0m...
[[0;32m  OK  [0m] Finished [0;1;39mudev Coldplug all Devices[0m.
[[0;32m  OK  [0m] Mounted [0;1;39mFUSE Control File System[0m.
[    3.967715] EXT4-fs (xvda1): re-mounted. Opts: discard
[[0;32m  OK  [0m] Mounted [0;1;39mKernel Configuration File System[0m.
[[0;32m  OK  [0m] Finished [0;1;39mRemount Root and Kernel File Systems[0m.
         Starting [0;1;39mFlush Journal to Persistent Storage[0m...
         Starting [0;1;39mLoad/Save Random Seed[0m...
         Starting [0;1;39mCreate System Users[0m...
         Starting [0;1;39mudev Wait for Complete Device Initialization[0m...
[[0;32m  OK  [0m] Finished [0;1;39mApply Kernel Variables[0m.
[[0;32m  OK  [0m] Finished [0;1;39mLoad/Save Random Seed[0m.
[[0;32m  OK  [0m] Finished [0;1;39mCreate System Users[0m.
         Starting [0;1;39mCreate Static Device Nodes in /dev[0m...
[[0;32m  OK  [0m] Finished [0;1;39mCreate Static Device Nodes in /dev[0m.
         Starting [0;1;39mudev Kernel Device Manager[0m...
[[0;32m  OK  [0m] Started [0;1;39mudev Kernel Device Manager[0m.
[[0;32m  OK  [0m] Started [0;1;39mDispatch Password …ts to Console Directory Watch[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mLocal Encrypted Volumes[0m.
[[0;32m  OK  [0m] Finished [0;1;39mFlush Journal to Persistent Storage[0m.
[[0;32m  OK  [0m] Found device [0;1;39m/dev/ttyS0[0m.
[[0;32m  OK  [0m] Listening on [0;1;39mLoad/Save RF …itch Status /dev/rfkill Watch[0m.
[[0;32m  OK  [0m] Finished [0;1;39mMonitoring of LVM… dmeventd or progress polling[0m.
[[0;32m  OK  [0m] Finished [0;1;39mudev Wait for Complete Device Initialization[0m.
         Starting [0;1;39mDevice-Mapper Multipath Device Controller[0m...
[[0;32m  OK  [0m] Started [0;1;39mDevice-Mapper Multipath Device Controller[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mLocal File Systems (Pre)[0m.
         Mounting [0;1;39mMount unit for am…on-ssm-agent, revision 3552[0m...
         Mounting [0;1;39mMount unit for core18, revision 1997[0m...
         Mounting [0;1;39mMount unit for lxd, revision 19647[0m...
         Mounting [0;1;39mMount unit for lxd, revision 20326[0m...
         Mounting [0;1;39mMount unit for snapd, revision 11588[0m...
         Mounting [0;1;39mMount unit for snapd, revision 11841[0m...
[[0;32m  OK  [0m] Mounted [0;1;39mMount unit for amazon-ssm-agent, revision 3552[0m.
[[0;32m  OK  [0m] Mounted [0;1;39mMount unit for core18, revision 1997[0m.
[[0;32m  OK  [0m] Mounted [0;1;39mMount unit for lxd, revision 19647[0m.
[[0;32m  OK  [0m] Mounted [0;1;39mMount unit for lxd, revision 20326[0m.
[[0;32m  OK  [0m] Mounted [0;1;39mMount unit for snapd, revision 11588[0m.
[[0;32m  OK  [0m] Mounted [0;1;39mMount unit for snapd, revision 11841[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mLocal File Systems[0m.
         Starting [0;1;39mLoad AppArmor profiles[0m...
         Starting [0;1;39mSet console font and keymap[0m...
         Starting [0;1;39mCreate final runt…dir for shutdown pivot root[0m...
         Starting [0;1;39mTell Plymouth To Write Out Runtime Data[0m...
         Starting [0;1;39mCreate Volatile Files and Directories[0m...
[[0;32m  OK  [0m] Finished [0;1;39mSet console font and keymap[0m.
[[0;32m  OK  [0m] Finished [0;1;39mCreate final runt…e dir for shutdown pivot root[0m.
[[0;32m  OK  [0m] Finished [0;1;39mTell Plymouth To Write Out Runtime Data[0m.
[[0;32m  OK  [0m] Finished [0;1;39mCreate Volatile Files and Directories[0m.
         Starting [0;1;39mNetwork Time Synchronization[0m...
         Starting [0;1;39mUpdate UTMP about System Boot/Shutdown[0m...
[[0;32m  OK  [0m] Finished [0;1;39mUpdate UTMP about System Boot/Shutdown[0m.
[[0;32m  OK  [0m] Finished [0;1;39mLoad AppArmor profiles[0m.
         Starting [0;1;39mLoad AppArmor pro…managed internally by snapd[0m...
         Starting [0;1;39mInitial cloud-init job (pre-networking)[0m...
[[0;32m  OK  [0m] Started [0;1;39mNetwork Time Synchronization[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mSystem Time Set[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mSystem Time Synchronized[0m.
[[0;32m  OK  [0m] Finished [0;1;39mLoad AppArmor pro…s managed internally by snapd[0m.
[    6.469652] cloud-init[347]: Cloud-init v. 21.1-19-gbad84ad4-0ubuntu1~20.04.2 running 'init-local' at Thu, 13 May 2021 13:58:13 +0000. Up 6.05 seconds.
[[0;32m  OK  [0m] Finished [0;1;39mInitial cloud-init job (pre-networking)[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mNetwork (Pre)[0m.
         Starting [0;1;39mNetwork Service[0m...
[[0;32m  OK  [0m] Started [0;1;39mNetwork Service[0m.
         Starting [0;1;39mWait for Network to be Configured[0m...
         Starting [0;1;39mNetwork Name Resolution[0m...
[[0;32m  OK  [0m] Started [0;1;39mNetwork Name Resolution[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mNetwork[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mHost and Network Name Lookups[0m.
[[0;32m  OK  [0m] Finished [0;1;39mWait for Network to be Configured[0m.
         Starting [0;1;39mInitial cloud-ini… (metadata service crawler)[0m...
[    8.673980] cloud-init[377]: Cloud-init v. 21.1-19-gbad84ad4-0ubuntu1~20.04.2 running 'init' at Thu, 13 May 2021 13:58:16 +0000. Up 8.54 seconds.
[    8.683098] cloud-init[377]: ci-info: ++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++
[    8.688504] cloud-init[377]: ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
[    8.695309] cloud-init[377]: ci-info: | Device |  Up  |           Address           |      Mask     | Scope  |     Hw-Address    |
[    8.702458] cloud-init[377]: ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
[    8.710023] cloud-init[377]: ci-info: |  eth0  | True |         172.31.1.239        | 255.255.240.0 | global | 0a:03:42:c0:e3:01 |
[    8.717534] cloud-init[377]: ci-info: |  eth0  | True | fe80::803:42ff:fec0:e301/64 |       .       |  link  | 0a:03:42:c0:e3:01 |
[    8.724591] cloud-init[377]: ci-info: |   lo   | True |          127.0.0.1          |   255.0.0.0   |  host  |         .         |
[    8.732376] cloud-init[377]: ci-info: |   lo   | True |           ::1/128           |       .       |  host  |         .         |
[    8.746076] cloud-init[377]: ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
[    8.753031] cloud-init[377]: ci-info: +++++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++++
[    8.758024] cloud-init[377]: ci-info: +-------+-------------+------------+-----------------+-----------+-------+
[    8.763449] cloud-init[377]: ci-info: | Route | Destination |  Gateway   |     Genmask     | Interface | Flags |
[    8.768239] cloud-init[377]: ci-info: +-------+-------------+------------+-----------------+-----------+-------+
[    8.774614] cloud-init[377]: ci-info: |   0   |   0.0.0.0   | 172.31.0.1 |     0.0.0.0     |    eth0   |   UG  |
[    8.780157] cloud-init[377]: ci-info: |   1   |  172.31.0.0 |  0.0.0.0   |  255.255.240.0  |    eth0   |   U   |
[    8.788509] cloud-init[377]: ci-info: |   2   |  172.31.0.1 |  0.0.0.0   | 255.255.255.255 |    eth0   |   UH  |
[    8.799168] cloud-init[377]: ci-info: +-------+-------------+------------+-----------------+-----------+-------+
[    8.804059] cloud-init[377]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
[    8.809506] cloud-init[377]: ci-info: +-------+-------------+---------+-----------+-------+
[    8.813903] cloud-init[377]: ci-info: | Route | Destination | Gateway | Interface | Flags |
[    8.818267] cloud-init[377]: ci-info: +-------+-------------+---------+-----------+-------+
[    8.823267] cloud-init[377]: ci-info: |   1   |  fe80::/64  |    ::   |    eth0   |   U   |
[    8.828363] cloud-init[377]: ci-info: |   3   |    local    |    ::   |    eth0   |   U   |
[    8.832442] cloud-init[377]: ci-info: |   4   |  multicast  |    ::   |    eth0   |   U   |
[    8.836619] cloud-init[377]: ci-info: +-------+-------------+---------+-----------+-------+
[[0;32m  OK  [0m] Finished [0;1;39mInitial cloud-ini…ob (metadata service crawler)[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mCloud-config availability[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mNetwork is Online[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mSystem Initialization[0m.
[[0;32m  OK  [0m] Started [0;1;39mACPI Events Check[0m.
[[0;32m  OK  [0m] Started [0;1;39mDaily apt download activities[0m.
[[0;32m  OK  [0m] Started [0;1;39mDaily apt upgrade and clean activities[0m.
[[0;32m  OK  [0m] Started [0;1;39mPeriodic ext4 Onli…ata Check for All Filesystems[0m.
[[0;32m  OK  [0m] Started [0;1;39mDiscard unused blocks once a week[0m.
[[0;32m  OK  [0m] Started [0;1;39mRefresh fwupd metadata regularly[0m.
[[0;32m  OK  [0m] Started [0;1;39mDaily rotation of log files[0m.
[[0;32m  OK  [0m] Started [0;1;39mDaily man-db regeneration[0m.
[[0;32m  OK  [0m] Started [0;1;39mMessage of the Day[0m.
[[0;32m  OK  [0m] Started [0;1;39mDaily Cleanup of Temporary Directories[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mPaths[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mTimers[0m.
[[0;32m  OK  [0m] Listening on [0;1;39mACPID Listen Socket[0m.
[[0;32m  OK  [0m] Listening on [0;1;39mD-Bus System Message Bus Socket[0m.
         Starting [0;1;39mDocker Socket for the API[0m.
[[0;32m  OK  [0m] Listening on [0;1;39mOpen-iSCSI iscsid Socket[0m.
[[0;32m  OK  [0m] Listening on [0;1;39mSocket unix for snap application lxd.daemon[0m.
         Starting [0;1;39mSocket activation for snappy daemon[0m.
[[0;32m  OK  [0m] Listening on [0;1;39mUUID daemon activation socket[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mRemote File Systems (Pre)[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mRemote File Systems[0m.
         Starting [0;1;39mAvailability of block devices[0m...
[[0;32m  OK  [0m] Listening on [0;1;39mDocker Socket for the API[0m.
[[0;32m  OK  [0m] Listening on [0;1;39mSocket activation for snappy daemon[0m.
[[0;32m  OK  [0m] Finished [0;1;39mAvailability of block devices[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mSockets[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mBasic System[0m.
         Starting [0;1;39mAccounts Service[0m...
[[0;32m  OK  [0m] Started [0;1;39mACPI event daemon[0m.
         Starting [0;1;39mLSB: automatic crash report generation[0m...
         Starting [0;1;39mDeferred execution scheduler[0m...
         Starting [0;1;39mcontainerd container runtime[0m...
[[0;32m  OK  [0m] Started [0;1;39mRegular background program processing daemon[0m.
[[0;32m  OK  [0m] Started [0;1;39mD-Bus System Message Bus[0m.
[[0;32m  OK  [0m] Started [0;1;39mSave initial kernel messages after boot[0m.
         Starting [0;1;39mRemove Stale Onli…t4 Metadata Check Snapshots[0m...
         Starting [0;1;39mEC2 Instance Connect Host Key Harvesting[0m...
         Starting [0;1;39mLSB: Record successful boot for GRUB[0m...
[[0;32m  OK  [0m] Started [0;1;39mirqbalance daemon[0m.
         Starting [0;1;39mDispatcher daemon for systemd-networkd[0m...
         Starting [0;1;39mSystem Logging Service[0m...
[[0;32m  OK  [0m] Started [0;1;39mService for snap a…on-ssm-agent.amazon-ssm-agent[0m.
         Starting [0;1;39mService for snap application lxd.activate[0m...
         Starting [0;1;39mSnap Daemon[0m...
         Starting [0;1;39mLogin Service[0m...
         Starting [0;1;39mPermit User Sessions[0m...
[[0;32m  OK  [0m] Started [0;1;39mDeferred execution scheduler[0m.
[[0;32m  OK  [0m] Finished [0;1;39mRemove Stale Onli…ext4 Metadata Check Snapshots[0m.
[[0;32m  OK  [0m] Finished [0;1;39mPermit User Sessions[0m.
[[0;32m  OK  [0m] Started [0;1;39mSystem Logging Service[0m.
         Starting [0;1;39mHold until boot process finishes up[0m...
         Starting [0;1;39mTerminate Plymouth Boot Screen[0m...
[[0;32m  OK  [0m] Finished [0;1;39mHold until boot process finishes up[0m.
[[0;32m  OK  [0m] Finished [0;1;39mTerminate Plymouth Boot Screen[0m.
[[0;32m  OK  [0m] Started [0;1;39mSerial Getty on ttyS0[0m.
         Starting [0;1;39mSet console scheme[0m...
[[0;32m  OK  [0m] Finished [0;1;39mSet console scheme[0m.
[[0;32m  OK  [0m] Created slice [0;1;39msystem-getty.slice[0m.
[[0;32m  OK  [0m] Started [0;1;39mGetty on tty1[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mLogin Prompts[0m.
[[0;32m  OK  [0m] Started [0;1;39mLSB: Record successful boot for GRUB[0m.
         Starting [0;1;39mGRUB failed boot detection[0m...
         Starting [0;1;39mHostname Service[0m...
[[0;32m  OK  [0m] Finished [0;1;39mGRUB failed boot detection[0m.
[[0;32m  OK  [0m] Started [0;1;39mLSB: automatic crash report generation[0m.
         Starting [0;1;39mAuthorization Manager[0m...
[[0;32m  OK  [0m] Started [0;1;39mAuthorization Manager[0m.
[[0;32m  OK  [0m] Started [0;1;39mAccounts Service[0m.
[[0;32m  OK  [0m] Started [0;1;39mLogin Service[0m.
[[0;32m  OK  [0m] Started [0;1;39mUnattended Upgrades Shutdown[0m.
[[0;32m  OK  [0m] Started [0;1;39mHostname Service[0m.
[[0;32m  OK  [0m] Started [0;1;39mDispatcher daemon for systemd-networkd[0m.
[[0;32m  OK  [0m] Started [0;1;39mcontainerd container runtime[0m.
         Starting [0;1;39mDocker Application Container Engine[0m...
[[0;32m  OK  [0m] Finished [0;1;39mEC2 Instance Connect Host Key Harvesting[0m.
         Starting [0;1;39mOpenBSD Secure Shell server[0m...
[[0;32m  OK  [0m] Started [0;1;39mOpenBSD Secure Shell server[0m.
[[0;32m  OK  [0m] Started [0;1;39mSnap Daemon[0m.
         Starting [0;1;39mWait until snapd is fully seeded[0m...
[[0;32m  OK  [0m] Finished [0;1;39mService for snap application lxd.activate[0m.
[[0;32m  OK  [0m] Finished [0;1;39mWait until snapd is fully seeded[0m.
         Starting [0;1;39mApply the settings specified in cloud-config[0m...


Ubuntu 20.04.2 LTS ip-172-31-1-239 ttyS0

ip-172-31-1-239 login: [   15.446686] cloud-init[1324]: Cloud-init v. 21.1-19-gbad84ad4-0ubuntu1~20.04.2 running 'modules:config' at Thu, 13 May 2021 13:58:22 +0000. Up 15.01 seconds.
2021/05/13 13:58:25Z: Amazon SSM Agent v3.0.529.0 is running
2021/05/13 13:58:25Z: OsProductName: Ubuntu
2021/05/13 13:58:25Z: OsVersion: 20.04
[   19.928325] cloud-init[1591]: Cloud-init v. 21.1-19-gbad84ad4-0ubuntu1~20.04.2 running 'modules:final' at Thu, 13 May 2021 13:58:27 +0000. Up 19.72 seconds.
[   19.976274] cloud-init[1591]: Cloud-init v. 21.1-19-gbad84ad4-0ubuntu1~20.04.2 finished at Thu, 13 May 2021 13:58:27 +0000. Datasource DataSourceEc2Local.  Up 19.91 seconds

答案1

我会监控您的 EC2 实例的几种资源。

默认情况下,您只能看到 CPU。如果您安装CloudWatch 代理,您可以收集诸如 RAM 或磁盘之类的额外指标,这些指标是虚拟机管理程序无法直接猜测的。

然后,您可以查看实例失败时的指标,以检查是否存在一些意外的资源消耗。

我过去遇到过一些问题,由于缺少可用 RAM 而导致了与您描述类似的行为。

相关内容